decocms 4.52.6 → 4.52.7
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-BlTQrAUx.js → AlertCircle-Z76_4mhf.js} +1 -1
- package/dist/client/assets/{ArrowUp-DpuiSxID.js → ArrowUp-aRKoCc3b.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-ne8zJLZb.js → ArrowUpRight-D-q_B7f3.js} +1 -1
- package/dist/client/assets/{Check-D28BfEB1.js → Check-DYBiSR01.js} +1 -1
- package/dist/client/assets/{CheckCircle-CnhcCZIe.js → CheckCircle-D2xSH-LX.js} +1 -1
- package/dist/client/assets/{ChevronDown-DqCNzb4a.js → ChevronDown-CD5-GX6s.js} +1 -1
- package/dist/client/assets/{ChevronRight-BNGNshmx.js → ChevronRight-CbKKKp3L.js} +1 -1
- package/dist/client/assets/{ChevronUp-Do8smBb7.js → ChevronUp-3N4uo8EA.js} +1 -1
- package/dist/client/assets/{Circle-C7wp7zZU.js → Circle-DYl9dR3Y.js} +1 -1
- package/dist/client/assets/{Copy01-GjE5bmFk.js → Copy01-b0k2Zyy9.js} +1 -1
- package/dist/client/assets/{DotsVertical-CINLmKy9.js → DotsVertical-BN-yEAxf.js} +1 -1
- package/dist/client/assets/{Eye-DFo4Dnbd.js → Eye-CgQlYLMh.js} +1 -1
- package/dist/client/assets/{FilterLines-DzEYfG7I.js → FilterLines-B6vzvSpK.js} +1 -1
- package/dist/client/assets/{Globe01-BIPqwmTC.js → Globe01-FwL4FAZ8.js} +1 -1
- package/dist/client/assets/{Globe04-DkHVV6y2.js → Globe04-DSTkeFGF.js} +1 -1
- package/dist/client/assets/{HardDrive-BKuWwTHA.js → HardDrive-BYK-e-zK.js} +1 -1
- package/dist/client/assets/{Key01-D3HAKb2E.js → Key01-CyfLyx4d.js} +1 -1
- package/dist/client/assets/{LayoutLeft-wkDDcHhV.js → LayoutLeft-M04Iey-z.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B1dNfzLJ.js → LinkExternal01-DecAjgEQ.js} +1 -1
- package/dist/client/assets/{List-BFicQcIc.js → List-BK-xPZjK.js} +1 -1
- package/dist/client/assets/{Loading02-Sg50UtXT.js → Loading02-D5PjBzIX.js} +1 -1
- package/dist/client/assets/{Monitor01-BHFXrcgv.js → Monitor01-BQMNhq2R.js} +1 -1
- package/dist/client/assets/{Palette-CPbTdri0.js → Palette-DEcjz9KI.js} +1 -1
- package/dist/client/assets/{Play-BP96lBXK.js → Play-Djef9fjL.js} +1 -1
- package/dist/client/assets/{Plus-BqrnsdiG.js → Plus-D4PJkd-R.js} +1 -1
- package/dist/client/assets/{SearchLg-DI38yTv5.js → SearchLg-BGZqxKr6.js} +1 -1
- package/dist/client/assets/{SearchMd-XirgmyTe.js → SearchMd-DrTyvX9O.js} +1 -1
- package/dist/client/assets/{Settings02-Xl57VOKC.js → Settings02-CEk5Brj1.js} +1 -1
- package/dist/client/assets/{Shield01-uabH8nO2.js → Shield01-C7velNqU.js} +1 -1
- package/dist/client/assets/{Star01-DtZ0ghma.js → Star01-Bo9r20Eg.js} +1 -1
- package/dist/client/assets/{Stars01-DcaHVUG2.js → Stars01-Bd6ySeZC.js} +1 -1
- package/dist/client/assets/{Stars02-CbqvwchJ.js → Stars02-S3u9Q3QN.js} +1 -1
- package/dist/client/assets/{Sun-DwF07tm8.js → Sun-Bk3tE6qc.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B7VRbczk.js → SwitchHorizontal01-Gi0kDTsz.js} +1 -1
- package/dist/client/assets/{Tool01-2lyf39kD.js → Tool01-BpjKzNyZ.js} +1 -1
- package/dist/client/assets/{Trash01-DNLH3J0P.js → Trash01-r6ZF1ETa.js} +1 -1
- package/dist/client/assets/{Upload01-Gb1NEP5r.js → Upload01-SLxuMTpH.js} +1 -1
- package/dist/client/assets/{User01-AXTrWOcP.js → User01-DJGvcRT3.js} +1 -1
- package/dist/client/assets/{Users01-CrOstQpF.js → Users01-Yr057jRL.js} +1 -1
- package/dist/client/assets/{Users03-BN-7AqNs.js → Users03-ov9aL2lm.js} +1 -1
- package/dist/client/assets/{X-DfR1J7dY.js → X-B-YjAdI5.js} +1 -1
- package/dist/client/assets/{XCircle-BGJtmHGv.js → XCircle-CobTKsAs.js} +1 -1
- package/dist/client/assets/{XClose-BMKEpE7Z.js → XClose-CX2p9Cmv.js} +1 -1
- package/dist/client/assets/{Zap-BZbfGrZz.js → Zap-COmoUqmY.js} +1 -1
- package/dist/client/assets/{ZapSquare-Ddge8-yR.js → ZapSquare-B4VDM8_O.js} +1 -1
- package/dist/client/assets/{ZoomOut-BkDFlQRi.js → ZoomOut-DoPS1JXR.js} +1 -1
- package/dist/client/assets/{access-gate-Ei1UV66F.js → access-gate-C07_wF1g.js} +1 -1
- package/dist/client/assets/{add-section-modal-B-jf_NXT.js → add-section-modal-DXAJr7ga.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CzE_X9Uw.js → agent-capabilities-Coo9ZnBO.js} +1 -1
- package/dist/client/assets/{agent-icon-B6-TAR8b.js → agent-icon-BM5dFRES.js} +1 -1
- package/dist/client/assets/{agents-list-BPv-woc9.js → agents-list-B5mP6heH.js} +1 -1
- package/dist/client/assets/{ai-providers-CrGJyJTE.js → ai-providers-hVe_0-AF.js} +1 -1
- package/dist/client/assets/{alert-inUFpTEG.js → alert-Cp9e-94k.js} +1 -1
- package/dist/client/assets/{alert-dialog-qj-vP1Xw.js → alert-dialog-De9OLvDj.js} +1 -1
- package/dist/client/assets/{app-editor-DN0jZDwe.js → app-editor-DR1dvesh.js} +1 -1
- package/dist/client/assets/{auth-DdYyaEve.js → auth-DRrEnjLD.js} +1 -1
- package/dist/client/assets/{auth-catchall-DTUGS4qK.js → auth-catchall-DXU0UQ4y.js} +1 -1
- package/dist/client/assets/{auth-entry-DgXaDBLj.js → auth-entry-B8RUL24y.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DxnAkz0N.js → auth-split-layout-DclSZpSa.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bv7jHOsm.js → authenticate-and-persist-oauth-CbuK31S6.js} +1 -1
- package/dist/client/assets/{automation-list-row-b3rqub2H.js → automation-list-row-Dm0_92CE.js} +1 -1
- package/dist/client/assets/{automation-runs-uJ_80pP0.js → automation-runs-VwSb6TNW.js} +1 -1
- package/dist/client/assets/automations-D5Xth7bD.js +1 -0
- package/dist/client/assets/{autosend-Bu4g4Z8M.js → autosend-vyn79IEF.js} +1 -1
- package/dist/client/assets/{avatar-Cpw6Acnj.js → avatar-Do8ze6Cq.js} +1 -1
- package/dist/client/assets/{badge-DcoHUjVX.js → badge-Cu4iVz3w.js} +1 -1
- package/dist/client/assets/{block-document-C0CuhFZ0.js → block-document-C5bOp-U8.js} +1 -1
- package/dist/client/assets/{brand-context-Chh3IsjC.js → brand-context-DwSAMj_C.js} +1 -1
- package/dist/client/assets/{breadcrumb-D2NZgYdy.js → breadcrumb-D3l7Fa44.js} +1 -1
- package/dist/client/assets/{buckets-BJA3ZlxS.js → buckets-BOXRupAE.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DVgMEF5S.js → bulk-category-panel-DLihcGph.js} +1 -1
- package/dist/client/assets/{calendar-DD7O6cSW.js → calendar-BeNH9VBo.js} +1 -1
- package/dist/client/assets/{capability-load-error-B7V9Pb0E.js → capability-load-error-iFoQqDs0.js} +1 -1
- package/dist/client/assets/{card-DDeVKuw8.js → card-7tWAb7jO.js} +1 -1
- package/dist/client/assets/{category-editor-CFDS-p_z.js → category-editor-DlBvRUbP.js} +1 -1
- package/dist/client/assets/{chat-context-B4fQ7mPe.js → chat-context-8v3Ejxpp.js} +1 -1
- package/dist/client/assets/{checkbox-BamYccAV.js → checkbox-CjZk9QfG.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C8ormgoB.js → cli-auth-success-aLHILU3K.js} +1 -1
- package/dist/client/assets/{collection-detail-BnIxeH49.js → collection-detail-BRE5JywX.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dk-WJjlA.js → collection-display-button-bEbcM3AY.js} +1 -1
- package/dist/client/assets/{collection-search-BzCL0B5a.js → collection-search-CazZrA4S.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CUYz4pjm.js → collection-table-wrapper-BTeNXLuV.js} +1 -1
- package/dist/client/assets/{collection-tabs-DYFbE-Kc.js → collection-tabs-CadMPVWp.js} +1 -1
- package/dist/client/assets/{command-BbRXFGct.js → command-AIg3IjAF.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-KNlce4XY.js → commerce-onboarding-0kFiAbN_.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BI6DOzmR.js → connect-desktop-dialog-Ce9xtA0V.js} +1 -1
- package/dist/client/assets/{connection-card-BLcbVcvx.js → connection-card-BuAEa3vF.js} +1 -1
- package/dist/client/assets/{connection-detail-CFC99FCT.js → connection-detail-DK5ZWwqh.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BvBY9Yla.js → connection-form-helpers-D23mTJCc.js} +1 -1
- package/dist/client/assets/{connections-CPy6AKXd.js → connections-UaU35Js_.js} +1 -1
- package/dist/client/assets/constants-Qo1EtbpN.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-ClBvxCP2.js → decopilot-sse-pool-fPt7d7UQ.js} +1 -1
- package/dist/client/assets/{dialog-BTb4esky.js → dialog-C1ZYdrM_.js} +1 -1
- package/dist/client/assets/{domain-settings-tIeGDLqG.js → domain-settings-BXbI0h2R.js} +1 -1
- package/dist/client/assets/{drawer-D14Ovhrh.js → drawer-CxIrpUwC.js} +1 -1
- package/dist/client/assets/{dropdown-menu-SmNEFBf4.js → dropdown-menu-IyhiC991.js} +1 -1
- package/dist/client/assets/{empty-state-D5eg0Ekg.js → empty-state-iTpimgvf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BXgOYn9p.js → extract-connection-data-BghnrxSR.js} +1 -1
- package/dist/client/assets/{file-explorer-C1Vu2D1F.js → file-explorer-K2gDqsBN.js} +1 -1
- package/dist/client/assets/{file-type-icon-ChsHZMhl.js → file-type-icon-B-RKaGR8.js} +1 -1
- package/dist/client/assets/{files-CpRDCGGm.js → files-vgYLaRlM.js} +1 -1
- package/dist/client/assets/{form-D6qYMM5j.js → form-C1d0lXPp.js} +1 -1
- package/dist/client/assets/{general-B2HTw0at.js → general-C4JcEbFP.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BsBIpoO4.js → github-repo-picker-CqIWabV3.js} +1 -1
- package/dist/client/assets/{hooks-ByUZfhan.js → hooks-B63IieG9.js} +1 -1
- package/dist/client/assets/{index-Cb_FMCND.js → index-B4qHsUCn.js} +1 -1
- package/dist/client/assets/{index-B2V2RzUj.js → index-BRvlHRLv.js} +1 -1
- package/dist/client/assets/{index-CuL5XW3a.js → index-Bys5GPnv.js} +1 -1
- package/dist/client/assets/{index-DqOwfosp.js → index-C7l0OGwE.js} +1 -1
- package/dist/client/assets/{index-p1_K7G6L.js → index-CT8ozgUC.js} +1 -1
- package/dist/client/assets/{index-D8qrDos_.js → index-CvR7ldzG.js} +5 -5
- package/dist/client/assets/{index-u8apxmFf.js → index-DQLeuAMl.js} +1 -1
- package/dist/client/assets/{index-DXDnUT8n.js → index-DUhDER3T.js} +1 -1
- package/dist/client/assets/{index-BPEAUAJf.js → index-DVrPZqo9.js} +1 -1
- package/dist/client/assets/{index-DDuXmgwg.js → index-hdqj6gDr.js} +3 -3
- package/dist/client/assets/{index-CO5rlcT8.js → index-moB5T8Ym.js} +1 -1
- package/dist/client/assets/{index-BJfMtg1E.js → index-oclCbikb.js} +1 -1
- package/dist/client/assets/{index-C5x5WzEt.js → index-piwpE37X.js} +1 -1
- package/dist/client/assets/{index-Ccy85ebA.js → index-qjaB7Yba.js} +1 -1
- package/dist/client/assets/{index-redirect-DHwuSpKW.js → index-redirect-h7Q0LilS.js} +1 -1
- package/dist/client/assets/{input-OqFnO0t3.js → input-Ya0Cut-i.js} +1 -1
- package/dist/client/assets/{integration-icon-D25b2rEC.js → integration-icon-CkkRY8io.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CuxGnfGQ.js → invite-member-dialog-Cu8IcMqH.js} +1 -1
- package/dist/client/assets/{label-KbZi4HAa.js → label-DSr68VsA.js} +1 -1
- package/dist/client/assets/{layout-agTgNdE4.js → layout-CoErgCsZ.js} +1 -1
- package/dist/client/assets/{login-CV625viC.js → login-DKCUXdkT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-TsnWEE5L.js → mcp-oauth-DlF62GEq.js} +1 -1
- package/dist/client/assets/{members-BOtk32Cf.js → members-BRZHQ4uD.js} +1 -1
- package/dist/client/assets/{monaco-editor-Cnmp4Vp_.js → monaco-editor-DbcjdnbV.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-tTWIayzg.js → monitoring-stats-row-CYZW88p_.js} +1 -1
- package/dist/client/assets/{oauth-callback-0jUP45q0.js → oauth-callback-NH8UTZ02.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cm0tJPEa.js → oauth-callback-ai-provider-CVr_EGnH.js} +1 -1
- package/dist/client/assets/{onboarding-Cd4SSMQD.js → onboarding-DmskeKqF.js} +1 -1
- package/dist/client/assets/{org-install-C6lfBveX.js → org-install-aV2JEagS.js} +1 -1
- package/dist/client/assets/{org-layout-Ce4jBYBu.js → org-layout-BLRzhHWg.js} +1 -1
- package/dist/client/assets/{organization-choice-BqA-o3hU.js → organization-choice-aviShgM6.js} +1 -1
- package/dist/client/assets/{orgs-fmiBSVdJ.js → orgs-B1wjmmUv.js} +1 -1
- package/dist/client/assets/{page-seo-form-Dn2WFppZ.js → page-seo-form-DeAPDgiW.js} +1 -1
- package/dist/client/assets/page-seo-sheet-77VP8U61.js +1 -0
- package/dist/client/assets/{popover-qIyNogtE.js → popover-D3uVDawG.js} +1 -1
- package/dist/client/assets/{post-editor-tb7EGuAD.js → post-editor-Dwbk57jZ.js} +1 -1
- package/dist/client/assets/{primitives-CPs7b-va.js → primitives-BDnW6FNQ.js} +1 -1
- package/dist/client/assets/{profile-CzWF882c.js → profile-CSKF3VcG.js} +1 -1
- package/dist/client/assets/project-app-view-BH3AeMTI.js +1 -0
- package/dist/client/assets/record-editor-BikcRal9.js +1 -0
- package/dist/client/assets/registry-C2M_sLFC.js +2 -0
- package/dist/client/assets/{registry-layout-H5sC_Wuz.js → registry-layout-FWvLN3HQ.js} +1 -1
- package/dist/client/assets/{require-capability-Bd2RJdDL.js → require-capability-BUgWN2WW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-oH86Ttnl.js → required-auth-layout-GDqjemYz.js} +1 -1
- package/dist/client/assets/{reset-password-CAs2g4-i.js → reset-password-CCHH5elW.js} +1 -1
- package/dist/client/assets/{roles-DmY7HtBm.js → roles-BURnyvyd.js} +1 -1
- package/dist/client/assets/{search-input-BmvlJ1gH.js → search-input-Dvr24u8r.js} +1 -1
- package/dist/client/assets/{secrets-TOshk9x7.js → secrets-B22sTinJ.js} +1 -1
- package/dist/client/assets/{sections-editor-1ZSnEOf5.js → sections-editor-C6fnW7Dd.js} +1 -1
- package/dist/client/assets/{select-CxJqiNh7.js → select-BFkQzIig.js} +1 -1
- package/dist/client/assets/{select-model-DpIuhfGI.js → select-model-zIkXNw0p.js} +1 -1
- package/dist/client/assets/{seo-editor-D9nW0t1_.js → seo-editor-CVzNThMo.js} +1 -1
- package/dist/client/assets/{settings-layout-BRBebof8.js → settings-layout-BJUBgb0A.js} +1 -1
- package/dist/client/assets/{settings-section-2JMnwzFB.js → settings-section-D-IEi7l-.js} +1 -1
- package/dist/client/assets/{shell-controls-CZu11ZLx.js → shell-controls-CuCw58mZ.js} +1 -1
- package/dist/client/assets/{shell-layout-z9Vkzqeh.js → shell-layout-B0lLd-C4.js} +1 -1
- package/dist/client/assets/{sidebar-Ck6qPJMA.js → sidebar-DzR1ZsR9.js} +1 -1
- package/dist/client/assets/{skeleton-DTdqb8mw.js → skeleton-CtdNppOn.js} +1 -1
- package/dist/client/assets/{sso-AAF5wYAg.js → sso-Bpni4uqK.js} +1 -1
- package/dist/client/assets/{store-OKjq3sx0.js → store-C-FpRWTP.js} +1 -1
- package/dist/client/assets/store-registry-BO_cj7km.js +2 -0
- package/dist/client/assets/{studio-tools-BjlLuULI.js → studio-tools-8o4MOlCv.js} +1 -1
- package/dist/client/assets/{switch-nspHNmyu.js → switch-Dr2DkOoS.js} +1 -1
- package/dist/client/assets/{table-DF-rRxGR.js → table-Dtlu3Dqx.js} +1 -1
- package/dist/client/assets/{tabs-GJ-SaS_o.js → tabs-C20-Nqdy.js} +1 -1
- package/dist/client/assets/{textarea-DH8K4jmG.js → textarea-DEargMO8.js} +1 -1
- package/dist/client/assets/{toggle-group-CC2KN_ei.js → toggle-group-Cd3vddi5.js} +1 -1
- package/dist/client/assets/{toolbar-TNa0mj4z.js → toolbar--GyU6e02.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Dq7PrSOX.js → toolbar-icon-button-B596iZBf.js} +1 -1
- package/dist/client/assets/{tools-list-DLINWE78.js → tools-list-DQjvkdMq.js} +1 -1
- package/dist/client/assets/{tooltip-Baf77weG.js → tooltip-DLFYH37T.js} +1 -1
- package/dist/client/assets/{types-BKRYIAE8.js → types-jjNgdNol.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CL0Wp3m2.js → use-ai-providers-D4G3p_dj.js} +1 -1
- package/dist/client/assets/{use-automations-BDwv8Q1T.js → use-automations-BEEVKnEp.js} +1 -1
- package/dist/client/assets/{use-capability-Pl3B5pzT.js → use-capability-jeM4DzJw.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DaG0lRsU.js → use-clock-tick-BCpizHeo.js} +1 -1
- package/dist/client/assets/{use-collections-DqR-U5QW.js → use-collections-DX49PaDL.js} +1 -1
- package/dist/client/assets/{use-connection-BO9L0ZdL.js → use-connection-u3EMifcA.js} +1 -1
- package/dist/client/assets/{use-copy-B2xqTWMW.js → use-copy-CbCWh9v8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BBbxOWE7.js → use-create-virtual-mcp-0AtxFieS.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DLcmq1lj.js → use-debounced-autosave-Bb7ZWjRo.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BnLKsp86.js → use-debounced-value-Bq1Hiq9N.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-R4d4dckR.js → use-decopilot-events-BXBi6gMx.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B1_Ixqnp.js → use-delete-connection-CSrPE2ZR.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D6601s0f.js → use-deployment-admin-BOSWmQ5F.js} +1 -1
- package/dist/client/assets/{use-file-configs-BN8Gsut_.js → use-file-configs-DtS8PEej.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CtfwmD_R.js → use-infinite-scroll-5eF2WCfT.js} +1 -1
- package/dist/client/assets/{use-join-requests-CyMkR2Ay.js → use-join-requests-LK0sxGDj.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CkgqB40J.js → use-mcp-client-tuD2WObP.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CpWQiwNC.js → use-mcp-prompts-Cb3mRFxI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dr6eapMg.js → use-mcp-tools-DEr3SwVu.js} +1 -1
- package/dist/client/assets/{use-members-CfTIeBre.js → use-members-3L-Dz5S0.js} +1 -1
- package/dist/client/assets/{use-mobile-C3KxmSpp.js → use-mobile-MKYJ8vvW.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-ChwfSM50.js → use-navigate-to-agent-Dfw0rNBE.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CkUtNjZ-.js → use-org-auth-client-DLtDA1WA.js} +1 -1
- package/dist/client/assets/{use-org-sso-CZ4QAcgi.js → use-org-sso-BxRu5Zh4.js} +1 -1
- package/dist/client/assets/{use-organization-roles-dP9BhhlV.js → use-organization-roles-zsK1PTPN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-ZshCDK7F.js → use-organization-settings-CHU5z_60.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CVxKV0GZ.js → use-registry-connections-CaZCXKUl.js} +1 -1
- package/dist/client/assets/{use-secrets-BuzBGJzS.js → use-secrets-CIpnw6D3.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Deaq-xKS.js → use-status-sounds-CllFKOdr.js} +1 -1
- package/dist/client/assets/{use-view-mode-DkOj2amg.js → use-view-mode-a5VMrayu.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BWUHUovJ.js → use-virtual-mcp-DLzbRg0p.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BVRuAYAh.js +1 -0
- package/dist/client/assets/{useRouterState-DzAQSljy.js → useRouterState-Cxdg2aEG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BXt0AJvY.js +1 -0
- package/dist/client/assets/{users-lVsMyDlV.js → users-CB9DxjzH.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bg6CkscB.js → variant-calendar-Bne7cKKB.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CbqjXKVz.js → view-mode-toggle-DqFA8RJs.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +509 -493
- package/dist/server/server.js +311 -311
- package/package.json +1 -1
- package/dist/client/assets/automations-DSC59C_4.js +0 -1
- package/dist/client/assets/constants-B72Xmt_K.js +0 -1
- package/dist/client/assets/page-seo-sheet-BdBQLPF9.js +0 -1
- package/dist/client/assets/project-app-view-P5534lWv.js +0 -1
- package/dist/client/assets/record-editor-9SzDy0vH.js +0 -1
- package/dist/client/assets/registry-YExWdmmg.js +0 -2
- package/dist/client/assets/store-registry-BaUSpm9f.js +0 -2
- package/dist/client/assets/useInfiniteQuery-OQKbYp2J.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cm4rXOEu.js +0 -1
package/dist/client/assets/{agent-capabilities-CzE_X9Uw.js → agent-capabilities-Coo9ZnBO.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-DDuXmgwg.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-BLcbVcvx.js";import{C as bn}from"./collection-search-BzCL0B5a.js";import{C as Nn}from"./collection-tabs-DYFbE-Kc.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-BXgOYn9p.js";import{e as sn,d as on,D as an,a as cn,f as An,c as Dn}from"./dialog-BTb4esky.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-D14Ovhrh.js";import{u as Ln}from"./use-mobile-C3KxmSpp.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-D6qYMM5j.js";import{I as Y}from"./input-OqFnO0t3.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-CxJqiNh7.js";import{T as Kn}from"./textarea-DH8K4jmG.js";import{b as rn}from"./use-connection-BO9L0ZdL.js";import{n as Ie,c as Re}from"./XCircle-BGJtmHGv.js";import{s as $e}from"./Star01-DtZ0ghma.js";import{an as Hn}from"./agent-icon-B6-TAR8b.js";import{s as Un}from"./XClose-BMKEpE7Z.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-BvBY9Yla.js";import{u as Ye}from"./use-infinite-scroll-CtfwmD_R.js";import{a as Ee}from"./authenticate-and-persist-oauth-Bv7jHOsm.js";import{B as we}from"./badge-DcoHUjVX.js";import{T as ze,a as Ke,b as He}from"./tooltip-Baf77weG.js";import{u as Yn}from"./useSuspenseInfiniteQuery-Cm4rXOEu.js";import{u as Jn}from"./use-mcp-client-CkgqB40J.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-D28BfEB1.js";import{s as et}from"./Plus-BqrnsdiG.js";import{u as nt}from"./studio-tools-BjlLuULI.js";import{u as tt}from"./use-ai-providers-CL0Wp3m2.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-hdqj6gDr.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-BuAEa3vF.js";import{C as bn}from"./collection-search-CazZrA4S.js";import{C as Nn}from"./collection-tabs-CadMPVWp.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-BghnrxSR.js";import{e as sn,d as on,D as an,a as cn,f as An,c as Dn}from"./dialog-C1ZYdrM_.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-CxIrpUwC.js";import{u as Ln}from"./use-mobile-MKYJ8vvW.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-C1d0lXPp.js";import{I as Y}from"./input-Ya0Cut-i.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-BFkQzIig.js";import{T as Kn}from"./textarea-DEargMO8.js";import{b as rn}from"./use-connection-u3EMifcA.js";import{n as Ie,c as Re}from"./XCircle-CobTKsAs.js";import{s as $e}from"./Star01-Bo9r20Eg.js";import{an as Hn}from"./agent-icon-BM5dFRES.js";import{s as Un}from"./XClose-CX2p9Cmv.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-D23mTJCc.js";import{u as Ye}from"./use-infinite-scroll-5eF2WCfT.js";import{a as Ee}from"./authenticate-and-persist-oauth-CbuK31S6.js";import{B as we}from"./badge-Cu4iVz3w.js";import{T as ze,a as Ke,b as He}from"./tooltip-DLFYH37T.js";import{u as Yn}from"./useSuspenseInfiniteQuery-BXt0AJvY.js";import{u as Jn}from"./use-mcp-client-tuD2WObP.js";import{S as Zn}from"./constants-Qo1EtbpN.js";import{i as Je}from"./Check-DYBiSR01.js";import{s as et}from"./Plus-D4PJkd-R.js";import{u as nt}from"./studio-tools-8o4MOlCv.js";import{u as tt}from"./use-ai-providers-D4G3p_dj.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};
|