decocms 4.52.3 → 4.52.4
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-B53JhFAu.js → AlertCircle-BldmKOYl.js} +1 -1
- package/dist/client/assets/{ArrowUp-BRSr5Hko.js → ArrowUp-XGUytXUa.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-H0WTVT37.js → ArrowUpRight-CZ6IZE1b.js} +1 -1
- package/dist/client/assets/{Check-C_CIFiKi.js → Check-j1sieYgz.js} +1 -1
- package/dist/client/assets/{CheckCircle-BHN-wFbK.js → CheckCircle-CPooV6o7.js} +1 -1
- package/dist/client/assets/{ChevronDown-BfG3lHhC.js → ChevronDown-ZdsPdd3m.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dqs4UYfi.js → ChevronRight-B31bjCK-.js} +1 -1
- package/dist/client/assets/{ChevronUp-D1yQd_10.js → ChevronUp-DM7XOt_6.js} +1 -1
- package/dist/client/assets/{Circle-BMe_lNRs.js → Circle-aTxUrR1-.js} +1 -1
- package/dist/client/assets/{Copy01-I5E-L-KP.js → Copy01-DEBgEw4m.js} +1 -1
- package/dist/client/assets/{DotsVertical-DCj3Pe-o.js → DotsVertical-BFnnYf4q.js} +1 -1
- package/dist/client/assets/{Eye-Fa6zzcvh.js → Eye-BD6wnp0f.js} +1 -1
- package/dist/client/assets/{FilterLines-Dabon75B.js → FilterLines-Cf-nYkSR.js} +1 -1
- package/dist/client/assets/{Globe01-D8Lfegq4.js → Globe01-l1Ix77SY.js} +1 -1
- package/dist/client/assets/{Globe04-BKaoGJE9.js → Globe04-B8bWEY50.js} +1 -1
- package/dist/client/assets/{HardDrive-CmlVCNCP.js → HardDrive-Br0tJAl2.js} +1 -1
- package/dist/client/assets/{Key01-BlVS9wch.js → Key01-BGWz5HYt.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CvxAKnEI.js → LayoutLeft-DzFvvyFE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-3dZq5bY0.js → LinkExternal01-D4gcnx2Y.js} +1 -1
- package/dist/client/assets/{List-DoWo7FQN.js → List-BxAyWDGQ.js} +1 -1
- package/dist/client/assets/{Loading02-CQnI4ICL.js → Loading02-CXEXXeTi.js} +1 -1
- package/dist/client/assets/{Monitor01-CadwJLnk.js → Monitor01-tz7dD7We.js} +1 -1
- package/dist/client/assets/{Palette-BJcNGJoP.js → Palette-CG68x-mG.js} +1 -1
- package/dist/client/assets/{Play-CgD79iZg.js → Play-CETHTQrQ.js} +1 -1
- package/dist/client/assets/{Plus-D63gaaHA.js → Plus-t7OB5b7L.js} +1 -1
- package/dist/client/assets/{SearchLg-MLCu3K6z.js → SearchLg-Ou-14jd8.js} +1 -1
- package/dist/client/assets/{SearchMd-evNv9trP.js → SearchMd-DuUx4nJu.js} +1 -1
- package/dist/client/assets/{Settings02-Ddh7L72a.js → Settings02-DJEuklbD.js} +1 -1
- package/dist/client/assets/{Shield01-CoyB298o.js → Shield01-C7SaGc6r.js} +1 -1
- package/dist/client/assets/{Star01-D1xnxtGT.js → Star01-W1tdM4gC.js} +1 -1
- package/dist/client/assets/{Stars01-IimVOfNw.js → Stars01-DPBiqwGN.js} +1 -1
- package/dist/client/assets/{Stars02-D3yMrrs0.js → Stars02-CFaD9USb.js} +1 -1
- package/dist/client/assets/{Sun-icg_V74A.js → Sun-BTMsxR_a.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DDDazbVr.js → SwitchHorizontal01-DoMIOvoy.js} +1 -1
- package/dist/client/assets/{Tool01-FgDVN5Aa.js → Tool01-CU2Dekk0.js} +1 -1
- package/dist/client/assets/{Trash01-Cf4xz_lu.js → Trash01-BRXzLMdJ.js} +1 -1
- package/dist/client/assets/{Upload01-DqR1L_zb.js → Upload01-64w4TJvW.js} +1 -1
- package/dist/client/assets/{User01-2BQwgTbP.js → User01-B7mTZccl.js} +1 -1
- package/dist/client/assets/{Users01-CHhUYr_-.js → Users01-lS_jqpM8.js} +1 -1
- package/dist/client/assets/{Users03-BubKtGEN.js → Users03-DzMpwqEY.js} +1 -1
- package/dist/client/assets/{X-DNthiYnC.js → X-BJRFmSMk.js} +1 -1
- package/dist/client/assets/{XCircle-CowkXBTi.js → XCircle-CCQBu_cy.js} +1 -1
- package/dist/client/assets/{XClose-B9_O9ZwX.js → XClose-B_EYq-aZ.js} +1 -1
- package/dist/client/assets/{Zap-DptPhcrr.js → Zap-DvIJeYmP.js} +1 -1
- package/dist/client/assets/{ZapSquare-DM6ZWSzD.js → ZapSquare-DSfmgoKs.js} +1 -1
- package/dist/client/assets/{ZoomOut-BmpdGZEc.js → ZoomOut-Dzg2TOBo.js} +1 -1
- package/dist/client/assets/{access-gate-DzI7fje7.js → access-gate-RWaP8A_2.js} +1 -1
- package/dist/client/assets/{add-section-modal-Cl2Q63YX.js → add-section-modal-C7aGMc9P.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DlIlOn9g.js → agent-capabilities-CXYfOpBR.js} +1 -1
- package/dist/client/assets/{agent-icon-DiJCyVK_.js → agent-icon-F1uYvxya.js} +1 -1
- package/dist/client/assets/{agents-list-C6ag4VGE.js → agents-list-CqrQA-N7.js} +1 -1
- package/dist/client/assets/{ai-providers-Cn8GiYb0.js → ai-providers-C3R1lkIm.js} +1 -1
- package/dist/client/assets/{alert-BNE2objS.js → alert-ClOXFzao.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bb_E0Ib3.js → alert-dialog-Dsz30MNx.js} +1 -1
- package/dist/client/assets/{app-editor-u7WWlq5N.js → app-editor-CclZL4UE.js} +1 -1
- package/dist/client/assets/{auth-X2zOoLs3.js → auth-WjVaV5WX.js} +1 -1
- package/dist/client/assets/{auth-catchall-B5n0qWQs.js → auth-catchall-D5tVoeS6.js} +1 -1
- package/dist/client/assets/{auth-entry-8VtUevv2.js → auth-entry-t6LtcDGY.js} +1 -1
- package/dist/client/assets/{auth-split-layout-cRqLGO3N.js → auth-split-layout-BimIgF40.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-uQHwVym9.js → authenticate-and-persist-oauth-lTHNTsnJ.js} +1 -1
- package/dist/client/assets/{automation-list-row-DMW0IRGB.js → automation-list-row-BD6KUey-.js} +1 -1
- package/dist/client/assets/{automation-runs-Dt4hr7e4.js → automation-runs-42FB_H7p.js} +1 -1
- package/dist/client/assets/{automations-CHbcRBgK.js → automations-DAtYS5Ow.js} +1 -1
- package/dist/client/assets/{autosend-hpJ3sd0t.js → autosend-7SRCMhIA.js} +1 -1
- package/dist/client/assets/{avatar-7MpZ9q34.js → avatar-D8o1Qy6f.js} +1 -1
- package/dist/client/assets/{badge-DK3Lxhxf.js → badge-DynU_nuJ.js} +1 -1
- package/dist/client/assets/{block-document-D52oI8HZ.js → block-document-Ccv3wTHW.js} +1 -1
- package/dist/client/assets/{brand-context-kupTn8ww.js → brand-context-BJSZLnxK.js} +1 -1
- package/dist/client/assets/{breadcrumb-Chp_BCp3.js → breadcrumb-0fCPfds_.js} +1 -1
- package/dist/client/assets/{buckets-9c-3tQqN.js → buckets-C5qb-6JN.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Cvr8ttuk.js → bulk-category-panel-CTWPBnGB.js} +1 -1
- package/dist/client/assets/{calendar-CVcC02T0.js → calendar-CBnSJD-g.js} +1 -1
- package/dist/client/assets/{capability-load-error-BDl1R2Mq.js → capability-load-error-B1ArA5hn.js} +1 -1
- package/dist/client/assets/{card-CuLmtjkK.js → card-BaCi5kNk.js} +1 -1
- package/dist/client/assets/{category-editor-CXTluY_C.js → category-editor-Dv22tBht.js} +1 -1
- package/dist/client/assets/{chat-context-Bcthg0Rk.js → chat-context-CxgQr2FC.js} +1 -1
- package/dist/client/assets/{checkbox-B1YF-uK0.js → checkbox-Di5IVVJY.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C53wAj-e.js → cli-auth-success-BI8XQWpT.js} +1 -1
- package/dist/client/assets/{collection-detail-ZtPppzVw.js → collection-detail-Dp5YpB8n.js} +1 -1
- package/dist/client/assets/{collection-display-button-DpeNVXJK.js → collection-display-button-BOLZsgbL.js} +1 -1
- package/dist/client/assets/{collection-search-COWX-zrS.js → collection-search-BScFeR4z.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dx6fV4WQ.js → collection-table-wrapper-BcpC3pMJ.js} +1 -1
- package/dist/client/assets/{collection-tabs-CJs3t0kZ.js → collection-tabs-ucCXcFf-.js} +1 -1
- package/dist/client/assets/{command-U4hp1Sg9.js → command-DsWHvOHz.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-IejA-j4v.js → commerce-onboarding-BVR6pj7g.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CttYQBP_.js → connect-desktop-dialog-C36oc5qx.js} +1 -1
- package/dist/client/assets/{connection-card-zsKQnX7M.js → connection-card-BivO6xZW.js} +1 -1
- package/dist/client/assets/{connection-detail-u-TS1N7E.js → connection-detail-C2p0Da0R.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BBQix76t.js → connection-form-helpers-DwZUrlAb.js} +1 -1
- package/dist/client/assets/{connections-CDKaSrk-.js → connections-s19FoOwo.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Bp3qtF_q.js → decopilot-sse-pool-D-w_1YtE.js} +1 -1
- package/dist/client/assets/{dialog-DkT4Ri5Y.js → dialog-DxQvdITN.js} +1 -1
- package/dist/client/assets/{domain-settings-BFWHE9rM.js → domain-settings-B5LweR4o.js} +1 -1
- package/dist/client/assets/{drawer-CsLvjAFm.js → drawer-CNfA3KIJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Ckz_4tyn.js → dropdown-menu-C2vN6Rpm.js} +1 -1
- package/dist/client/assets/{empty-state-B1jCdJ6v.js → empty-state-nVSheSr6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-iRkA6j8O.js → extract-connection-data-Bxuhzn0T.js} +1 -1
- package/dist/client/assets/{file-explorer-DeYjEnVU.js → file-explorer-BKO8Jj7N.js} +1 -1
- package/dist/client/assets/{file-type-icon-CGnBXvlC.js → file-type-icon-D5fpjYZq.js} +1 -1
- package/dist/client/assets/{files-BQl4hGax.js → files-B1mljWs8.js} +1 -1
- package/dist/client/assets/{form-DaFgzcD-.js → form-CoRceVxS.js} +1 -1
- package/dist/client/assets/{general-r1yDnvRs.js → general-Beddi75C.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DNxMMrPO.js → github-repo-picker-BdX6D3p6.js} +1 -1
- package/dist/client/assets/{hooks-6n_u4oV8.js → hooks-BOhKu30y.js} +1 -1
- package/dist/client/assets/{index-BuoPGVgL.js → index-BO9Hevia.js} +1 -1
- package/dist/client/assets/{index-BBLmYI9u.js → index-BR0Yqw31.js} +5 -5
- package/dist/client/assets/{index-Dva6I2-Y.js → index-BRihgZSz.js} +1 -1
- package/dist/client/assets/{index-zpcYg8ov.js → index-B_5W8tS7.js} +1 -1
- package/dist/client/assets/{index-D85wAsnN.js → index-BdB0-mc7.js} +1 -1
- package/dist/client/assets/{index-BgmdlU4F.js → index-CiHrAREJ.js} +1 -1
- package/dist/client/assets/{index-0RYeOBGJ.js → index-Cr9gkShU.js} +1 -1
- package/dist/client/assets/{index-_JTFwd45.js → index-CvtPd3a5.js} +1 -1
- package/dist/client/assets/{index-CakKlCqQ.js → index-D7H-Zqlm.js} +1 -1
- package/dist/client/assets/{index-BLUPWNvZ.js → index-DOicEOta.js} +1 -1
- package/dist/client/assets/{index-BzYr87l3.js → index-DXno44IN.js} +1 -1
- package/dist/client/assets/{index-CR0OxjC9.js → index-DsI3m_cs.js} +1 -1
- package/dist/client/assets/{index-DMCDP9dR.js → index-DuI6qUBo.js} +4 -4
- package/dist/client/assets/{index-OHGOt-QL.js → index-Dx3YuE09.js} +1 -1
- package/dist/client/assets/{index-redirect-BdktlaC9.js → index-redirect-DWv4Rxio.js} +1 -1
- package/dist/client/assets/{input-Bv-zBVyU.js → input-D8r9SiG8.js} +1 -1
- package/dist/client/assets/{integration-icon-DQZa3sYE.js → integration-icon-BNznCqNa.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DXZ80KCM.js → invite-member-dialog-CZuO9DkP.js} +1 -1
- package/dist/client/assets/{label-o5nMOYcO.js → label-ktZlA-3q.js} +1 -1
- package/dist/client/assets/{layout-Ct-NSkaZ.js → layout-4E87TPwG.js} +1 -1
- package/dist/client/assets/{login-BNYF44OS.js → login-Cm8GkiHX.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C_medu58.js → mcp-oauth-BuD_EvoC.js} +1 -1
- package/dist/client/assets/{members-C9_M5PqO.js → members-CuJBucCp.js} +1 -1
- package/dist/client/assets/{monaco-editor-tFbpBjhS.js → monaco-editor-CaLHrNTN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DeM-N2J5.js → monitoring-stats-row-BgpNU0G7.js} +1 -1
- package/dist/client/assets/{oauth-callback-BeTVZqoU.js → oauth-callback-CwEPmcwH.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DU9kvW_X.js → oauth-callback-ai-provider-DKsxy6-c.js} +1 -1
- package/dist/client/assets/{onboarding-BXkj_1d1.js → onboarding-CKfSHm1_.js} +1 -1
- package/dist/client/assets/{org-install-C5Q_lrGd.js → org-install-DfXw6QRO.js} +1 -1
- package/dist/client/assets/{org-layout-LSJ3O2qD.js → org-layout-BsV94VGW.js} +1 -1
- package/dist/client/assets/{organization-choice-kI0WcHW4.js → organization-choice-1Ij928lq.js} +1 -1
- package/dist/client/assets/{orgs-AtEz89cn.js → orgs-AyNJqLGP.js} +1 -1
- package/dist/client/assets/{page-seo-form-B3JcFei-.js → page-seo-form-BZpSs51Z.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BIeKx3S2.js +1 -0
- package/dist/client/assets/{popover-DScORrBz.js → popover-Ce43bTlD.js} +1 -1
- package/dist/client/assets/{post-editor-CtABAPyS.js → post-editor-BY1omiLf.js} +1 -1
- package/dist/client/assets/{primitives-2aKpJLl6.js → primitives-gBlKGuG4.js} +1 -1
- package/dist/client/assets/{profile-B5fhF0J5.js → profile-dFE71gEt.js} +1 -1
- package/dist/client/assets/project-app-view-uQLwctUx.js +1 -0
- package/dist/client/assets/record-editor-CRRuigi1.js +1 -0
- package/dist/client/assets/registry-CmUz8SCB.js +2 -0
- package/dist/client/assets/{registry-layout-C6j571Mp.js → registry-layout-BUzRCc7G.js} +1 -1
- package/dist/client/assets/{require-capability-CpBEjv6M.js → require-capability-B5tqgEzh.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BllY9X0X.js → required-auth-layout-DrsZ7HS3.js} +1 -1
- package/dist/client/assets/{reset-password-DkiqmSgp.js → reset-password-DiwmNr_V.js} +1 -1
- package/dist/client/assets/{roles-DJxIZBSn.js → roles-B4Sx0CLR.js} +1 -1
- package/dist/client/assets/{search-input-BdjHYcO9.js → search-input-BUKn25zI.js} +1 -1
- package/dist/client/assets/{secrets-BG5x9RsU.js → secrets-B6AQi-Nh.js} +1 -1
- package/dist/client/assets/{sections-editor-N4FsFHJ4.js → sections-editor-CvZbhHFx.js} +1 -1
- package/dist/client/assets/{select-DX7cJPSR.js → select-BfpBvDKg.js} +1 -1
- package/dist/client/assets/{select-model-DeqZghIM.js → select-model-CgnHk-ia.js} +1 -1
- package/dist/client/assets/{seo-editor-OsNm8ZRU.js → seo-editor-CW28hs1W.js} +1 -1
- package/dist/client/assets/{settings-layout-DQClMbGM.js → settings-layout-CjljThco.js} +1 -1
- package/dist/client/assets/{settings-section-DG4UePho.js → settings-section-CKG82YJC.js} +1 -1
- package/dist/client/assets/{shell-controls-CPfTsUc0.js → shell-controls-Hk_yBC-u.js} +1 -1
- package/dist/client/assets/{shell-layout-CKAEuy11.js → shell-layout-CpO6E-od.js} +1 -1
- package/dist/client/assets/{sidebar-CQ6X6EgL.js → sidebar-CsVMUuM7.js} +1 -1
- package/dist/client/assets/{skeleton-B1SkUhzL.js → skeleton-BXLZYTrJ.js} +1 -1
- package/dist/client/assets/{sso-DKGtOmgQ.js → sso-CXuvSRA6.js} +1 -1
- package/dist/client/assets/{store-Oz22e-Wi.js → store-BhvYQ06K.js} +1 -1
- package/dist/client/assets/store-registry-D-jrmhro.js +2 -0
- package/dist/client/assets/{studio-tools-O1wqkKr7.js → studio-tools-CuY4OQpA.js} +1 -1
- package/dist/client/assets/{switch-B4AE76uJ.js → switch-DKdo2nAR.js} +1 -1
- package/dist/client/assets/{table-D94_WLHm.js → table-pEM7pAK2.js} +1 -1
- package/dist/client/assets/{tabs-BdsrY0VQ.js → tabs-BCz0Z9TG.js} +1 -1
- package/dist/client/assets/{textarea-D5bA0vwh.js → textarea-CU2EIOX-.js} +1 -1
- package/dist/client/assets/{toggle-group-f2RgMq4W.js → toggle-group-CmOVDav0.js} +1 -1
- package/dist/client/assets/{toolbar-CnGwQIGK.js → toolbar-BK4LqNTU.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DV30tB3z.js → toolbar-icon-button-C15UediM.js} +1 -1
- package/dist/client/assets/{tools-list-BZtd6vTC.js → tools-list-GQ3_3cis.js} +1 -1
- package/dist/client/assets/{tooltip-C-Fdi799.js → tooltip-ByorVsZd.js} +1 -1
- package/dist/client/assets/{types-BGdz0DTZ.js → types-Bb9XA7Pb.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DnQtGTlK.js → use-ai-providers-CpOFHGzE.js} +1 -1
- package/dist/client/assets/{use-automations-CLvdnni4.js → use-automations-DXxlVhTG.js} +1 -1
- package/dist/client/assets/{use-capability-DyEmup-l.js → use-capability-CieeOsJ8.js} +1 -1
- package/dist/client/assets/{use-clock-tick-r41I52rR.js → use-clock-tick-Cg2dSAvr.js} +1 -1
- package/dist/client/assets/{use-collections-B4CZte7v.js → use-collections-o7IatjEU.js} +1 -1
- package/dist/client/assets/{use-connection-C9S1yRy-.js → use-connection-B3adsftB.js} +1 -1
- package/dist/client/assets/{use-copy-Dtp5QKkh.js → use-copy-DGksfn3E.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-bFBi_I94.js → use-create-virtual-mcp-Dn-TaEOg.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B_MytNzA.js → use-debounced-autosave-V_BXvYmF.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D5S2o6mL.js → use-debounced-value-7xfbdv4I.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-X4WShNfU.js → use-decopilot-events-CXG9hYPv.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B6yuL_jT.js → use-delete-connection-B3mPboz5.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DOqhSJ2E.js → use-deployment-admin-CC5sAqXx.js} +1 -1
- package/dist/client/assets/{use-file-configs-i-DgXdKu.js → use-file-configs-ChSphFuc.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C10ycd3E.js → use-infinite-scroll-Bx3lv-LT.js} +1 -1
- package/dist/client/assets/{use-join-requests-C9k3gHqE.js → use-join-requests-lCKrNhGM.js} +1 -1
- package/dist/client/assets/{use-mcp-client-xyqZgz7w.js → use-mcp-client-Cc1tR4pR.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-rcTAN3zC.js → use-mcp-prompts-BZ0jWMJY.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BY1xI7T1.js → use-mcp-tools-DngKfEVe.js} +1 -1
- package/dist/client/assets/{use-members-BLAy8O_e.js → use-members-CErV9rwc.js} +1 -1
- package/dist/client/assets/{use-mobile-8PCzv3Mi.js → use-mobile-Ck6pl1LJ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DFHenM1Y.js → use-navigate-to-agent-tg_N_p3F.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dapr-HwO.js → use-org-auth-client-DlnWTYmQ.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bi4sTov0.js → use-org-sso-BLK3o8Sw.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bf_z3Rj3.js → use-organization-roles-DgQQY_cX.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DTNEfKpa.js → use-organization-settings-WaVUdoYp.js} +1 -1
- package/dist/client/assets/{use-registry-connections-B9ry2u5e.js → use-registry-connections-Z-9u-p4o.js} +1 -1
- package/dist/client/assets/{use-secrets-CufX7ryc.js → use-secrets-B20uHD1c.js} +1 -1
- package/dist/client/assets/{use-status-sounds-83cWEknM.js → use-status-sounds-CEz9OnoC.js} +1 -1
- package/dist/client/assets/{use-view-mode-CSOFCgi9.js → use-view-mode-BglxVIO2.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DNIEk3-8.js → use-virtual-mcp-CZqgpvZG.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-HwypSYRi.js +1 -0
- package/dist/client/assets/{useRouterState-Bir8csze.js → useRouterState-C_7zbU8L.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CeaGggHy.js +1 -0
- package/dist/client/assets/{users-D5_kLsNp.js → users-ZIrmq_sf.js} +1 -1
- package/dist/client/assets/{variant-calendar-FGtc7tCa.js → variant-calendar-5u-NR6iw.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BnUQvisV.js → view-mode-toggle-BOrLCUya.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-JexZxptV.js +0 -1
- package/dist/client/assets/project-app-view-DpI2GgkU.js +0 -1
- package/dist/client/assets/record-editor-BQRaFuNl.js +0 -1
- package/dist/client/assets/registry-BZL70RtY.js +0 -2
- package/dist/client/assets/store-registry-DH3yKhz-.js +0 -2
- package/dist/client/assets/useInfiniteQuery-KvXcQTyz.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CNDc5W3G.js +0 -1
package/dist/client/assets/{agent-capabilities-DlIlOn9g.js → agent-capabilities-CXYfOpBR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as ke,a as en,Z as un,M as mn,J as pn,j as e,B as J,t as X,r as le,n as hn,b as fn,i as Se,R as C,K as pe,c as xn,_ as gn,Y as jn,l as vn,m as yn}from"./index-DMCDP9dR.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Le}from"./connection-card-zsKQnX7M.js";import{C as bn}from"./collection-search-COWX-zrS.js";import{C as Nn}from"./collection-tabs-CJs3t0kZ.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-iRkA6j8O.js";import{e as sn,d as on,D as an,a as cn,f as An,c as Dn}from"./dialog-DkT4Ri5Y.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Mn,e as Bn,f as On}from"./drawer-CsLvjAFm.js";import{u as Ln}from"./use-mobile-8PCzv3Mi.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-DaFgzcD-.js";import{I as Y}from"./input-Bv-zBVyU.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-DX7cJPSR.js";import{T as Kn}from"./textarea-D5bA0vwh.js";import{b as rn}from"./use-connection-C9S1yRy-.js";import{n as Ie,c as Re}from"./XCircle-CowkXBTi.js";import{s as $e}from"./Star01-D1xnxtGT.js";import{an as Hn}from"./agent-icon-DiJCyVK_.js";import{s as Un}from"./XClose-B9_O9ZwX.js";import{c as Xn,i as Ne,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-BBQix76t.js";import{u as Ye}from"./use-infinite-scroll-C10ycd3E.js";import{a as Ee}from"./authenticate-and-persist-oauth-uQHwVym9.js";import{B as we}from"./badge-DK3Lxhxf.js";import{T as ze,a as Ke,b as He}from"./tooltip-C-Fdi799.js";import{u as Yn}from"./useSuspenseInfiniteQuery-CNDc5W3G.js";import{u as Jn}from"./use-mcp-client-xyqZgz7w.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-C_CIFiKi.js";import{s as et}from"./Plus-D63gaaHA.js";import{u as nt}from"./studio-tools-O1wqkKr7.js";import{u as tt}from"./use-ai-providers-DnQtGTlK.js";function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Ln(),z=rn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),c=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,r=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!r&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Gn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,r=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",r=t.connection_token||null);const N=wn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:r,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Type *"}),e.jsxs(Rn,{value:t.value,onValueChange:t.onChange,children:[e.jsx($,{children:e.jsx($n,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(E,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"NPM Package *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),c(a))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Command *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Arguments"}),e.jsx($,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Working Directory"}),e.jsx($,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(E,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Environment Variables"}),e.jsx($,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(E,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"URL *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),c(a))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:x?.token?.label??"Token (optional)"}),e.jsx($,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Name *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Description"}),e.jsx($,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(E,{})]})})]});return D?e.jsx(Pn,{open:s,onOpenChange:K,children:e.jsxs(Tn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Vn,{children:k}),e.jsx(Mn,{className:"mt-1",children:H})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(On,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(cn,{children:k}),e.jsx(An,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(Dn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=xn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),c=le.useDeferredValue(y),K=y!==c;let b;n[0]!==c?(b=c.trim().toLowerCase(),n[0]=c,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=gn(jn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const r=Jn(a),j=c?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(r,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await r.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),xe=nn(),G=tn(xe,c),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),re=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=_n(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),re?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:re.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:re.id,app_name:A.app_name??null,mode:"existing"}),S(re.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,be=p?.official===!0,re=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&re&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Re,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let ce;n[61]!==ee||n[62]!==ae||n[63]!==ie?(ce=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=ce):ce=n[64];let Ce;return n[65]!==Z||n[66]!==ce?(Ce=e.jsxs(e.Fragment,{children:[Z,ce]}),n[65]=Z,n[66]=ce,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function ct(s){return s.app_name}function rt(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Kt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,r,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:r,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:c}=ke(),{data:K}=en.useSession(),b=rn(),k=hn(),H=fn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const r=a.queryKey;return r[1]===c.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Ee({connectionId:v,orgId:c.id,orgSlug:c.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${c.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(r){console.error("Failed to add connection:",r),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!c||!K?.user?.id)){o(a.id);try{const r=In(a,c.id,K.user.id,{remoteIndex:0}),j=r.connection_type==="STDIO",N=!!r.connection_url,v=j&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(r),w=await Ee({connectionId:u,orgId:c.id,orgSlug:c.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,r.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${c.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,r.app_name??null,"new"),l(u)}catch(r){console.error("Failed to connect:",r),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(cn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(bn,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const r=await Ee({connectionId:a,orgId:c.id,orgSlug:c.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(r.ran&&!r.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:r.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(r.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${c.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Ht(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(c=>c.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const c=Ze.get(s.id);P.current.get(s.id)&&c!=null&&l>c&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-c,previous_balance_cents:c,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(c=>c.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Ut(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Xt(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function qt(s){return Ue(s).status==="attached"}function Gt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Wt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}export{Kt as A,Qt as a,Xt as b,qt as c,Gt as d,Wt as f,Ut as g,Ue as r,Ht as u};
|
|
1
|
+
import{a1 as ke,a as en,Z as un,M as mn,J as pn,j as e,B as J,t as X,r as le,n as hn,b as fn,i as Se,R as C,K as pe,c as xn,_ as gn,Y as jn,l as vn,m as yn}from"./index-DuI6qUBo.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Le}from"./connection-card-BivO6xZW.js";import{C as bn}from"./collection-search-BScFeR4z.js";import{C as Nn}from"./collection-tabs-ucCXcFf-.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-Bxuhzn0T.js";import{e as sn,d as on,D as an,a as cn,f as An,c as Dn}from"./dialog-DxQvdITN.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Mn,e as Bn,f as On}from"./drawer-CNfA3KIJ.js";import{u as Ln}from"./use-mobile-Ck6pl1LJ.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-CoRceVxS.js";import{I as Y}from"./input-D8r9SiG8.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-BfpBvDKg.js";import{T as Kn}from"./textarea-CU2EIOX-.js";import{b as rn}from"./use-connection-B3adsftB.js";import{n as Ie,c as Re}from"./XCircle-CCQBu_cy.js";import{s as $e}from"./Star01-W1tdM4gC.js";import{an as Hn}from"./agent-icon-F1uYvxya.js";import{s as Un}from"./XClose-B_EYq-aZ.js";import{c as Xn,i as Ne,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-DwZUrlAb.js";import{u as Ye}from"./use-infinite-scroll-Bx3lv-LT.js";import{a as Ee}from"./authenticate-and-persist-oauth-lTHNTsnJ.js";import{B as we}from"./badge-DynU_nuJ.js";import{T as ze,a as Ke,b as He}from"./tooltip-ByorVsZd.js";import{u as Yn}from"./useSuspenseInfiniteQuery-CeaGggHy.js";import{u as Jn}from"./use-mcp-client-Cc1tR4pR.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-j1sieYgz.js";import{s as et}from"./Plus-t7OB5b7L.js";import{u as nt}from"./studio-tools-CuY4OQpA.js";import{u as tt}from"./use-ai-providers-CpOFHGzE.js";function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Ln(),z=rn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),c=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,r=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!r&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Gn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,r=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",r=t.connection_token||null);const N=wn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:r,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Type *"}),e.jsxs(Rn,{value:t.value,onValueChange:t.onChange,children:[e.jsx($,{children:e.jsx($n,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(E,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"NPM Package *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),c(a))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Command *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Arguments"}),e.jsx($,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Working Directory"}),e.jsx($,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(E,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Environment Variables"}),e.jsx($,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(E,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"URL *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),c(a))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:x?.token?.label??"Token (optional)"}),e.jsx($,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Name *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Description"}),e.jsx($,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(E,{})]})})]});return D?e.jsx(Pn,{open:s,onOpenChange:K,children:e.jsxs(Tn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Vn,{children:k}),e.jsx(Mn,{className:"mt-1",children:H})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(On,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(cn,{children:k}),e.jsx(An,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(Dn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=xn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),c=le.useDeferredValue(y),K=y!==c;let b;n[0]!==c?(b=c.trim().toLowerCase(),n[0]=c,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=gn(jn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const r=Jn(a),j=c?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(r,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await r.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),xe=nn(),G=tn(xe,c),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),re=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=_n(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),re?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:re.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:re.id,app_name:A.app_name??null,mode:"existing"}),S(re.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,be=p?.official===!0,re=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&re&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Re,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let ce;n[61]!==ee||n[62]!==ae||n[63]!==ie?(ce=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=ce):ce=n[64];let Ce;return n[65]!==Z||n[66]!==ce?(Ce=e.jsxs(e.Fragment,{children:[Z,ce]}),n[65]=Z,n[66]=ce,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function ct(s){return s.app_name}function rt(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Kt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,r,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:r,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:c}=ke(),{data:K}=en.useSession(),b=rn(),k=hn(),H=fn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const r=a.queryKey;return r[1]===c.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Ee({connectionId:v,orgId:c.id,orgSlug:c.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${c.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(r){console.error("Failed to add connection:",r),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!c||!K?.user?.id)){o(a.id);try{const r=In(a,c.id,K.user.id,{remoteIndex:0}),j=r.connection_type==="STDIO",N=!!r.connection_url,v=j&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(r),w=await Ee({connectionId:u,orgId:c.id,orgSlug:c.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,r.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${c.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,r.app_name??null,"new"),l(u)}catch(r){console.error("Failed to connect:",r),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(cn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(bn,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const r=await Ee({connectionId:a,orgId:c.id,orgSlug:c.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(r.ran&&!r.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:r.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(r.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${c.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Ht(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(c=>c.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const c=Ze.get(s.id);P.current.get(s.id)&&c!=null&&l>c&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-c,previous_balance_cents:c,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(c=>c.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Ut(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Xt(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function qt(s){return Ue(s).status==="attached"}function Gt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Wt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}export{Kt as A,Qt as a,Xt as b,qt as c,Gt as d,Wt as f,Ut as g,Ue as r,Ht as u};
|