decocms 4.30.1 → 4.30.2
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-DQZIoZK3.js → AlertCircle-DnAYXfMU.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BXPXISIu.js → ArrowUpRight-TtNUPTQB.js} +1 -1
- package/dist/client/assets/{Check-s3en6K6a.js → Check-BvrjRK-f.js} +1 -1
- package/dist/client/assets/{CheckCircle-6oFE8RZY.js → CheckCircle-C6nWvFHV.js} +1 -1
- package/dist/client/assets/{ChevronDown-DfbvlHGm.js → ChevronDown-DYHTINZW.js} +1 -1
- package/dist/client/assets/{ChevronRight-BbMxA_we.js → ChevronRight-Bl9YVPs6.js} +1 -1
- package/dist/client/assets/{ChevronUp-CSojtzH5.js → ChevronUp-B18hle8l.js} +1 -1
- package/dist/client/assets/{Circle-4U8mdxgJ.js → Circle-DPVk1czd.js} +1 -1
- package/dist/client/assets/{Copy01-CIuFqZaz.js → Copy01-CrUgsJcD.js} +1 -1
- package/dist/client/assets/{DotsVertical-CcXsbxkI.js → DotsVertical-BndxtaEo.js} +1 -1
- package/dist/client/assets/{Eye-C-Ii0MmZ.js → Eye-ClTWumnI.js} +1 -1
- package/dist/client/assets/{FilterLines-CRqtZMw9.js → FilterLines-CTf9rlZx.js} +1 -1
- package/dist/client/assets/{Globe01-CdJefkBr.js → Globe01-BoyjWYdB.js} +1 -1
- package/dist/client/assets/{Globe04-BrDmMJuA.js → Globe04-Cu0R3oaF.js} +1 -1
- package/dist/client/assets/{HardDrive-C1TfsRRw.js → HardDrive-PM-PT0eV.js} +1 -1
- package/dist/client/assets/{Key01-BuAYoLgF.js → Key01-7XhjBNK3.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BuFW-ud0.js → LayoutLeft-DfWu_TMe.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DMcxPOk0.js → LinkExternal01-C1Hc9Rj3.js} +1 -1
- package/dist/client/assets/{List-Dg43Ye3O.js → List-BSXYor2Z.js} +1 -1
- package/dist/client/assets/{Loading02-CLjf_mWB.js → Loading02-ye_m_QAK.js} +1 -1
- package/dist/client/assets/{Monitor01-DP1X3LaS.js → Monitor01-CWCFfYgZ.js} +1 -1
- package/dist/client/assets/{Palette-6OTpcgOT.js → Palette-DpDs-Lap.js} +1 -1
- package/dist/client/assets/{Play-C-6p0BcA.js → Play-lmf5c9Jo.js} +1 -1
- package/dist/client/assets/{Plus-DI8G3hjD.js → Plus-DK37ytOg.js} +1 -1
- package/dist/client/assets/{SearchLg-CeBJHSxD.js → SearchLg-ox88sikc.js} +1 -1
- package/dist/client/assets/{SearchMd-BK3G07RD.js → SearchMd-DbAiVRZR.js} +1 -1
- package/dist/client/assets/{Settings02-Cc5NwEaN.js → Settings02-N3uovfLI.js} +1 -1
- package/dist/client/assets/{Shield01-CSmFJ1RP.js → Shield01-CGCJBA4k.js} +1 -1
- package/dist/client/assets/{Star01-CWyyx_CI.js → Star01-CVz_7GBv.js} +1 -1
- package/dist/client/assets/{Stars01-CNNiBNAJ.js → Stars01-D6zQVCEN.js} +1 -1
- package/dist/client/assets/{Stars02-zuQltjIB.js → Stars02-CxeSSA7g.js} +1 -1
- package/dist/client/assets/{Sun-Cm9IedwX.js → Sun-e9bFqj0N.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Cw76bjm8.js → SwitchHorizontal01-CTmNw19f.js} +1 -1
- package/dist/client/assets/{Tool01-CTeGQUqF.js → Tool01-Do_IYkhs.js} +1 -1
- package/dist/client/assets/{Trash01-CeLlU9Hr.js → Trash01-DPHj7EPF.js} +1 -1
- package/dist/client/assets/{Upload01-DeL5atjC.js → Upload01-H4u3fcTc.js} +1 -1
- package/dist/client/assets/{User01-CVy-WVkE.js → User01-GIEDPABY.js} +1 -1
- package/dist/client/assets/{Users01-gmVxoI-k.js → Users01-hbEK4T_M.js} +1 -1
- package/dist/client/assets/{Users03-Ba1rCL5_.js → Users03-BjPo5EJz.js} +1 -1
- package/dist/client/assets/{X-B4fK1PSH.js → X-B11_-bWv.js} +1 -1
- package/dist/client/assets/{XCircle-D680rHaa.js → XCircle-DhEfH4xa.js} +1 -1
- package/dist/client/assets/{XClose-DZ-fbd9x.js → XClose-7c8y3nr7.js} +1 -1
- package/dist/client/assets/{Zap-CHM8jc7i.js → Zap-C6zrTK7v.js} +1 -1
- package/dist/client/assets/{ZapSquare-BjByOqyA.js → ZapSquare-D9UGTwX8.js} +1 -1
- package/dist/client/assets/{ZoomOut-Dt1IXaRq.js → ZoomOut-COjlHAto.js} +1 -1
- package/dist/client/assets/{access-gate-w4EKvoEv.js → access-gate-cQiB1PTp.js} +1 -1
- package/dist/client/assets/{add-section-modal-DogHlV9_.js → add-section-modal-CzTGC6D4.js} +1 -1
- package/dist/client/assets/{agent-capabilities-giK3bRW-.js → agent-capabilities-DGJfVNFQ.js} +1 -1
- package/dist/client/assets/{agent-icon-N5U1HeY1.js → agent-icon-Cg17MSXd.js} +1 -1
- package/dist/client/assets/{agents-list-CqlyAaPn.js → agents-list-DtJ5AwUc.js} +1 -1
- package/dist/client/assets/{ai-providers--EA2lMFo.js → ai-providers-zedfjYwR.js} +1 -1
- package/dist/client/assets/{alert-Bdmkn5IA.js → alert-CH-ji8jT.js} +1 -1
- package/dist/client/assets/{alert-dialog-DQf3rZVT.js → alert-dialog-DCVvUTHg.js} +1 -1
- package/dist/client/assets/{app-editor-k0YPL4X-.js → app-editor-CcSesL6B.js} +1 -1
- package/dist/client/assets/{auth-DLezYwI7.js → auth-D3gb8a1G.js} +1 -1
- package/dist/client/assets/{auth-catchall-v82GytbP.js → auth-catchall-OeWX2Rae.js} +1 -1
- package/dist/client/assets/{auth-entry-verdsuvy.js → auth-entry-DO2h9Nld.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D3EcXAD7.js → auth-split-layout-Dhzw613v.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B89lyITx.js → authenticate-and-persist-oauth-D74XVxJq.js} +1 -1
- package/dist/client/assets/{automation-list-row-o2_pLOr4.js → automation-list-row-DESlAeXT.js} +1 -1
- package/dist/client/assets/{automation-runs-Dmwa3j9k.js → automation-runs-W3FykFwC.js} +1 -1
- package/dist/client/assets/{automations-3TEWqXty.js → automations-BPCmHVJZ.js} +1 -1
- package/dist/client/assets/{autosend-e3cesngm.js → autosend-Ci7tspr4.js} +1 -1
- package/dist/client/assets/{avatar-0pAXOhlp.js → avatar-pA-6XVGw.js} +1 -1
- package/dist/client/assets/{badge-DdUP-taI.js → badge-9NVu_VdI.js} +1 -1
- package/dist/client/assets/{block-document-B5oKLw65.js → block-document-D1IvbVsR.js} +1 -1
- package/dist/client/assets/{brand-context-DYt7cXJ_.js → brand-context-Cfpp64p-.js} +1 -1
- package/dist/client/assets/{breadcrumb-Dx2G4VO9.js → breadcrumb-CyK1O4L9.js} +1 -1
- package/dist/client/assets/{buckets-BDVtaRLE.js → buckets-DrIzuaKD.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DJTbN1Qa.js → bulk-category-panel-fFPPHHPj.js} +1 -1
- package/dist/client/assets/{calendar-CcJoOwrC.js → calendar-DN0gI0pg.js} +1 -1
- package/dist/client/assets/{capability-load-error-kAN6hK8J.js → capability-load-error-DJ112fpN.js} +1 -1
- package/dist/client/assets/{card-CLNI5vTb.js → card-z0DIgOE_.js} +1 -1
- package/dist/client/assets/{category-editor-C-c4TOvs.js → category-editor-8gyBAsEs.js} +1 -1
- package/dist/client/assets/{chat-context-CDLyvKdU.js → chat-context-BD7KZRIw.js} +8 -8
- package/dist/client/assets/{checkbox-BCSDUgIe.js → checkbox-BD6yTuo9.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BMRSWJHK.js → cli-auth-success-4WAUWGOy.js} +1 -1
- package/dist/client/assets/{collection-detail-BxQm_7ex.js → collection-detail-Cw5VsLUF.js} +1 -1
- package/dist/client/assets/{collection-display-button-DgkDwQx3.js → collection-display-button-_LfG8OU8.js} +1 -1
- package/dist/client/assets/{collection-search-EDEWD1X9.js → collection-search-IlxdiWIS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-tJUZOEkF.js → collection-table-wrapper-Cm4IDZta.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cq6azV_u.js → collection-tabs-B4OrNtqt.js} +1 -1
- package/dist/client/assets/{command-DHmaE9JT.js → command-B5VkuRkm.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DNPVnUn4.js → commerce-onboarding-Cjz_0OMT.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DGh-1tLq.js → connect-desktop-dialog-Dl5P-KpW.js} +1 -1
- package/dist/client/assets/{connection-card-DT-riPtN.js → connection-card-BkLSl9Um.js} +1 -1
- package/dist/client/assets/{connection-detail-DfM_VWgx.js → connection-detail-C2gEsKL9.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DioUFOWc.js → connection-form-helpers-BPxpL3kZ.js} +1 -1
- package/dist/client/assets/{connections-bwhbNn_9.js → connections-pkPDtQ8_.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BOi7-S8l.js → decopilot-sse-pool-mwjxYiq3.js} +1 -1
- package/dist/client/assets/{dialog-C1_sXCgH.js → dialog-1Eqcgb9h.js} +1 -1
- package/dist/client/assets/{domain-settings-BZ3H97uq.js → domain-settings-Dohjkz1h.js} +1 -1
- package/dist/client/assets/{drawer-BstQPSyC.js → drawer-DgApXJiu.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BXGfrSiX.js → dropdown-menu-DQljEt7c.js} +1 -1
- package/dist/client/assets/{empty-state-CSs6-Bdi.js → empty-state-Ds7boKzG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-mdwVf3Kr.js → extract-connection-data-BjQiSug0.js} +1 -1
- package/dist/client/assets/{file-explorer-BCjGBw7c.js → file-explorer-BsT5nmcT.js} +1 -1
- package/dist/client/assets/{file-type-icon-C_PHmk0C.js → file-type-icon-DFmN-X_v.js} +1 -1
- package/dist/client/assets/{files-DJf6oJKs.js → files-3UKz8-rY.js} +1 -1
- package/dist/client/assets/{form-BB8De_xV.js → form-uObUvJsx.js} +1 -1
- package/dist/client/assets/{general-BgbMP2m7.js → general-BRqph6Dj.js} +1 -1
- package/dist/client/assets/{github-repo-picker-aJftKcC0.js → github-repo-picker--Ek5Q2kM.js} +1 -1
- package/dist/client/assets/{hooks-CksaF-ej.js → hooks-D0_F2fuV.js} +1 -1
- package/dist/client/assets/{index-BlHRIOF6.js → index-7MM5fVQo.js} +1 -1
- package/dist/client/assets/{index-C0ZQYTpQ.js → index-B4fQG-zs.js} +1 -1
- package/dist/client/assets/{index-DDp5gOuw.js → index-BDPw5_B7.js} +1 -1
- package/dist/client/assets/{index-ByOvX_ve.js → index-BYp7Ofgs.js} +3 -3
- package/dist/client/assets/{index-BgeQc437.js → index-BhkyjzCF.js} +1 -1
- package/dist/client/assets/{index-C34RmICP.js → index-BiNiHAi9.js} +1 -1
- package/dist/client/assets/{index-BTvzEEE4.js → index-BvSoUF3k.js} +1 -1
- package/dist/client/assets/{index-SAeZ5DI1.js → index-CRGi0rZP.js} +1 -1
- package/dist/client/assets/{index-PwHmdceA.js → index-CsCCWNU9.js} +5 -5
- package/dist/client/assets/{index-B_a3RFg9.js → index-D49TFDgG.js} +1 -1
- package/dist/client/assets/{index-C0ZnJYy-.js → index-DLj7x7R3.js} +1 -1
- package/dist/client/assets/{index-_3KKuOg4.js → index-DV-YI8KM.js} +1 -1
- package/dist/client/assets/{index-eWA8xKaL.js → index-HXlkJk8d.js} +1 -1
- package/dist/client/assets/index-R9eJcMBA.js +1 -0
- package/dist/client/assets/{index-redirect-uNIA84_Q.js → index-redirect-D_z5S11g.js} +1 -1
- package/dist/client/assets/{input-Bt7D33rg.js → input-C7dZO9ym.js} +1 -1
- package/dist/client/assets/{integration-icon-C5KirdUg.js → integration-icon-FGiS_d1C.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BuARwphh.js → invite-member-dialog-D1ExdVDs.js} +1 -1
- package/dist/client/assets/{label-BxgEeCbJ.js → label-C1WcZg4i.js} +1 -1
- package/dist/client/assets/{login-CaG_4y_B.js → login-DXbx_t2u.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CL0sljW9.js → mcp-oauth-D_BuxJo5.js} +1 -1
- package/dist/client/assets/{members--hV2Q0Ot.js → members-ClFgHkOh.js} +1 -1
- package/dist/client/assets/{monaco-editor-CbUVJEKg.js → monaco-editor-bcLWH9Yf.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DFi_Kdkh.js → monitoring-stats-row-DQjdFov1.js} +1 -1
- package/dist/client/assets/{oauth-callback-DAhYaKj8.js → oauth-callback-BONoAGnw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CR0F-hQD.js → oauth-callback-ai-provider-D2kGA20A.js} +1 -1
- package/dist/client/assets/{onboarding-BUFWneNv.js → onboarding-OfWimmEv.js} +1 -1
- package/dist/client/assets/{org-install-Bb2jIZ-L.js → org-install-CDsn26MI.js} +1 -1
- package/dist/client/assets/{org-layout-D_gYV_Zs.js → org-layout-C9pMQN-q.js} +1 -1
- package/dist/client/assets/{organization-choice-BvtQGOSW.js → organization-choice-S7ZXrRI1.js} +1 -1
- package/dist/client/assets/{page-seo-form-BWWbOuxt.js → page-seo-form-DVuWK58d.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BPUAn1gD.js +1 -0
- package/dist/client/assets/{popover-DzPhoKNT.js → popover-CxakTUJX.js} +1 -1
- package/dist/client/assets/{post-editor-Dl6eFOA9.js → post-editor-CuGlxxiD.js} +1 -1
- package/dist/client/assets/{primitives-CHpgu7zx.js → primitives-DWMNMXxf.js} +1 -1
- package/dist/client/assets/{profile-CuDAW9Ii.js → profile-B08zyo9T.js} +1 -1
- package/dist/client/assets/project-app-view-gIjSglNc.js +1 -0
- package/dist/client/assets/record-editor-DXrOuKcs.js +1 -0
- package/dist/client/assets/registry-Dpup9jP-.js +2 -0
- package/dist/client/assets/{registry-layout-BkbFqKCh.js → registry-layout-DEUUoxVX.js} +1 -1
- package/dist/client/assets/{require-capability-DGTSD8vx.js → require-capability-u4HmBddy.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BjrbsMWm.js → required-auth-layout-DQ3D6qQS.js} +1 -1
- package/dist/client/assets/{reset-password-BiKRZoQ2.js → reset-password-D5KmVqoe.js} +1 -1
- package/dist/client/assets/{roles-zCiQqsuK.js → roles-B9y6HK7U.js} +1 -1
- package/dist/client/assets/{search-input-kWxNIRnl.js → search-input-D8kV8LpY.js} +1 -1
- package/dist/client/assets/{secrets-viO9Xl5S.js → secrets-BY6FPIEt.js} +1 -1
- package/dist/client/assets/{sections-editor-W7VOMkOG.js → sections-editor-CQqC2IMh.js} +1 -1
- package/dist/client/assets/{select-8JaYnS6d.js → select-G_YqOyoi.js} +1 -1
- package/dist/client/assets/{select-model-B-2xubIJ.js → select-model-CaCFe0Qm.js} +1 -1
- package/dist/client/assets/{seo-editor-CFGBoPWr.js → seo-editor-CC4KlJFc.js} +1 -1
- package/dist/client/assets/{settings-layout-DNdkL202.js → settings-layout-DdC76rT-.js} +1 -1
- package/dist/client/assets/{settings-section-CAqTmyhS.js → settings-section-CLbCpPyp.js} +1 -1
- package/dist/client/assets/{shell-controls-Yg88zbSN.js → shell-controls-xp5svzIV.js} +1 -1
- package/dist/client/assets/{shell-layout-k2JSKYlm.js → shell-layout-CmMDmGXk.js} +1 -1
- package/dist/client/assets/{sidebar-C761eQb1.js → sidebar-DXJheAJA.js} +1 -1
- package/dist/client/assets/{skeleton-DSJYqmzp.js → skeleton-BAea7AlB.js} +1 -1
- package/dist/client/assets/{sso-CWcGb61Y.js → sso-C7I92c6D.js} +1 -1
- package/dist/client/assets/{store-DxbT2BKV.js → store-DIivY7IJ.js} +1 -1
- package/dist/client/assets/store-registry-CVneYPwx.js +2 -0
- package/dist/client/assets/{studio-tools-CgfSo7j_.js → studio-tools-D970x90m.js} +1 -1
- package/dist/client/assets/{switch-DhJhR8Ba.js → switch-D3WvQAp5.js} +1 -1
- package/dist/client/assets/{table-CDz46PoK.js → table-UT3NTBNO.js} +1 -1
- package/dist/client/assets/{tabs-BUhcO-L3.js → tabs-GPhk4mCA.js} +1 -1
- package/dist/client/assets/{textarea-BYx7whqS.js → textarea-ChqR5uQR.js} +1 -1
- package/dist/client/assets/{toggle-group-BZ189fjx.js → toggle-group-ClZzbpdF.js} +1 -1
- package/dist/client/assets/{toolbar-C5VXYU-N.js → toolbar-CBZulNRe.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DrS8O_Iq.js → toolbar-icon-button-CJQiVcrq.js} +1 -1
- package/dist/client/assets/{tools-list-DlkGTda2.js → tools-list-BwElXZDI.js} +1 -1
- package/dist/client/assets/{tooltip-B3P4mjnJ.js → tooltip-DB1pbaN7.js} +1 -1
- package/dist/client/assets/{types-CcSVLYhO.js → types-Br8gG1Yy.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CprIzBUo.js → use-ai-providers-KkX2eDSF.js} +1 -1
- package/dist/client/assets/{use-automations-2Be9XmPq.js → use-automations-CooMtuVY.js} +1 -1
- package/dist/client/assets/{use-capability-BPxQX6Oj.js → use-capability-BszFKA4z.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BjAPnH4G.js → use-clock-tick-a4_ohCGI.js} +1 -1
- package/dist/client/assets/{use-collections-b46PF-FB.js → use-collections-CQ-DHlk8.js} +1 -1
- package/dist/client/assets/{use-connection-DeGbigio.js → use-connection-BL3pH0HU.js} +1 -1
- package/dist/client/assets/{use-copy-D_xDaGph.js → use-copy-U1o477e9.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B-FWLpM6.js → use-create-virtual-mcp-CEL5Dbuw.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BuGW5-NP.js → use-debounced-autosave-CVjYZQZj.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CFIePpm0.js → use-debounced-value-Dkp5tW5n.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BLTRVndf.js → use-decopilot-events-FMOjcbHA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dl2mZ81L.js → use-delete-connection-3BD9aAiH.js} +1 -1
- package/dist/client/assets/{use-file-configs-BTnwV_7n.js → use-file-configs-S4PxYtlV.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ChaGSzFC.js → use-infinite-scroll-CI-YzSP5.js} +1 -1
- package/dist/client/assets/{use-join-requests-BMDS7ZyH.js → use-join-requests-BfcPQxf6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-u24P-s4P.js → use-mcp-client-DNdH0vv7.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BDBVNTlN.js → use-mcp-prompts-XEjrzief.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CocIQ7qB.js → use-mcp-tools-Bi-2En16.js} +1 -1
- package/dist/client/assets/{use-members-Bus4og0A.js → use-members-D2Jf8y76.js} +1 -1
- package/dist/client/assets/{use-mobile-C93OYfHB.js → use-mobile-DMdcKVFD.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DjAWkSGL.js → use-navigate-to-agent-cynSQiRw.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CA5gjmgW.js → use-org-auth-client-DXczVSBm.js} +1 -1
- package/dist/client/assets/{use-org-sso-CFBLq8qg.js → use-org-sso-B7dq-Mnj.js} +1 -1
- package/dist/client/assets/{use-organization-roles-h9scR-Kp.js → use-organization-roles-BAuTLcqM.js} +1 -1
- package/dist/client/assets/{use-organization-settings-EwmFXWWf.js → use-organization-settings-1kZ641DK.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D8Q8D5kz.js → use-registry-connections-B0FZfkFl.js} +1 -1
- package/dist/client/assets/{use-secrets-W7_VRgqz.js → use-secrets-CjQdbEZR.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DJJd7nCb.js → use-status-sounds-Csi7Mi_Q.js} +1 -1
- package/dist/client/assets/{use-view-mode-B0A1elcL.js → use-view-mode-BbI5V31J.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bc6ku1ke.js → use-virtual-mcp-DHTVzUmN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DDDNbQaX.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DPMsxGPA.js +1 -0
- package/dist/client/assets/{variant-calendar-DdJwieRy.js → variant-calendar-CwMegenq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BDMYTtyJ.js → view-mode-toggle-sTfLeCKf.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-CQvqUcGM.js +0 -1
- package/dist/client/assets/page-seo-sheet-98Jl6iTy.js +0 -1
- package/dist/client/assets/project-app-view-BkSNyja3.js +0 -1
- package/dist/client/assets/record-editor-D5qjtt77.js +0 -1
- package/dist/client/assets/registry-Dw9uBZ7-.js +0 -2
- package/dist/client/assets/store-registry-B_vQy0r8.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CwXupu4y.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ahqYuudo.js +0 -1
package/dist/client/assets/{agent-capabilities-giK3bRW-.js → agent-capabilities-DGJfVNFQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as Ie,a as en,W as un,J as mn,I as pn,j as n,B as Y,t as H,r as re,p as hn,b as fn,i as we,M as C,K as me,c as xn,Y as gn,V as jn,l as vn,k as yn}from"./index-ByOvX_ve.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-DT-riPtN.js";import{C as bn}from"./collection-search-EDEWD1X9.js";import{C as Nn}from"./collection-tabs-Cq6azV_u.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-mdwVf3Kr.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-C1_sXCgH.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-BstQPSyC.js";import{u as Ln}from"./use-mobile-C93OYfHB.js";import{F as M,b as B,c as O,d as L,e as $,a as Qe}from"./form-BB8De_xV.js";import{I as W}from"./input-Bt7D33rg.js";import{a as $n,c as En,d as Rn,S as zn,b as ue}from"./select-8JaYnS6d.js";import{T as Kn}from"./textarea-BYx7whqS.js";import{b as rn}from"./use-connection-DeGbigio.js";import{n as Se,c as $e}from"./XCircle-D680rHaa.js";import{s as Ee}from"./Star01-CWyyx_CI.js";import{al as Hn}from"./agent-icon-N5U1HeY1.js";import{s as Un}from"./XClose-DZ-fbd9x.js";import{c as Xn,i as be,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-DioUFOWc.js";import{u as Ye}from"./use-infinite-scroll-ChaGSzFC.js";import{a as Re}from"./authenticate-and-persist-oauth-B89lyITx.js";import{B as Ne}from"./badge-DdUP-taI.js";import{T as ze,a as Ke,b as He}from"./tooltip-B3P4mjnJ.js";import{u as Yn}from"./useSuspenseInfiniteQuery-ahqYuudo.js";import{u as Jn}from"./use-mcp-client-u24P-s4P.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-s3en6K6a.js";import{s as et}from"./Plus-DI8G3hjD.js";import{u as nt}from"./studio-tools-CgfSo7j_.js";import{u as tt}from"./use-ai-providers-CprIzBUo.js";function st({open:a,onOpenChange:e,onCreated:m}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:w}=un(),D=Ln(),E=rn(),d=nn(),R=tn(d,"").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:[]}}),x=o.watch("ui_type"),S=o.watch("connection_url"),F=o.watch("npx_package"),f=be({uiType:x,connectionUrl:S??"",npxPackage:F??""})??We({uiType:x,connectionUrl:S??"",registryItems:R}),r=t=>{const u=t.trim();if(!u)return;const s=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,y=l=>{if(l&&(!s&&!o.getValues("title").trim()&&l.title&&o.setValue("title",l.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&l.description&&o.setValue("description",l.description,{shouldDirty:!1}),!j&&l.envVarKeys?.length)){const N=o.getValues("env_vars")??[],q=new Set(N.map(V=>V.key)),pe=l.envVarKeys.filter(V=>!q.has(V));pe.length>0&&o.setValue("env_vars",[...N,...pe.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},g=Gn(u);if(g&&w){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",g.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:g.packageName}));return}if(u.startsWith("http://")||u.startsWith("https://")){const l=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";o.setValue("ui_type",l,{shouldDirty:!0}),o.setValue("connection_url",u,{shouldDirty:!0}),y(be({uiType:l,connectionUrl:u})??We({uiType:l,connectionUrl:u,registryItems:R}));return}x==="NPX"&&y(be({uiType:"NPX",npxPackage:u}))},z=t=>{t||o.reset(),e(t)},b=async t=>{let u,s=null,c=null,j=null;t.ui_type==="NPX"?(u="STDIO",s="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(u="STDIO",s="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(u=t.ui_type,s=t.connection_url||"",c=t.connection_token||null);const y=wn("conn");try{await E.create.mutateAsync({id:y,title:t.title,description:t.description||null,connection_type:u,connection_url:s,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.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(),e(!1),m?.(y)}catch{H.error("Failed to create connection")}},k="Create Connection",I="Create a custom connection in your organization. Fill in the details below.",U=o.formState.isSubmitting?"Saving...":"Create Connection",P=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(M,{control:o.control,name:"ui_type",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Type *"}),n.jsxs($n,{value:t.value,onValueChange:t.onChange,children:[n.jsx(L,{children:n.jsx(En,{children:n.jsx(Rn,{})})}),n.jsxs(zn,{children:[n.jsx(ue,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ue,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ue,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),w&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ue,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx($,{})]})}),x==="NPX"&&n.jsx(M,{control:o.control,name:"npx_package",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"NPM Package *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:u=>{const s=u.clipboardData.getData("text");s&&(u.preventDefault(),o.setValue("npx_package",s.trim(),{shouldDirty:!0}),r(s))},onBlur:u=>{r(u.target.value),t.onBlur()}})}),n.jsx($,{})]})}),x==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(M,{control:o.control,name:"stdio_command",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Command *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"node, bun, python...",...t,value:t.value??""})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"stdio_args",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Arguments"}),n.jsx(L,{children:n.jsx(W,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),n.jsx($,{})]})})]}),n.jsx(M,{control:o.control,name:"stdio_cwd",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Working Directory"}),n.jsx(L,{children:n.jsx(W,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx($,{})]})})]}),(x==="NPX"||x==="STDIO")&&n.jsx(M,{control:o.control,name:"env_vars",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Environment Variables"}),n.jsx(L,{children:n.jsx(qn,{value:t.value??[],onChange:t.onChange})}),n.jsx($,{})]})}),x!=="NPX"&&x!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(M,{control:o.control,name:"connection_url",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"URL *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:u=>{const s=u.clipboardData.getData("text");s&&(u.preventDefault(),o.setValue("connection_url",s.trim(),{shouldDirty:!0}),r(s))},onBlur:u=>{r(u.target.value),t.onBlur()}})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"connection_token",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:f?.token?.label??"Token (optional)"}),n.jsx(L,{children:n.jsx(W,{type:"password",placeholder:f?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),f?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.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"})]})]}),n.jsx($,{})]})})]}),n.jsx(M,{control:o.control,name:"title",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Name *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"My Connection",...t})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"description",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Description"}),n.jsx(L,{children:n.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),n.jsx($,{})]})})]});return D?n.jsx(Pn,{open:a,onOpenChange:z,children:n.jsxs(Tn,{className:"max-h-[90vh]",children:[n.jsx(Fn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Vn,{children:k}),n.jsx(Mn,{className:"mt-1",children:I})]}),n.jsx(Bn,{asChild:!0,children:n.jsx(Y,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Un,{size:16})})})]})}),n.jsx(Qe,{...o,children:n.jsxs("form",{onSubmit:o.handleSubmit(b),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:P}),n.jsx(On,{children:n.jsx(Y,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:U})})]})})]})}):n.jsx(sn,{open:a,onOpenChange:z,children:n.jsxs(on,{className:"sm:max-w-[525px]",children:[n.jsxs(an,{children:[n.jsx(cn,{children:k}),n.jsx(An,{children:I})]}),n.jsx(Qe,{...o,children:n.jsxs("form",{onSubmit:o.handleSubmit(b),children:[n.jsx("div",{className:"py-4",children:P}),n.jsxs(Dn,{children:[n.jsx(Y,{type:"button",variant:"outline",onClick:()=>z(!1),children:"Cancel"}),n.jsx(Y,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:U})]})]})})]})})}function ot(a){const e=xn.c(73),{mode:m,agentId:v,addedConnectionIds:h,onAdd:w,onCloneAndAdd:D,onConnectAndAdd:E,connectingItemId:d,search:_,onCreateConnection:R,onBrowseNavigate:o,defaultTab:x}=a,S=m===void 0?"add":m,F=x===void 0?"connected":x,{org:f}=Ie(),r=re.useDeferredValue(_),z=_!==r,b=r.trim().toLowerCase();let k;e[0]!==F?(k=i=>i??F,e[0]=F,e[1]=k):k=e[1];const[I,U]=gn(jn.connectionsTab(f.slug)+(F==="all"?":home-modal":":agent-modal"),k);let P;e[2]!==I||e[3]!==U?(P=i=>{i!==I&&C("connections_dialog_tab_changed",{to_tab:i}),U(i)},e[2]=I,e[3]=U,e[4]=P):P=e[4];const t=P;let u;e[5]!==f.id||e[6]!==f.slug?(u={connectionId:Zn,orgId:f.id,orgSlug:f.slug},e[5]=f.id,e[6]=f.slug,e[7]=u):u=e[7];const s=Jn(u);let c,j,y;if(e[8]!==s||e[9]!==r||e[10]!==f.id){y=r?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:r.trim()},{field:["description"],operator:"contains",value:r.trim()}]}:void 0;const i={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},p=JSON.stringify(i);j=Yn,c=me.collectionListInfinite(s,f.id,"","CONNECTIONS",p),e[8]=s,e[9]=r,e[10]=f.id,e[11]=c,e[12]=j,e[13]=y}else c=e[11],j=e[12],y=e[13];let g;e[14]!==s||e[15]!==y?(g=async i=>{const{pageParam:p}=i,K=p===void 0?0:p;return(await s.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:K}})).structuredContent},e[14]=s,e[15]=y,e[16]=g):g=e[16];let l;e[17]!==c||e[18]!==g?(l={queryKey:c,queryFn:g,initialPageParam:0,getNextPageParam:dt,staleTime:3e4},e[17]=c,e[18]=g,e[19]=l):l=e[19];const{data:N,fetchNextPage:q,hasNextPage:pe,isFetchingNextPage:V}=j(l),Xe=N?.pages.flatMap(lt)??[],he=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),fe=nn(),G=tn(fe,r),ke=Ye(G.loadMore,G.hasMore,G.isLoadingMore),Ae=Ye(q,pe??!1,V),T=I==="all"||!!b,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!b)return!0;const K=i._meta?.["mcp.mesh"];return[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,K?.friendly_name,K?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(b)}):[],le=qe.filter(it),de=qe.filter(at);let xe;e[20]!==h?(xe=i=>i.some(p=>h.has(p.id)),e[20]=h,e[21]=xe):xe=e[21];const De=xe;let ge;e[22]!==h||e[23]!==v||e[24]!==d||e[25]!==De||e[26]!==S||e[27]!==w||e[28]!==o||e[29]!==D?(ge=(i,p,K,ie,X)=>{const Ce=De(X),ce=X.find(Q=>!h.has(Q.id)),A=X[0];if(S==="browse"){const Q=_n(A);return n.jsx(Le,{connection:{title:p,icon:K,description:X.length>1?`${X.length} instances`:ie??void 0},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:X.length}),o?.(Q)}},i)}return n.jsx(Le,{connection:{title:p,icon:K,description:ie},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Added"]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),v&&C("agent_connection_attached",{agent_id:v,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),w(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},e[22]=h,e[23]=v,e[24]=d,e[25]=De,e[26]=S,e[27]=w,e[28]=o,e[29]=D,e[30]=ge):ge=e[30];const je=ge;let ve;e[31]!==d||e[32]!==S||e[33]!==E?(ve=i=>{const p=i._meta?.["mcp.mesh"],K=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",ie=i.server?.description||i.description||null,X=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,Ce=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return n.jsx(Le,{connection:{title:K,description:ie,icon:X},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&Ce&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!Ce&&ce&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(He,{children:"Verified by the Deco team"})]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),E(i)},children:d===i.id?n.jsx(we,{size:14,className:"animate-spin"}):S==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},e[31]=d,e[32]=S,e[33]=E,e[34]=ve):ve=e[34];const Ge=ve,Pe=!b&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:I,onTabChange:i=>t(i)}),n.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),R()},children:[n.jsx(et,{size:12}),"Custom Connection"]})]}),Te=z&&"opacity-50 pointer-events-none";let J;e[35]!==Te?(J=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),e[35]=Te,e[36]=J):J=e[36];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;e[37]!==je?(ye=i=>{if(i.type==="group")return je(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},e[37]=je,e[38]=ye):ye=e[38];const Fe=he.map(ye);let Z;e[39]!==Ae?(Z=n.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=Z):Z=e[40];let ee;e[41]!==V?(ee=V&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=ee):ee=e[42];const Ve=T&&le.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx($e,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&le.map(Ge),Be=T&&de.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&de.map(Ge);let ne;e[43]!==ke||e[44]!==fe||e[45]!==T?(ne=T&&fe.length>0&&n.jsx("div",{ref:ke,className:"col-span-full h-1"}),e[43]=ke,e[44]=fe,e[45]=T,e[46]=ne):ne=e[46];let te;e[47]!==G.isLoadingMore||e[48]!==T?(te=T&&G.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=G.isLoadingMore,e[48]=T,e[49]=te):te=e[49];let se;e[50]!==Fe||e[51]!==Z||e[52]!==ee||e[53]!==Ve||e[54]!==Me||e[55]!==Be||e[56]!==Oe||e[57]!==ne||e[58]!==te?(se=n.jsxs("div",{className:dn,children:[Fe,Z,ee,Ve,Me,Be,Oe,ne,te]}),e[50]=Fe,e[51]=Z,e[52]=ee,e[53]=Ve,e[54]=Me,e[55]=Be,e[56]=Oe,e[57]=ne,e[58]=te,e[59]=se):se=e[59];let oe;e[60]!==I||e[61]!==he.length||e[62]!==de||e[63]!==_||e[64]!==le?(oe=he.length===0&&le.length===0&&de.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:I==="connected"?"No connections yet":"No connections available"}),e[60]=I,e[61]=he.length,e[62]=de,e[63]=_,e[64]=le,e[65]=oe):oe=e[65];let ae;e[66]!==J||e[67]!==se||e[68]!==oe?(ae=n.jsxs("div",{className:J,children:[se,oe]}),e[66]=J,e[67]=se,e[68]=oe,e[69]=ae):ae=e[69];let _e;return e[70]!==Pe||e[71]!==ae?(_e=n.jsxs(n.Fragment,{children:[Pe,ae]}),e[70]=Pe,e[71]=ae,e[72]=_e):_e=e[72],_e}function at(a){return!a.verified&&!a._meta?.["mcp.mesh"]?.verified&&!a.meta?.verified}function it(a){return a.verified||a._meta?.["mcp.mesh"]?.verified||a.meta?.verified}function ct(a){return a.app_name}function rt(a){return a.app_name}function lt(a){return a?.items??[]}function dt(a,e){if(a?.hasMore)return e.reduce(ut,0)}function ut(a,e){return a+(e?.items?.length??0)}function zt({open:a,onOpenChange:e,defaultTab:m,initialSearch:v="",...h}){const w=h.mode??"add",D="agentId"in h?h.agentId:void 0,E="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,d="onAdd"in h&&h.onAdd?h.onAdd:s=>{},_=(s,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:s,app_name:c,mode:j})},[R,o]=re.useState(null),[x,S]=re.useState(v),[F,f]=re.useState(!1),{org:r}=Ie(),{data:z}=en.useSession(),b=rn(),k=hn(),I=fn(),U=s=>{e(!1),I({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:s}})},P=()=>{k.invalidateQueries({predicate:s=>{const c=s.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async s=>{o(s.app_name??s.id);try{const j=`${s.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,g=(await b.create.mutateAsync({title:j,description:s.description??null,connection_type:s.connection_type,connection_url:s.connection_url??null,connection_token:null,icon:s.icon??null,app_name:s.app_name??null,app_id:s.app_id??null,connection_headers:s.connection_headers??null})).id,l=await Re({connectionId:g,orgId:r.id,orgSlug:r.slug,persistFallback:N=>b.update.mutateAsync({id:g,data:{connection_token:N}}).then(()=>{})});if(l.ran&&!l.ok){C("connection_oauth_failed",{connection_id:g,flow:"clone",error:l.error??"no_token"}),H.error(`Authentication failed: ${l.error??"no token received"}`),await b.delete.mutateAsync(g);return}if(l.ran){C("connection_oauth_succeeded",{connection_id:g,flow:"clone"});const N=new URL(`/api/${r.slug}/mcp/${g}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(N.href,null)}),P()}_(g,s.app_name??null,"clone"),d(g)}catch(c){console.error("Failed to add connection:",c),H.error("Failed to add connection")}finally{o(null)}},u=async s=>{if(!(!r||!z?.user?.id)){o(s.id);try{const c=In(s,r.id,z.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",y=!!c.connection_url,g=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!y&&!g){H.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:l}=await b.create.mutateAsync(c),N=await Re({connectionId:l,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:l,data:{connection_token:q}}).then(()=>{})});if(N.ran&&!N.ok){C("connection_oauth_failed",{connection_id:l,flow:"connect_new",error:N.error??"no_token"}),H.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. (${N.error??"no token received"})`}),_(l,c.app_name??null,"new"),d(l);return}if(N.ran){C("connection_oauth_succeeded",{connection_id:l,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${l}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(q.href,null)}),P(),H.success("Connected and authenticated")}else H.success("Connected");_(l,c.app_name??null,"new"),d(l)}catch(c){console.error("Failed to connect:",c),H.error("Failed to connect")}finally{o(null)}}};return n.jsxs(sn,{open:a,onOpenChange:e,children:[n.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(cn,{className:"text-base font-semibold",children:w==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(bn,{value:x,onChange:S,placeholder:"Search connections..."})}),n.jsx(re.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(ot,{mode:w,agentId:D,addedConnectionIds:E,onAdd:d,onCloneAndAdd:t,onConnectAndAdd:u,connectingItemId:R,search:x,onCreateConnection:()=>f(!0),onBrowseNavigate:U,defaultTab:m})})]}),n.jsx(st,{open:F,onOpenChange:f,onCreated:async s=>{f(!1);const c=await Re({connectionId:s,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:s,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:s,flow:"custom_create",error:c.error??"no_token"}),H.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. (${c.error??"no token received"})`}),_(s,null,"custom"),d(s),e(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:s,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(j.href,null)}),P()}_(s,null,"custom"),d(s),e(!1)}})]})}const Ze=new Map;function Kt(){const{org:a}=Ie(),e=nt(),m=tt(),v=m.find(r=>r.providerId==="deco"),{data:h,isLoading:w,refetch:D,isFetching:E}=yn({queryKey:me.aiProviderCredits(a.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=h?.balanceCents??null,_=d!=null?d/100:null,R=re.useRef(new Map);if(d!=null){const r=Ze.get(a.id);R.current.get(a.id)&&r!=null&&d>r&&C("credits_topped_up_detected",{organization_id:a.id,delta_cents:d-r,previous_balance_cents:r,new_balance_cents:d}),Ze.set(a.id,d),R.current.set(a.id,!0)}const o=!!v,x=d!=null&&d>0,S=d!=null&&d===0,F=d!=null&&d===200,f=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:v?.id??null,balanceCents:d,balanceDollars:_,hasCredits:x,isZeroBalance:S,isInitialFreeCredit:F,hasOnlyDecoProvider:f,isLoading:w,isFetching:E,refetch:D}}function Ue(a){const e=a?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const m=e.connectionId;return!!m&&!!a?.connections?.some(w=>w.connection_id===m)?{status:"attached",repo:e,connectionId:m}:!!m||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function Ht(a){const e=Ue(a);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Ut(a){if(typeof a!="object"||a===null)return!1;const m=a.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(a){return Ue(a).status==="attached"}function qt(a){const e=Ue(a).status;return e==="attached"||e==="detached"}function Gt(a){const e=new Set;for(const m of a??[]){const v=m.metadata?.liveAgentId;typeof v=="string"&&v&&e.add(m.id)}return e}function Qt(a,e){if(!a)return null;const m=a.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const v=(e??[]).find(h=>h.metadata?.liveAgentId===a.id);return v?{mode:"live",targetId:v.id}:null}export{zt as A,Gt as a,Xt as b,Ut as c,qt as d,Qt as f,Ht as g,Ue as r,Kt as u};
|
|
1
|
+
import{Z as Ie,a as en,W as un,J as mn,I as pn,j as n,B as Y,t as H,r as re,p as hn,b as fn,i as we,M as C,K as me,c as xn,Y as gn,V as jn,l as vn,k as yn}from"./index-BYp7Ofgs.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-BkLSl9Um.js";import{C as bn}from"./collection-search-IlxdiWIS.js";import{C as Nn}from"./collection-tabs-B4OrNtqt.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-BjQiSug0.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-1Eqcgb9h.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-DgApXJiu.js";import{u as Ln}from"./use-mobile-DMdcKVFD.js";import{F as M,b as B,c as O,d as L,e as $,a as Qe}from"./form-uObUvJsx.js";import{I as W}from"./input-C7dZO9ym.js";import{a as $n,c as En,d as Rn,S as zn,b as ue}from"./select-G_YqOyoi.js";import{T as Kn}from"./textarea-ChqR5uQR.js";import{b as rn}from"./use-connection-BL3pH0HU.js";import{n as Se,c as $e}from"./XCircle-DhEfH4xa.js";import{s as Ee}from"./Star01-CVz_7GBv.js";import{al as Hn}from"./agent-icon-Cg17MSXd.js";import{s as Un}from"./XClose-7c8y3nr7.js";import{c as Xn,i as be,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-BPxpL3kZ.js";import{u as Ye}from"./use-infinite-scroll-CI-YzSP5.js";import{a as Re}from"./authenticate-and-persist-oauth-D74XVxJq.js";import{B as Ne}from"./badge-9NVu_VdI.js";import{T as ze,a as Ke,b as He}from"./tooltip-DB1pbaN7.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DPMsxGPA.js";import{u as Jn}from"./use-mcp-client-DNdH0vv7.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-BvrjRK-f.js";import{s as et}from"./Plus-DK37ytOg.js";import{u as nt}from"./studio-tools-D970x90m.js";import{u as tt}from"./use-ai-providers-KkX2eDSF.js";function st({open:a,onOpenChange:e,onCreated:m}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:w}=un(),D=Ln(),E=rn(),d=nn(),R=tn(d,"").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:[]}}),x=o.watch("ui_type"),S=o.watch("connection_url"),F=o.watch("npx_package"),f=be({uiType:x,connectionUrl:S??"",npxPackage:F??""})??We({uiType:x,connectionUrl:S??"",registryItems:R}),r=t=>{const u=t.trim();if(!u)return;const s=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,y=l=>{if(l&&(!s&&!o.getValues("title").trim()&&l.title&&o.setValue("title",l.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&l.description&&o.setValue("description",l.description,{shouldDirty:!1}),!j&&l.envVarKeys?.length)){const N=o.getValues("env_vars")??[],q=new Set(N.map(V=>V.key)),pe=l.envVarKeys.filter(V=>!q.has(V));pe.length>0&&o.setValue("env_vars",[...N,...pe.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},g=Gn(u);if(g&&w){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",g.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:g.packageName}));return}if(u.startsWith("http://")||u.startsWith("https://")){const l=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";o.setValue("ui_type",l,{shouldDirty:!0}),o.setValue("connection_url",u,{shouldDirty:!0}),y(be({uiType:l,connectionUrl:u})??We({uiType:l,connectionUrl:u,registryItems:R}));return}x==="NPX"&&y(be({uiType:"NPX",npxPackage:u}))},z=t=>{t||o.reset(),e(t)},b=async t=>{let u,s=null,c=null,j=null;t.ui_type==="NPX"?(u="STDIO",s="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(u="STDIO",s="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(u=t.ui_type,s=t.connection_url||"",c=t.connection_token||null);const y=wn("conn");try{await E.create.mutateAsync({id:y,title:t.title,description:t.description||null,connection_type:u,connection_url:s,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.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(),e(!1),m?.(y)}catch{H.error("Failed to create connection")}},k="Create Connection",I="Create a custom connection in your organization. Fill in the details below.",U=o.formState.isSubmitting?"Saving...":"Create Connection",P=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(M,{control:o.control,name:"ui_type",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Type *"}),n.jsxs($n,{value:t.value,onValueChange:t.onChange,children:[n.jsx(L,{children:n.jsx(En,{children:n.jsx(Rn,{})})}),n.jsxs(zn,{children:[n.jsx(ue,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ue,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ue,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),w&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ue,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx($,{})]})}),x==="NPX"&&n.jsx(M,{control:o.control,name:"npx_package",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"NPM Package *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:u=>{const s=u.clipboardData.getData("text");s&&(u.preventDefault(),o.setValue("npx_package",s.trim(),{shouldDirty:!0}),r(s))},onBlur:u=>{r(u.target.value),t.onBlur()}})}),n.jsx($,{})]})}),x==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(M,{control:o.control,name:"stdio_command",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Command *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"node, bun, python...",...t,value:t.value??""})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"stdio_args",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Arguments"}),n.jsx(L,{children:n.jsx(W,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),n.jsx($,{})]})})]}),n.jsx(M,{control:o.control,name:"stdio_cwd",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Working Directory"}),n.jsx(L,{children:n.jsx(W,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx($,{})]})})]}),(x==="NPX"||x==="STDIO")&&n.jsx(M,{control:o.control,name:"env_vars",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Environment Variables"}),n.jsx(L,{children:n.jsx(qn,{value:t.value??[],onChange:t.onChange})}),n.jsx($,{})]})}),x!=="NPX"&&x!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(M,{control:o.control,name:"connection_url",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"URL *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:u=>{const s=u.clipboardData.getData("text");s&&(u.preventDefault(),o.setValue("connection_url",s.trim(),{shouldDirty:!0}),r(s))},onBlur:u=>{r(u.target.value),t.onBlur()}})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"connection_token",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:f?.token?.label??"Token (optional)"}),n.jsx(L,{children:n.jsx(W,{type:"password",placeholder:f?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),f?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.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"})]})]}),n.jsx($,{})]})})]}),n.jsx(M,{control:o.control,name:"title",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Name *"}),n.jsx(L,{children:n.jsx(W,{placeholder:"My Connection",...t})}),n.jsx($,{})]})}),n.jsx(M,{control:o.control,name:"description",render:({field:t})=>n.jsxs(B,{children:[n.jsx(O,{children:"Description"}),n.jsx(L,{children:n.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),n.jsx($,{})]})})]});return D?n.jsx(Pn,{open:a,onOpenChange:z,children:n.jsxs(Tn,{className:"max-h-[90vh]",children:[n.jsx(Fn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Vn,{children:k}),n.jsx(Mn,{className:"mt-1",children:I})]}),n.jsx(Bn,{asChild:!0,children:n.jsx(Y,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Un,{size:16})})})]})}),n.jsx(Qe,{...o,children:n.jsxs("form",{onSubmit:o.handleSubmit(b),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:P}),n.jsx(On,{children:n.jsx(Y,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:U})})]})})]})}):n.jsx(sn,{open:a,onOpenChange:z,children:n.jsxs(on,{className:"sm:max-w-[525px]",children:[n.jsxs(an,{children:[n.jsx(cn,{children:k}),n.jsx(An,{children:I})]}),n.jsx(Qe,{...o,children:n.jsxs("form",{onSubmit:o.handleSubmit(b),children:[n.jsx("div",{className:"py-4",children:P}),n.jsxs(Dn,{children:[n.jsx(Y,{type:"button",variant:"outline",onClick:()=>z(!1),children:"Cancel"}),n.jsx(Y,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:U})]})]})})]})})}function ot(a){const e=xn.c(73),{mode:m,agentId:v,addedConnectionIds:h,onAdd:w,onCloneAndAdd:D,onConnectAndAdd:E,connectingItemId:d,search:_,onCreateConnection:R,onBrowseNavigate:o,defaultTab:x}=a,S=m===void 0?"add":m,F=x===void 0?"connected":x,{org:f}=Ie(),r=re.useDeferredValue(_),z=_!==r,b=r.trim().toLowerCase();let k;e[0]!==F?(k=i=>i??F,e[0]=F,e[1]=k):k=e[1];const[I,U]=gn(jn.connectionsTab(f.slug)+(F==="all"?":home-modal":":agent-modal"),k);let P;e[2]!==I||e[3]!==U?(P=i=>{i!==I&&C("connections_dialog_tab_changed",{to_tab:i}),U(i)},e[2]=I,e[3]=U,e[4]=P):P=e[4];const t=P;let u;e[5]!==f.id||e[6]!==f.slug?(u={connectionId:Zn,orgId:f.id,orgSlug:f.slug},e[5]=f.id,e[6]=f.slug,e[7]=u):u=e[7];const s=Jn(u);let c,j,y;if(e[8]!==s||e[9]!==r||e[10]!==f.id){y=r?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:r.trim()},{field:["description"],operator:"contains",value:r.trim()}]}:void 0;const i={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},p=JSON.stringify(i);j=Yn,c=me.collectionListInfinite(s,f.id,"","CONNECTIONS",p),e[8]=s,e[9]=r,e[10]=f.id,e[11]=c,e[12]=j,e[13]=y}else c=e[11],j=e[12],y=e[13];let g;e[14]!==s||e[15]!==y?(g=async i=>{const{pageParam:p}=i,K=p===void 0?0:p;return(await s.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:K}})).structuredContent},e[14]=s,e[15]=y,e[16]=g):g=e[16];let l;e[17]!==c||e[18]!==g?(l={queryKey:c,queryFn:g,initialPageParam:0,getNextPageParam:dt,staleTime:3e4},e[17]=c,e[18]=g,e[19]=l):l=e[19];const{data:N,fetchNextPage:q,hasNextPage:pe,isFetchingNextPage:V}=j(l),Xe=N?.pages.flatMap(lt)??[],he=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),fe=nn(),G=tn(fe,r),ke=Ye(G.loadMore,G.hasMore,G.isLoadingMore),Ae=Ye(q,pe??!1,V),T=I==="all"||!!b,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!b)return!0;const K=i._meta?.["mcp.mesh"];return[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,K?.friendly_name,K?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(b)}):[],le=qe.filter(it),de=qe.filter(at);let xe;e[20]!==h?(xe=i=>i.some(p=>h.has(p.id)),e[20]=h,e[21]=xe):xe=e[21];const De=xe;let ge;e[22]!==h||e[23]!==v||e[24]!==d||e[25]!==De||e[26]!==S||e[27]!==w||e[28]!==o||e[29]!==D?(ge=(i,p,K,ie,X)=>{const Ce=De(X),ce=X.find(Q=>!h.has(Q.id)),A=X[0];if(S==="browse"){const Q=_n(A);return n.jsx(Le,{connection:{title:p,icon:K,description:X.length>1?`${X.length} instances`:ie??void 0},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:X.length}),o?.(Q)}},i)}return n.jsx(Le,{connection:{title:p,icon:K,description:ie},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Added"]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),v&&C("agent_connection_attached",{agent_id:v,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),w(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},e[22]=h,e[23]=v,e[24]=d,e[25]=De,e[26]=S,e[27]=w,e[28]=o,e[29]=D,e[30]=ge):ge=e[30];const je=ge;let ve;e[31]!==d||e[32]!==S||e[33]!==E?(ve=i=>{const p=i._meta?.["mcp.mesh"],K=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",ie=i.server?.description||i.description||null,X=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,Ce=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return n.jsx(Le,{connection:{title:K,description:ie,icon:X},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&Ce&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!Ce&&ce&&n.jsxs(ze,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(He,{children:"Verified by the Deco team"})]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),E(i)},children:d===i.id?n.jsx(we,{size:14,className:"animate-spin"}):S==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},e[31]=d,e[32]=S,e[33]=E,e[34]=ve):ve=e[34];const Ge=ve,Pe=!b&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:I,onTabChange:i=>t(i)}),n.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),R()},children:[n.jsx(et,{size:12}),"Custom Connection"]})]}),Te=z&&"opacity-50 pointer-events-none";let J;e[35]!==Te?(J=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),e[35]=Te,e[36]=J):J=e[36];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;e[37]!==je?(ye=i=>{if(i.type==="group")return je(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},e[37]=je,e[38]=ye):ye=e[38];const Fe=he.map(ye);let Z;e[39]!==Ae?(Z=n.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=Z):Z=e[40];let ee;e[41]!==V?(ee=V&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=ee):ee=e[42];const Ve=T&&le.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx($e,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&le.map(Ge),Be=T&&de.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&de.map(Ge);let ne;e[43]!==ke||e[44]!==fe||e[45]!==T?(ne=T&&fe.length>0&&n.jsx("div",{ref:ke,className:"col-span-full h-1"}),e[43]=ke,e[44]=fe,e[45]=T,e[46]=ne):ne=e[46];let te;e[47]!==G.isLoadingMore||e[48]!==T?(te=T&&G.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=G.isLoadingMore,e[48]=T,e[49]=te):te=e[49];let se;e[50]!==Fe||e[51]!==Z||e[52]!==ee||e[53]!==Ve||e[54]!==Me||e[55]!==Be||e[56]!==Oe||e[57]!==ne||e[58]!==te?(se=n.jsxs("div",{className:dn,children:[Fe,Z,ee,Ve,Me,Be,Oe,ne,te]}),e[50]=Fe,e[51]=Z,e[52]=ee,e[53]=Ve,e[54]=Me,e[55]=Be,e[56]=Oe,e[57]=ne,e[58]=te,e[59]=se):se=e[59];let oe;e[60]!==I||e[61]!==he.length||e[62]!==de||e[63]!==_||e[64]!==le?(oe=he.length===0&&le.length===0&&de.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:I==="connected"?"No connections yet":"No connections available"}),e[60]=I,e[61]=he.length,e[62]=de,e[63]=_,e[64]=le,e[65]=oe):oe=e[65];let ae;e[66]!==J||e[67]!==se||e[68]!==oe?(ae=n.jsxs("div",{className:J,children:[se,oe]}),e[66]=J,e[67]=se,e[68]=oe,e[69]=ae):ae=e[69];let _e;return e[70]!==Pe||e[71]!==ae?(_e=n.jsxs(n.Fragment,{children:[Pe,ae]}),e[70]=Pe,e[71]=ae,e[72]=_e):_e=e[72],_e}function at(a){return!a.verified&&!a._meta?.["mcp.mesh"]?.verified&&!a.meta?.verified}function it(a){return a.verified||a._meta?.["mcp.mesh"]?.verified||a.meta?.verified}function ct(a){return a.app_name}function rt(a){return a.app_name}function lt(a){return a?.items??[]}function dt(a,e){if(a?.hasMore)return e.reduce(ut,0)}function ut(a,e){return a+(e?.items?.length??0)}function zt({open:a,onOpenChange:e,defaultTab:m,initialSearch:v="",...h}){const w=h.mode??"add",D="agentId"in h?h.agentId:void 0,E="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,d="onAdd"in h&&h.onAdd?h.onAdd:s=>{},_=(s,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:s,app_name:c,mode:j})},[R,o]=re.useState(null),[x,S]=re.useState(v),[F,f]=re.useState(!1),{org:r}=Ie(),{data:z}=en.useSession(),b=rn(),k=hn(),I=fn(),U=s=>{e(!1),I({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:s}})},P=()=>{k.invalidateQueries({predicate:s=>{const c=s.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async s=>{o(s.app_name??s.id);try{const j=`${s.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,g=(await b.create.mutateAsync({title:j,description:s.description??null,connection_type:s.connection_type,connection_url:s.connection_url??null,connection_token:null,icon:s.icon??null,app_name:s.app_name??null,app_id:s.app_id??null,connection_headers:s.connection_headers??null})).id,l=await Re({connectionId:g,orgId:r.id,orgSlug:r.slug,persistFallback:N=>b.update.mutateAsync({id:g,data:{connection_token:N}}).then(()=>{})});if(l.ran&&!l.ok){C("connection_oauth_failed",{connection_id:g,flow:"clone",error:l.error??"no_token"}),H.error(`Authentication failed: ${l.error??"no token received"}`),await b.delete.mutateAsync(g);return}if(l.ran){C("connection_oauth_succeeded",{connection_id:g,flow:"clone"});const N=new URL(`/api/${r.slug}/mcp/${g}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(N.href,null)}),P()}_(g,s.app_name??null,"clone"),d(g)}catch(c){console.error("Failed to add connection:",c),H.error("Failed to add connection")}finally{o(null)}},u=async s=>{if(!(!r||!z?.user?.id)){o(s.id);try{const c=In(s,r.id,z.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",y=!!c.connection_url,g=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!y&&!g){H.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:l}=await b.create.mutateAsync(c),N=await Re({connectionId:l,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:l,data:{connection_token:q}}).then(()=>{})});if(N.ran&&!N.ok){C("connection_oauth_failed",{connection_id:l,flow:"connect_new",error:N.error??"no_token"}),H.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. (${N.error??"no token received"})`}),_(l,c.app_name??null,"new"),d(l);return}if(N.ran){C("connection_oauth_succeeded",{connection_id:l,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${l}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(q.href,null)}),P(),H.success("Connected and authenticated")}else H.success("Connected");_(l,c.app_name??null,"new"),d(l)}catch(c){console.error("Failed to connect:",c),H.error("Failed to connect")}finally{o(null)}}};return n.jsxs(sn,{open:a,onOpenChange:e,children:[n.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(cn,{className:"text-base font-semibold",children:w==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(bn,{value:x,onChange:S,placeholder:"Search connections..."})}),n.jsx(re.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(ot,{mode:w,agentId:D,addedConnectionIds:E,onAdd:d,onCloneAndAdd:t,onConnectAndAdd:u,connectingItemId:R,search:x,onCreateConnection:()=>f(!0),onBrowseNavigate:U,defaultTab:m})})]}),n.jsx(st,{open:F,onOpenChange:f,onCreated:async s=>{f(!1);const c=await Re({connectionId:s,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:s,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:s,flow:"custom_create",error:c.error??"no_token"}),H.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. (${c.error??"no token received"})`}),_(s,null,"custom"),d(s),e(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:s,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(j.href,null)}),P()}_(s,null,"custom"),d(s),e(!1)}})]})}const Ze=new Map;function Kt(){const{org:a}=Ie(),e=nt(),m=tt(),v=m.find(r=>r.providerId==="deco"),{data:h,isLoading:w,refetch:D,isFetching:E}=yn({queryKey:me.aiProviderCredits(a.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=h?.balanceCents??null,_=d!=null?d/100:null,R=re.useRef(new Map);if(d!=null){const r=Ze.get(a.id);R.current.get(a.id)&&r!=null&&d>r&&C("credits_topped_up_detected",{organization_id:a.id,delta_cents:d-r,previous_balance_cents:r,new_balance_cents:d}),Ze.set(a.id,d),R.current.set(a.id,!0)}const o=!!v,x=d!=null&&d>0,S=d!=null&&d===0,F=d!=null&&d===200,f=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:v?.id??null,balanceCents:d,balanceDollars:_,hasCredits:x,isZeroBalance:S,isInitialFreeCredit:F,hasOnlyDecoProvider:f,isLoading:w,isFetching:E,refetch:D}}function Ue(a){const e=a?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const m=e.connectionId;return!!m&&!!a?.connections?.some(w=>w.connection_id===m)?{status:"attached",repo:e,connectionId:m}:!!m||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function Ht(a){const e=Ue(a);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Ut(a){if(typeof a!="object"||a===null)return!1;const m=a.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(a){return Ue(a).status==="attached"}function qt(a){const e=Ue(a).status;return e==="attached"||e==="detached"}function Gt(a){const e=new Set;for(const m of a??[]){const v=m.metadata?.liveAgentId;typeof v=="string"&&v&&e.add(m.id)}return e}function Qt(a,e){if(!a)return null;const m=a.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const v=(e??[]).find(h=>h.metadata?.liveAgentId===a.id);return v?{mode:"live",targetId:v.id}:null}export{zt as A,Gt as a,Xt as b,Ut as c,qt as d,Qt as f,Ht as g,Ue as r,Kt as u};
|