decocms 4.48.0 → 4.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BU14bQiZ.js → AlertCircle-k25R3-Si.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-v2vghZgm.js → ArrowUpRight-goUbSV_t.js} +1 -1
- package/dist/client/assets/{Check-LPaPEL9T.js → Check-tfEbDiSO.js} +1 -1
- package/dist/client/assets/{CheckCircle-Do5A4bXQ.js → CheckCircle-B-AysnVj.js} +1 -1
- package/dist/client/assets/{ChevronDown-CQ4gU8z2.js → ChevronDown-DDh3Hhw_.js} +1 -1
- package/dist/client/assets/{ChevronRight-CnRZV29t.js → ChevronRight-3DlxSDpa.js} +1 -1
- package/dist/client/assets/{ChevronUp-BG8Bf7p5.js → ChevronUp-CGRHCTkf.js} +1 -1
- package/dist/client/assets/{Circle-DpQfqGNp.js → Circle-9NU9F6cw.js} +1 -1
- package/dist/client/assets/{Copy01-a2D-JB5w.js → Copy01-v70-83R3.js} +1 -1
- package/dist/client/assets/{DotsVertical-D3ZNtEH2.js → DotsVertical-CJNxrPQc.js} +1 -1
- package/dist/client/assets/{Eye-BtY-LtDA.js → Eye-BQAd-UWR.js} +1 -1
- package/dist/client/assets/{FilterLines-SGzOlpxQ.js → FilterLines-WY77jC6d.js} +1 -1
- package/dist/client/assets/{Globe01-BY6peDuZ.js → Globe01-BJm_6L1K.js} +1 -1
- package/dist/client/assets/{Globe04-CDcU3Rla.js → Globe04-Bvx5rGM6.js} +1 -1
- package/dist/client/assets/{HardDrive-KCGj9ORV.js → HardDrive-DqhFpjyW.js} +1 -1
- package/dist/client/assets/{Key01-CYaFueTS.js → Key01-Ca3H4Guz.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D-MMxE-M.js → LayoutLeft-LgchNodn.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BC0gNEKt.js → LinkExternal01-4WLYi2mX.js} +1 -1
- package/dist/client/assets/{List-CgukfXbz.js → List-CP5qu-Ed.js} +1 -1
- package/dist/client/assets/{Loading02-DiTs_Ka0.js → Loading02-EeaKovpr.js} +1 -1
- package/dist/client/assets/{Monitor01-BwY7wiIv.js → Monitor01-B7DuF8uL.js} +1 -1
- package/dist/client/assets/{Palette--eupxDrC.js → Palette-BDkRrX1I.js} +1 -1
- package/dist/client/assets/{Play-DFTwtpgp.js → Play-DSAmPT6o.js} +1 -1
- package/dist/client/assets/{Plus-DwiR3Oel.js → Plus-C1-9U7xY.js} +1 -1
- package/dist/client/assets/{SearchLg-AGW59IHr.js → SearchLg-CvEhHQsI.js} +1 -1
- package/dist/client/assets/{SearchMd--hdVzTWj.js → SearchMd-DiN4RXkm.js} +1 -1
- package/dist/client/assets/{Settings02-Oy0H9TJU.js → Settings02-C31aohuM.js} +1 -1
- package/dist/client/assets/{Shield01-Dey8R0Wt.js → Shield01-CszvfMrq.js} +1 -1
- package/dist/client/assets/{Star01-DqcYLdUP.js → Star01-DGbt_SIN.js} +1 -1
- package/dist/client/assets/{Stars01-B0ITotZ-.js → Stars01-BKEHGK4f.js} +1 -1
- package/dist/client/assets/{Stars02-BlSWe2aV.js → Stars02-KrIAmQsB.js} +1 -1
- package/dist/client/assets/{Sun-Do6OumKk.js → Sun-BdOFeDi1.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DgM-zlmP.js → SwitchHorizontal01-C6ZclJC7.js} +1 -1
- package/dist/client/assets/{Tool01-DGCgIeuK.js → Tool01-MLrVuoSu.js} +1 -1
- package/dist/client/assets/{Trash01-D8-5OV_e.js → Trash01-DggFSL1b.js} +1 -1
- package/dist/client/assets/{Upload01-C7AAyyjR.js → Upload01-Cxs1z0Jh.js} +1 -1
- package/dist/client/assets/{User01-urWS5dkH.js → User01-L5odKA9U.js} +1 -1
- package/dist/client/assets/{Users01-BqhN-P8L.js → Users01-0hD-3O0B.js} +1 -1
- package/dist/client/assets/{Users03-BcVoCg35.js → Users03-OwsRMjku.js} +1 -1
- package/dist/client/assets/{X-CUDnp4kZ.js → X-BSHZ0M6H.js} +1 -1
- package/dist/client/assets/{XCircle-ByhSsmxa.js → XCircle-Ce3AP-z1.js} +1 -1
- package/dist/client/assets/{XClose-92KTkAwb.js → XClose-Dha2rZyS.js} +1 -1
- package/dist/client/assets/{Zap-CMyUhB1o.js → Zap-MjamIo9C.js} +1 -1
- package/dist/client/assets/{ZapSquare-BRty9AYq.js → ZapSquare-2TYVPpzw.js} +1 -1
- package/dist/client/assets/{ZoomOut-C5AyvbVI.js → ZoomOut-DOMq8Qks.js} +1 -1
- package/dist/client/assets/{access-gate-Bq9SHYIN.js → access-gate-B7i8fTcq.js} +1 -1
- package/dist/client/assets/{add-section-modal-gExEkBw0.js → add-section-modal-BFa2vink.js} +1 -1
- package/dist/client/assets/{agent-capabilities-IENdHeWA.js → agent-capabilities-CcfbqOca.js} +1 -1
- package/dist/client/assets/{agent-icon-BRhNodUp.js → agent-icon-BxlAfYtU.js} +1 -1
- package/dist/client/assets/{agents-list-B5aZbRnn.js → agents-list-Dpg0mQ5j.js} +1 -1
- package/dist/client/assets/{ai-providers-CEd0zcVP.js → ai-providers-hukOcDkN.js} +1 -1
- package/dist/client/assets/{alert-BwO9tTP6.js → alert-CPrpIdPz.js} +1 -1
- package/dist/client/assets/{alert-dialog-BaxqLdqZ.js → alert-dialog-9kOsUrrA.js} +1 -1
- package/dist/client/assets/{app-editor-BzLD65KJ.js → app-editor-BznZUTpm.js} +1 -1
- package/dist/client/assets/{auth-BYd3Adar.js → auth-DEpjtwun.js} +1 -1
- package/dist/client/assets/{auth-catchall-9eibLEi_.js → auth-catchall-D_RkydrM.js} +1 -1
- package/dist/client/assets/{auth-entry-Ck2obNK6.js → auth-entry-jFqYAMuT.js} +1 -1
- package/dist/client/assets/{auth-split-layout-kOHLhMBc.js → auth-split-layout-7N_nwEWR.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D24b13QS.js → authenticate-and-persist-oauth-Z5iZl3NY.js} +1 -1
- package/dist/client/assets/{automation-list-row-CwNfc4BJ.js → automation-list-row-DoFEAvgQ.js} +1 -1
- package/dist/client/assets/{automation-runs-Bz_unH7M.js → automation-runs-DbWyk7jb.js} +1 -1
- package/dist/client/assets/{automations-BT9Tl2IT.js → automations-CABzNKUu.js} +1 -1
- package/dist/client/assets/{autosend-B57nQVt9.js → autosend-hYfyQlKa.js} +1 -1
- package/dist/client/assets/{avatar-CWM4obRf.js → avatar-B5g154Et.js} +1 -1
- package/dist/client/assets/{badge-3HoWdSCw.js → badge-qy7vzuZ8.js} +1 -1
- package/dist/client/assets/{block-document-B3G3VFxe.js → block-document-DNsS2KRT.js} +1 -1
- package/dist/client/assets/{brand-context-DjT56GiN.js → brand-context-D7jkbFUV.js} +1 -1
- package/dist/client/assets/{breadcrumb-CDMzapNU.js → breadcrumb-COfYELC8.js} +1 -1
- package/dist/client/assets/{buckets-DusM3XEM.js → buckets-CB-PCLi2.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Dpr_4nVy.js → bulk-category-panel-EPnEykuu.js} +1 -1
- package/dist/client/assets/{calendar-BoKJIhDn.js → calendar-CqrMvOtO.js} +1 -1
- package/dist/client/assets/{capability-load-error-B6IlBcXy.js → capability-load-error-DcdUflTi.js} +1 -1
- package/dist/client/assets/{card-Dn-X5_qZ.js → card-BhI7Np_f.js} +1 -1
- package/dist/client/assets/{category-editor-MKqT5L0M.js → category-editor-BiFT8zOt.js} +1 -1
- package/dist/client/assets/{chat-context-CuUtzUxN.js → chat-context-DbtHJFUr.js} +1 -1
- package/dist/client/assets/{checkbox-OoxHRAIC.js → checkbox-C9d1lIYX.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BlGRBXan.js → cli-auth-success-Bv1VcbtV.js} +1 -1
- package/dist/client/assets/{collection-detail-Ey316Bjl.js → collection-detail-CRVut8n4.js} +1 -1
- package/dist/client/assets/{collection-display-button-1NwE7h2v.js → collection-display-button-Cruq60_Q.js} +1 -1
- package/dist/client/assets/{collection-search-CYvfVN5j.js → collection-search-CwUbH4qH.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DqftunrZ.js → collection-table-wrapper-BjYwYC4q.js} +1 -1
- package/dist/client/assets/{collection-tabs-CmzqLC7G.js → collection-tabs-ClxY84rJ.js} +1 -1
- package/dist/client/assets/{command-Cs_FT5uh.js → command-B3cu0Aev.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BJJQ3wrh.js → commerce-onboarding-BYoRokdz.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-D4-OAuGK.js → connect-desktop-dialog-CsHMUYFP.js} +1 -1
- package/dist/client/assets/{connection-card-D_mm_HDA.js → connection-card-CDb2GmfN.js} +1 -1
- package/dist/client/assets/{connection-detail-Cis22PYd.js → connection-detail-DaB9Caux.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CNLvao3W.js → connection-form-helpers-DwHnDZGX.js} +1 -1
- package/dist/client/assets/{connections-kuE1BHW5.js → connections-C5LmG-ha.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CyzHYifl.js → decopilot-sse-pool-Xn1jBQQZ.js} +1 -1
- package/dist/client/assets/{dialog-CMpHcaDT.js → dialog-Doo4cf6x.js} +1 -1
- package/dist/client/assets/{domain-settings-ly69Lfwu.js → domain-settings-DY3jmP1m.js} +1 -1
- package/dist/client/assets/{drawer-CWJ_7maH.js → drawer-CzFCT3PH.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BRWSOCnY.js → dropdown-menu-Zn5Qzoi0.js} +1 -1
- package/dist/client/assets/{empty-state-BFLgyxqT.js → empty-state-B5ZXJOuz.js} +1 -1
- package/dist/client/assets/{extract-connection-data-MusN6Gn3.js → extract-connection-data-CAN-85EW.js} +1 -1
- package/dist/client/assets/{file-explorer-Dzb8LxOl.js → file-explorer-37Ixz2H8.js} +1 -1
- package/dist/client/assets/{file-type-icon-B9HBQ2xz.js → file-type-icon-CpecjgQb.js} +1 -1
- package/dist/client/assets/{files-B6veiy4q.js → files-7KwaVvpP.js} +1 -1
- package/dist/client/assets/{form-DBwlnkBF.js → form-DGt94nWL.js} +1 -1
- package/dist/client/assets/{general-DbRKmq2g.js → general-DpPTR2IV.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CtJVZFVj.js → github-repo-picker-DFQ47NAm.js} +1 -1
- package/dist/client/assets/{hooks-Daw6wCvk.js → hooks-CVWEOPPl.js} +1 -1
- package/dist/client/assets/{index-BOK6FIrS.js → index-8tv7d0Ve.js} +1 -1
- package/dist/client/assets/{index-BIKmJ3Nr.js → index-B-lL4Bof.js} +6 -6
- package/dist/client/assets/{index-Dk_RC5v2.js → index-B46tvY2S.js} +1 -1
- package/dist/client/assets/{index-D2AF1vUU.js → index-B9mjAGk9.js} +1 -1
- package/dist/client/assets/{index-C3N62ppi.js → index-BHFkoj3g.js} +1 -1
- package/dist/client/assets/{index-YwKi7Flg.js → index-BiBP_IJ-.js} +1 -1
- package/dist/client/assets/{index-CJwuGivG.js → index-CDfGnUft.js} +1 -1
- package/dist/client/assets/{index-CH9EZ8Nx.js → index-CO1L2k6F.js} +3 -3
- package/dist/client/assets/{index-BzyqQfFe.js → index-CeaSA5WZ.js} +1 -1
- package/dist/client/assets/{index-DKhV9HVo.js → index-CiXX-fWm.js} +1 -1
- package/dist/client/assets/{index-DmSu0uR-.js → index-DH2YDD3V.js} +1 -1
- package/dist/client/assets/{index-BB4hosnn.js → index-DRHqcbla.js} +1 -1
- package/dist/client/assets/{index-BdxG9zIa.js → index-dIqwxqlw.js} +1 -1
- package/dist/client/assets/{index-UkWY3CB2.js → index-rTzepySe.js} +1 -1
- package/dist/client/assets/{index-redirect-B0RPY5V2.js → index-redirect-SiI_MmOn.js} +1 -1
- package/dist/client/assets/{input-DtVvcTPe.js → input-COW4go5N.js} +1 -1
- package/dist/client/assets/{integration-icon-Bv-jmTZs.js → integration-icon-BnLf1D5y.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DUIj1UlP.js → invite-member-dialog-D-VduUaY.js} +1 -1
- package/dist/client/assets/{label-Bu3AIS2R.js → label-D-dsSZO9.js} +1 -1
- package/dist/client/assets/{login-D_XVUbVX.js → login-BBExhs0i.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BjdG12-c.js → mcp-oauth-BkvwEKNk.js} +1 -1
- package/dist/client/assets/{members-B9Pu22BD.js → members-BsA618Ds.js} +1 -1
- package/dist/client/assets/{monaco-editor-9bGTjzkm.js → monaco-editor-RTekDV_G.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Djc43OSZ.js → monitoring-stats-row-DXsXFCSg.js} +1 -1
- package/dist/client/assets/{oauth-callback-DIW2_i1T.js → oauth-callback-CqjNzHWn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B1n9DDCe.js → oauth-callback-ai-provider-C_RrwpQT.js} +1 -1
- package/dist/client/assets/{onboarding-jkQERxvZ.js → onboarding-BWDDHwD0.js} +1 -1
- package/dist/client/assets/{org-install-waqi2Knv.js → org-install-Bey3pM-s.js} +1 -1
- package/dist/client/assets/{org-layout-DJ1GrDL7.js → org-layout-CBrTiXLW.js} +1 -1
- package/dist/client/assets/{organization-choice-B6UMju8r.js → organization-choice-BcTXS06q.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C9KcJIyh.js +1 -0
- package/dist/client/assets/{popover-BU7pjRBm.js → popover-COxSNUI9.js} +1 -1
- package/dist/client/assets/{post-editor-DQVCXlSi.js → post-editor-Dg36btgx.js} +1 -1
- package/dist/client/assets/{primitives-CUkZpQa4.js → primitives-ySArMO8A.js} +1 -1
- package/dist/client/assets/{profile-BKp6VgpU.js → profile-CHW3d_C3.js} +1 -1
- package/dist/client/assets/project-app-view-DSJYwYNP.js +1 -0
- package/dist/client/assets/record-editor-BKk1cGnm.js +1 -0
- package/dist/client/assets/registry-jF11637A.js +2 -0
- package/dist/client/assets/{registry-layout-c83vGU7n.js → registry-layout-DM6iRP4R.js} +1 -1
- package/dist/client/assets/{require-capability-vKvQ1Zur.js → require-capability-C0bowvl-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-7cZ5cfUT.js → required-auth-layout-CANoL34o.js} +1 -1
- package/dist/client/assets/{reset-password-iMPMC_Vf.js → reset-password-Bu-RIMAl.js} +1 -1
- package/dist/client/assets/{roles-D5rfuOhe.js → roles-CEWWPS9R.js} +1 -1
- package/dist/client/assets/{search-input-BVZJ7x1G.js → search-input-B51XuoAi.js} +1 -1
- package/dist/client/assets/{secrets-DfoRUReE.js → secrets-D3WG23GX.js} +1 -1
- package/dist/client/assets/{sections-editor-fNpzrCO9.js → sections-editor-BmLUDELp.js} +1 -1
- package/dist/client/assets/{select-DzLNnT6O.js → select-B1glqaL5.js} +1 -1
- package/dist/client/assets/{select-model-Dky0hK-_.js → select-model-CTRtCpyq.js} +1 -1
- package/dist/client/assets/{seo-editor-6yvKKD56.js → seo-editor-BiVjKNYD.js} +1 -1
- package/dist/client/assets/{seo-save-VonRqAwI.js → seo-save-Di9kBsWL.js} +1 -1
- package/dist/client/assets/{settings-layout-CggR46xX.js → settings-layout-DWTWQdbp.js} +1 -1
- package/dist/client/assets/{settings-section-CBqjvdGu.js → settings-section-BJ5Z9sbk.js} +1 -1
- package/dist/client/assets/{shell-controls-D1Zj4TDx.js → shell-controls-C_t0yT4o.js} +1 -1
- package/dist/client/assets/{shell-layout-DJKTlJdJ.js → shell-layout-BtQe-dI_.js} +1 -1
- package/dist/client/assets/{sidebar-FGH25wo8.js → sidebar-xOgqyAzw.js} +1 -1
- package/dist/client/assets/{skeleton-Cug1_sp1.js → skeleton-Y0aYZIGv.js} +1 -1
- package/dist/client/assets/{sso-CswyYIc4.js → sso-p-GWEiH_.js} +1 -1
- package/dist/client/assets/{store-BAdH7Xgb.js → store-DG4R5TyA.js} +1 -1
- package/dist/client/assets/store-registry-D_uqHVBf.js +2 -0
- package/dist/client/assets/{studio-tools-D3YWcmj3.js → studio-tools-CkzkLbeK.js} +1 -1
- package/dist/client/assets/{switch-DpTcz2DZ.js → switch-BeCDglKS.js} +1 -1
- package/dist/client/assets/{table-CN_uvHcv.js → table-CK7f3A2A.js} +1 -1
- package/dist/client/assets/{tabs-DTL4ZTIk.js → tabs-CJJv0rqZ.js} +1 -1
- package/dist/client/assets/{textarea-CfkvU0G9.js → textarea-BoXzEDCS.js} +1 -1
- package/dist/client/assets/{toggle-group-C6twzI1Z.js → toggle-group-D8suAen9.js} +1 -1
- package/dist/client/assets/{toolbar-CyMY3ln_.js → toolbar-L2J1s5cv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D5HhZjT8.js → toolbar-icon-button-D8lNvCwb.js} +1 -1
- package/dist/client/assets/{tools-list-joMTrI0C.js → tools-list-B9fSZWYy.js} +1 -1
- package/dist/client/assets/{tooltip-stVZuZna.js → tooltip-B8UTXuYj.js} +1 -1
- package/dist/client/assets/{types-BrihpTAy.js → types-CI4ZpBJG.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CVkRovF1.js → use-ai-providers-CakVoxd1.js} +1 -1
- package/dist/client/assets/{use-automations-2Glp9-j7.js → use-automations-DeM5roCe.js} +1 -1
- package/dist/client/assets/{use-capability-EQTheMSX.js → use-capability-B9S8HhSs.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D9CWlgud.js → use-clock-tick-JSYy3xwe.js} +1 -1
- package/dist/client/assets/{use-collections-CUeK8mw_.js → use-collections-DwtBugWF.js} +1 -1
- package/dist/client/assets/{use-connection-BZYZrML5.js → use-connection-BDpHVnM9.js} +1 -1
- package/dist/client/assets/{use-copy-D9INHQEi.js → use-copy-CVEWQijj.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cew_mu7V.js → use-create-virtual-mcp-CyHPTRnR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-5jb2X7qO.js → use-debounced-autosave-C-WNNWm4.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Cz-X-J1K.js → use-debounced-value-bUjKN4su.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DA0RDyGZ.js → use-decopilot-events-vQdREpgW.js} +1 -1
- package/dist/client/assets/{use-delete-connection-D5XweDLz.js → use-delete-connection-CHv507Hm.js} +1 -1
- package/dist/client/assets/{use-file-configs-C7EivhVD.js → use-file-configs-D4DkA1o5.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DntDy4sL.js → use-infinite-scroll-C76DIcY8.js} +1 -1
- package/dist/client/assets/{use-join-requests-BcMGsxog.js → use-join-requests-D6ap2Uj2.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BOUowLdo.js → use-mcp-client-DwetKDRa.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Bl_b_Hx-.js → use-mcp-prompts-Dd5bB4_b.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B1lso4A_.js → use-mcp-tools-BUiL0JOE.js} +1 -1
- package/dist/client/assets/{use-members-Be5QWWLt.js → use-members-BH7s_bbV.js} +1 -1
- package/dist/client/assets/{use-mobile-hfgWeQEp.js → use-mobile-BK99wTJG.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B-S3APd4.js → use-navigate-to-agent-C6bEo5XD.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DpLcQRPx.js → use-org-auth-client-C_ymtLDP.js} +1 -1
- package/dist/client/assets/{use-org-sso-C28MSl96.js → use-org-sso-C-2oQsVK.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DTrpgxNw.js → use-organization-roles-BlEJ6Gvi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BwPQ6hVt.js → use-organization-settings-DDeNqP-7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CDmALAOb.js → use-registry-connections-D-CxCgyF.js} +1 -1
- package/dist/client/assets/{use-secrets-BmOvjKW7.js → use-secrets-Bh4ndTN4.js} +1 -1
- package/dist/client/assets/{use-status-sounds-cBS0pfDF.js → use-status-sounds-BcOUu7LR.js} +1 -1
- package/dist/client/assets/{use-view-mode-W_Rx6Pqo.js → use-view-mode-SybAG8SK.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DWzUT40s.js → use-virtual-mcp-KIabF-QC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BauhQX45.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DJ9BuAY-.js +1 -0
- package/dist/client/assets/{variant-calendar-CCTJPAL5.js → variant-calendar-DlZJbhfj.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-b6Z7dUlP.js → view-mode-toggle-C3x6LuYl.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +444 -444
- package/dist/server/server.js +295 -295
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-BrSWoIbu.js +0 -1
- package/dist/client/assets/project-app-view-Bbg6gcHA.js +0 -1
- package/dist/client/assets/record-editor-CIK23g9Y.js +0 -1
- package/dist/client/assets/registry-jgarpliy.js +0 -2
- package/dist/client/assets/store-registry-BrOdndgf.js +0 -2
- package/dist/client/assets/useInfiniteQuery-_ypuPi-w.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B-qWrUhY.js +0 -1
package/dist/client/assets/{agent-capabilities-IENdHeWA.js → agent-capabilities-CcfbqOca.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ke,a as en,W as un,J as mn,I as pn,j as e,B as J,t as X,r as le,p as hn,b as fn,i as Se,M as C,K as pe,c as xn,Y as gn,V as jn,l as vn,k as yn}from"./index-CH9EZ8Nx.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-D_mm_HDA.js";import{C as bn}from"./collection-search-CYvfVN5j.js";import{C as Nn}from"./collection-tabs-CmzqLC7G.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-MusN6Gn3.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-CMpHcaDT.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-CWJ_7maH.js";import{u as Ln}from"./use-mobile-hfgWeQEp.js";import{F as O,b as L,c as $,d as E,e as R,a as Qe}from"./form-DBwlnkBF.js";import{I as Y}from"./input-DtVvcTPe.js";import{a as $n,c as En,d as Rn,S as zn,b as me}from"./select-DzLNnT6O.js";import{T as Kn}from"./textarea-CfkvU0G9.js";import{b as rn}from"./use-connection-BZYZrML5.js";import{n as Ie,c as $e}from"./XCircle-ByhSsmxa.js";import{s as Ee}from"./Star01-DqcYLdUP.js";import{ak as Hn}from"./agent-icon-BRhNodUp.js";import{s as Un}from"./XClose-92KTkAwb.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-CNLvao3W.js";import{u as Ye}from"./use-infinite-scroll-DntDy4sL.js";import{a as Re}from"./authenticate-and-persist-oauth-D24b13QS.js";import{B as we}from"./badge-3HoWdSCw.js";import{T as ze,a as Ke,b as He}from"./tooltip-stVZuZna.js";import{u as Yn}from"./useSuspenseInfiniteQuery-B-qWrUhY.js";import{u as Jn}from"./use-mcp-client-BOUowLdo.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-LPaPEL9T.js";import{s as et}from"./Plus-DwiR3Oel.js";import{u as nt}from"./studio-tools-D3YWcmj3.js";import{u as tt}from"./use-ai-providers-CVkRovF1.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($,{children:"Type *"}),e.jsxs($n,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(En,{children:e.jsx(Rn,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{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(R,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"NPM Package *"}),e.jsx(E,{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(R,{})]})}),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($,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(R,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Working Directory"}),e.jsx(E,{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(R,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(R,{})]})}),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($,{children:"URL *"}),e.jsx(E,{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(R,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:x?.token?.label??"Token (optional)"}),e.jsx(E,{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(R,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Description"}),e.jsx(E,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(R,{})]})})]});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($e,{})})}),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($e,{})})}),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($e,{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 Re({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 Re({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 Re({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{$ as ke,a as en,W as un,J as mn,I as pn,j as e,B as J,t as X,r as le,p as hn,b as fn,i as Se,M as C,K as pe,c as xn,Y as gn,V as jn,l as vn,k as yn}from"./index-CO1L2k6F.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-CDb2GmfN.js";import{C as bn}from"./collection-search-CwUbH4qH.js";import{C as Nn}from"./collection-tabs-ClxY84rJ.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-CAN-85EW.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-Doo4cf6x.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-CzFCT3PH.js";import{u as Ln}from"./use-mobile-BK99wTJG.js";import{F as O,b as L,c as $,d as E,e as R,a as Qe}from"./form-DGt94nWL.js";import{I as Y}from"./input-COW4go5N.js";import{a as $n,c as En,d as Rn,S as zn,b as me}from"./select-B1glqaL5.js";import{T as Kn}from"./textarea-BoXzEDCS.js";import{b as rn}from"./use-connection-BDpHVnM9.js";import{n as Ie,c as $e}from"./XCircle-Ce3AP-z1.js";import{s as Ee}from"./Star01-DGbt_SIN.js";import{ak as Hn}from"./agent-icon-BxlAfYtU.js";import{s as Un}from"./XClose-Dha2rZyS.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-DwHnDZGX.js";import{u as Ye}from"./use-infinite-scroll-C76DIcY8.js";import{a as Re}from"./authenticate-and-persist-oauth-Z5iZl3NY.js";import{B as we}from"./badge-qy7vzuZ8.js";import{T as ze,a as Ke,b as He}from"./tooltip-B8UTXuYj.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DJ9BuAY-.js";import{u as Jn}from"./use-mcp-client-DwetKDRa.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-tfEbDiSO.js";import{s as et}from"./Plus-C1-9U7xY.js";import{u as nt}from"./studio-tools-CkzkLbeK.js";import{u as tt}from"./use-ai-providers-CakVoxd1.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($,{children:"Type *"}),e.jsxs($n,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(En,{children:e.jsx(Rn,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{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(R,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"NPM Package *"}),e.jsx(E,{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(R,{})]})}),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($,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(R,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Working Directory"}),e.jsx(E,{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(R,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(R,{})]})}),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($,{children:"URL *"}),e.jsx(E,{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(R,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:x?.token?.label??"Token (optional)"}),e.jsx(E,{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(R,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Description"}),e.jsx(E,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(R,{})]})})]});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($e,{})})}),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($e,{})})}),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($e,{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 Re({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 Re({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 Re({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};
|