decocms 4.46.1 → 4.46.3
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-ue4dpYQZ.js → AlertCircle-Bs_wXuWl.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CzxgcY0_.js → ArrowUpRight-D-hu3vIg.js} +1 -1
- package/dist/client/assets/{Check-o4IMkC0H.js → Check-Dl_2v6Kk.js} +1 -1
- package/dist/client/assets/{CheckCircle-COcjaoge.js → CheckCircle-DtcfPrEb.js} +1 -1
- package/dist/client/assets/{ChevronDown-goyFMKYC.js → ChevronDown-B9LgUAOZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-OB9ocG6Z.js → ChevronRight-phXeHJw1.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dnb0lY_p.js → ChevronUp-xkzbD3Ra.js} +1 -1
- package/dist/client/assets/{Circle-kYeB2wXY.js → Circle-fEcGh_tS.js} +1 -1
- package/dist/client/assets/{Copy01-DJhQRvwr.js → Copy01-DPBAEw2B.js} +1 -1
- package/dist/client/assets/{DotsVertical-D_xctDU7.js → DotsVertical-qB1q2RUr.js} +1 -1
- package/dist/client/assets/{Eye-CKkSX_AS.js → Eye-CdwqgCcR.js} +1 -1
- package/dist/client/assets/{FilterLines-dM6BvKds.js → FilterLines-Chx5d57m.js} +1 -1
- package/dist/client/assets/{Globe01-BiTS4JLS.js → Globe01-CrAGLR23.js} +1 -1
- package/dist/client/assets/{Globe04-CBmtnZAU.js → Globe04-DUQMV3oU.js} +1 -1
- package/dist/client/assets/{HardDrive-DzSkZar-.js → HardDrive-S-95q9-p.js} +1 -1
- package/dist/client/assets/{Key01-B6aPvJoc.js → Key01-DMHLkg1_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DK13Wq1S.js → LayoutLeft-BMpvsLSg.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DCD2YsMs.js → LinkExternal01-_30m7XL_.js} +1 -1
- package/dist/client/assets/{List-DZf1CbvE.js → List-CWub3Ntn.js} +1 -1
- package/dist/client/assets/{Loading02-DXSwI1LJ.js → Loading02-CCBE_uv2.js} +1 -1
- package/dist/client/assets/{Monitor01-Bfsr_lO4.js → Monitor01-DPeevDy2.js} +1 -1
- package/dist/client/assets/{Palette-C4SxOUJ7.js → Palette-ii0pnmM_.js} +1 -1
- package/dist/client/assets/{Play-D-LoOSrv.js → Play-CetmFCjw.js} +1 -1
- package/dist/client/assets/{Plus-Cpk__IrK.js → Plus-DnmBhP91.js} +1 -1
- package/dist/client/assets/{SearchLg-DJzm0ufx.js → SearchLg-DJ9wOeOE.js} +1 -1
- package/dist/client/assets/{SearchMd-CT0uZbvC.js → SearchMd-CtX9-hw8.js} +1 -1
- package/dist/client/assets/{Settings02-SZSqP-uQ.js → Settings02-CLVr1KLF.js} +1 -1
- package/dist/client/assets/{Shield01-FQkd0Rzw.js → Shield01-D2dV945D.js} +1 -1
- package/dist/client/assets/{Star01-B_fupSXJ.js → Star01-DohQLS4t.js} +1 -1
- package/dist/client/assets/{Stars01-B5wbEr9l.js → Stars01-BWdK-D8u.js} +1 -1
- package/dist/client/assets/{Stars02-CLq3Oe-N.js → Stars02-C-gZqewj.js} +1 -1
- package/dist/client/assets/{Sun-CxEuo7u0.js → Sun-BZ1myfmR.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-XcI1YF1K.js → SwitchHorizontal01-D1fVD_f1.js} +1 -1
- package/dist/client/assets/{Tool01-By3jq4Go.js → Tool01-ChLH49Pu.js} +1 -1
- package/dist/client/assets/{Trash01-BdtXxui-.js → Trash01-CRQYivUc.js} +1 -1
- package/dist/client/assets/{Upload01-BE_zlAus.js → Upload01-DInVWFcm.js} +1 -1
- package/dist/client/assets/{User01-x6rXkIW6.js → User01-BQ9MGNnh.js} +1 -1
- package/dist/client/assets/{Users01-C1-JLXab.js → Users01-ZMSkLhTE.js} +1 -1
- package/dist/client/assets/{Users03-Dxj6kAM2.js → Users03-DPLEm1zy.js} +1 -1
- package/dist/client/assets/{X-BU8j_LPc.js → X-CR4cZsOQ.js} +1 -1
- package/dist/client/assets/{XCircle-Bs14VgYx.js → XCircle-DtD5Ond8.js} +1 -1
- package/dist/client/assets/{XClose-SQhAqs2a.js → XClose-CZwseyzK.js} +1 -1
- package/dist/client/assets/{Zap-AMDLEcfe.js → Zap-C-0_yPTx.js} +1 -1
- package/dist/client/assets/{ZapSquare-CtK97fBM.js → ZapSquare-DPvmxKvp.js} +1 -1
- package/dist/client/assets/{ZoomOut-CqKSgvAD.js → ZoomOut-C4d2b5OI.js} +1 -1
- package/dist/client/assets/{access-gate-DgKZ3MhZ.js → access-gate-B5Nm196o.js} +1 -1
- package/dist/client/assets/{add-section-modal-Cbqsz1bp.js → add-section-modal-CRKmARZo.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Cm5HYFmQ.js → agent-capabilities-C91jFxqd.js} +1 -1
- package/dist/client/assets/{agent-icon-CHGytPYJ.js → agent-icon-Dws4XouX.js} +1 -1
- package/dist/client/assets/{agents-list-nICD64iu.js → agents-list-DYx9tcrF.js} +1 -1
- package/dist/client/assets/{ai-providers-BdSM2N-z.js → ai-providers-2Pp_HSff.js} +1 -1
- package/dist/client/assets/{alert-C92kF-y9.js → alert-DSgiKrJ2.js} +1 -1
- package/dist/client/assets/{alert-dialog-akwSPvU_.js → alert-dialog-B37ryRKN.js} +1 -1
- package/dist/client/assets/app-editor-BFhNxKGC.js +1 -0
- package/dist/client/assets/{auth-D87ECqTf.js → auth-bNFKPSRV.js} +1 -1
- package/dist/client/assets/{auth-catchall-CREA2fmU.js → auth-catchall-gwokWNm4.js} +1 -1
- package/dist/client/assets/{auth-entry-BnQqDenj.js → auth-entry-DWGB0zZl.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Qh9VhZj-.js → auth-split-layout-DPlSkMZY.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DoQRhISA.js → authenticate-and-persist-oauth-ByNtVmwR.js} +1 -1
- package/dist/client/assets/{automation-list-row-y71H3DG2.js → automation-list-row-DbubQVd-.js} +1 -1
- package/dist/client/assets/{automation-runs-CTXk6el1.js → automation-runs-DQ6Sx3Eo.js} +1 -1
- package/dist/client/assets/{automations-CYsHMYY8.js → automations-_K9ZlqFY.js} +1 -1
- package/dist/client/assets/{autosend-CYkAGAO9.js → autosend-D9Cwt4AG.js} +1 -1
- package/dist/client/assets/{avatar-DYy4f5kx.js → avatar-CabKv0Je.js} +1 -1
- package/dist/client/assets/{badge-DwmkR0N4.js → badge-BAjGZv6o.js} +1 -1
- package/dist/client/assets/{block-document-B51ImCNd.js → block-document-1lbxw1Pz.js} +2 -2
- package/dist/client/assets/{brand-context-CxM9z-Uz.js → brand-context-DR98h6pO.js} +1 -1
- package/dist/client/assets/{breadcrumb-BNQqUXrP.js → breadcrumb-DBqZTyYR.js} +1 -1
- package/dist/client/assets/{buckets-f7RGr9gg.js → buckets-OP-ENdYR.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Df51OGXX.js → bulk-category-panel-DJrIeQEv.js} +1 -1
- package/dist/client/assets/{calendar-BQOldXJN.js → calendar-BBtXAX6R.js} +1 -1
- package/dist/client/assets/{capability-load-error-Bv8WfGLf.js → capability-load-error-BuVDL6uh.js} +1 -1
- package/dist/client/assets/{card-CpU3iJrj.js → card-CHYu3KSM.js} +1 -1
- package/dist/client/assets/category-editor-AZmn0eTl.js +1 -0
- package/dist/client/assets/{chat-context-CPPFBivf.js → chat-context-YO6oB06K.js} +1 -1
- package/dist/client/assets/{checkbox-D_oAnLUR.js → checkbox-Dp7BsUj6.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DICi9srL.js → cli-auth-success-Bf09C3Ac.js} +1 -1
- package/dist/client/assets/{collection-detail-F20WOCCA.js → collection-detail-Cfk2nI6r.js} +1 -1
- package/dist/client/assets/{collection-display-button-DOxYRL40.js → collection-display-button-ClxvP6dk.js} +1 -1
- package/dist/client/assets/{collection-search-nXgNWOlu.js → collection-search-DqFYsS2f.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CfPA4-HR.js → collection-table-wrapper-CTtmEc3G.js} +1 -1
- package/dist/client/assets/{collection-tabs-CMh3M6dF.js → collection-tabs-Dfpjtn5X.js} +1 -1
- package/dist/client/assets/{command-NgEu6Y2W.js → command-DHSoe4IT.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DsAA2dme.js → commerce-onboarding-BUr8aGJF.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BomxzcX4.js → connect-desktop-dialog-DH7RRC98.js} +1 -1
- package/dist/client/assets/{connection-card-CdFMHTip.js → connection-card-D7UMhmoL.js} +1 -1
- package/dist/client/assets/{connection-detail-C-Ecvq8F.js → connection-detail-BuEzYnHp.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CyYj3Wny.js → connection-form-helpers-BoLhqJuB.js} +1 -1
- package/dist/client/assets/{connections-DCluLdUi.js → connections-py0L93DC.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DvU_S6aj.js → decopilot-sse-pool-4j0bpc3x.js} +1 -1
- package/dist/client/assets/{dialog-BWuLPbg0.js → dialog-wWwKTugd.js} +1 -1
- package/dist/client/assets/{domain-settings-VzmjQVdo.js → domain-settings-C7z_f1Hv.js} +1 -1
- package/dist/client/assets/{drawer-Cr5fMabi.js → drawer-DvfRkFdD.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BngT7x1Y.js → dropdown-menu-Br92Jyqi.js} +1 -1
- package/dist/client/assets/{empty-state-BN0-jHsv.js → empty-state-tnSLdo87.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DKf3Mif8.js → extract-connection-data-61ceTNtY.js} +1 -1
- package/dist/client/assets/{file-explorer-DOrGc2XM.js → file-explorer-Q4ZBx-Co.js} +1 -1
- package/dist/client/assets/{file-type-icon-C6awcVAk.js → file-type-icon-D5XAGckp.js} +1 -1
- package/dist/client/assets/{files-D44dTzuK.js → files-yYBXdu5E.js} +1 -1
- package/dist/client/assets/{form-DSQg44DT.js → form-opTKWwEv.js} +1 -1
- package/dist/client/assets/{general-lhb-15Pq.js → general-DUKjSchE.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CMWXlm0y.js → github-repo-picker-CFdZyzLb.js} +1 -1
- package/dist/client/assets/{hooks-Djvx8zEb.js → hooks-Bop7T0vf.js} +1 -1
- package/dist/client/assets/{index-BFtPkxIA.js → index-0tfCUyYo.js} +27 -27
- package/dist/client/assets/{index-Dxcn_nOJ.js → index-1tq-v_jD.js} +3 -3
- package/dist/client/assets/{index-DGIDTK-_.js → index-3Xo4qFwm.js} +1 -1
- package/dist/client/assets/{index-fuTnqozZ.js → index-6qRF_O5C.js} +1 -1
- package/dist/client/assets/{index-DxN3OGlI.js → index-BHM6RuHB.js} +1 -1
- package/dist/client/assets/{index-Dk-3i0du.js → index-BmKkEWGS.js} +1 -1
- package/dist/client/assets/{index-BY-vf9fW.js → index-C00kYNdQ.js} +1 -1
- package/dist/client/assets/{index-a4WWCnZf.js → index-CD_DYnfR.js} +1 -1
- package/dist/client/assets/{index-DKoyKZVS.js → index-DE7pHSDr.js} +1 -1
- package/dist/client/assets/{index-CctFkEOe.js → index-DLA0Xzfl.js} +1 -1
- package/dist/client/assets/{index-DQOxa3pB.js → index-DO61o-25.js} +1 -1
- package/dist/client/assets/{index-D4-UNs8k.js → index-iAcEm1RT.js} +1 -1
- package/dist/client/assets/{index-C9jisDwN.js → index-iY-oVdHC.js} +1 -1
- package/dist/client/assets/{index-CJNFSEE4.js → index-mNcxGFnR.js} +1 -1
- package/dist/client/assets/{index-redirect-EZG_Hkpb.js → index-redirect-DALPgCf4.js} +1 -1
- package/dist/client/assets/{input-DbIh_DQ-.js → input-DIWznmhc.js} +1 -1
- package/dist/client/assets/{integration-icon-CyrLcl0w.js → integration-icon-ChfcGQu8.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BhTLN0do.js → invite-member-dialog-CLMTHzRe.js} +1 -1
- package/dist/client/assets/{label-DBDoccAF.js → label-7jOXgNLX.js} +1 -1
- package/dist/client/assets/{login-52s4jqeZ.js → login-GxM3Ncg_.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DbRPzhn9.js → mcp-oauth-BaZwrfVr.js} +1 -1
- package/dist/client/assets/{members-QdrGP178.js → members-YBkwoXOX.js} +1 -1
- package/dist/client/assets/{monaco-editor-uQEIlX_m.js → monaco-editor-Cie4qBii.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Rqyjk7x_.js → monitoring-stats-row-B4sgiBsZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-Y_usLNxH.js → oauth-callback-CODJD9Bn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-c7WjsMwH.js → oauth-callback-ai-provider-Dcq5hUuh.js} +1 -1
- package/dist/client/assets/{onboarding-CjdWwC7X.js → onboarding-DoFafcds.js} +1 -1
- package/dist/client/assets/{org-install-BZ3bz4iC.js → org-install-BbImmZ_G.js} +1 -1
- package/dist/client/assets/{org-layout-BY0KLujV.js → org-layout-CiNaUz6V.js} +1 -1
- package/dist/client/assets/{organization-choice-BLXf7HJL.js → organization-choice-DYIAiQyO.js} +1 -1
- package/dist/client/assets/{page-seo-form-DwXLnVbi.js → page-seo-form-T3o27-Es.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bm9px5g1.js +1 -0
- package/dist/client/assets/{popover-DH-tspBU.js → popover-BQrkAlcE.js} +1 -1
- package/dist/client/assets/{post-editor-CGVom6Qk.js → post-editor-Ci8gYg-J.js} +1 -1
- package/dist/client/assets/{primitives-3Ll5eqMc.js → primitives-Cs4xTvsa.js} +1 -1
- package/dist/client/assets/{profile-2QYC5WSv.js → profile-B-7Jlep3.js} +1 -1
- package/dist/client/assets/project-app-view-lSUYl-lN.js +1 -0
- package/dist/client/assets/record-editor-BtgdjtXU.js +1 -0
- package/dist/client/assets/{registry-layout-BIsUyVA0.js → registry-layout-B3YGCqc8.js} +1 -1
- package/dist/client/assets/registry-p-0xfsr7.js +2 -0
- package/dist/client/assets/{require-capability-BmD1GBkw.js → require-capability-SyRU4Ek8.js} +1 -1
- package/dist/client/assets/{required-auth-layout--gLDVB4t.js → required-auth-layout-WkGF_lYm.js} +1 -1
- package/dist/client/assets/{reset-password-DaHA3q_T.js → reset-password-BnEz6DJt.js} +1 -1
- package/dist/client/assets/{roles-BuUInyTX.js → roles-AfItvO1z.js} +1 -1
- package/dist/client/assets/{search-input-BSqsT7-1.js → search-input-BnYHkkIm.js} +1 -1
- package/dist/client/assets/{secrets-M7UTtmj2.js → secrets-DHWkowK7.js} +1 -1
- package/dist/client/assets/sections-editor-BRaDS4DV.js +2 -0
- package/dist/client/assets/{select-DxQd4Zje.js → select-B1S4w9cB.js} +1 -1
- package/dist/client/assets/{select-model-C-_je9Th.js → select-model-D5g6N8mv.js} +1 -1
- package/dist/client/assets/{seo-editor-Cseqp1MV.js → seo-editor-BHcaq0UK.js} +1 -1
- package/dist/client/assets/{settings-layout-ksvVGXQv.js → settings-layout-Drq7NCxP.js} +1 -1
- package/dist/client/assets/{settings-section-DHvcU_ow.js → settings-section-CGHtX3m6.js} +1 -1
- package/dist/client/assets/{shell-controls-CnlPnL8_.js → shell-controls-CW5jg4Ym.js} +1 -1
- package/dist/client/assets/{shell-layout-B_IHun6X.js → shell-layout-BRDxworf.js} +1 -1
- package/dist/client/assets/{sidebar-VSjqE-iW.js → sidebar-ULL9jJ7l.js} +1 -1
- package/dist/client/assets/{skeleton-CYp5wvmE.js → skeleton-DLtwO2uJ.js} +1 -1
- package/dist/client/assets/{sso-CcTvLmv0.js → sso-jglwiLrm.js} +1 -1
- package/dist/client/assets/{store-BHuCutbo.js → store-DcqNb1S1.js} +1 -1
- package/dist/client/assets/store-registry-Bu5kZ6Xk.js +2 -0
- package/dist/client/assets/{studio-tools-DvRYvkde.js → studio-tools-BnlYbx8P.js} +1 -1
- package/dist/client/assets/{switch-BnvwxcvB.js → switch-CVBHfBGN.js} +1 -1
- package/dist/client/assets/{table-DJK4LfF7.js → table-BC9K4qrR.js} +1 -1
- package/dist/client/assets/{tabs-Bq_1px0L.js → tabs-9b6ANfXD.js} +1 -1
- package/dist/client/assets/{textarea-CPaOQ5Q-.js → textarea-ZvTV1L4Y.js} +1 -1
- package/dist/client/assets/{toggle-group-TbPa-xxH.js → toggle-group-BsVehnLT.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bhr6QOKR.js → toolbar-icon-button-B9HcxbSB.js} +1 -1
- package/dist/client/assets/{toolbar-BbIQN1NP.js → toolbar-zVLmTI25.js} +1 -1
- package/dist/client/assets/{tools-list-CzME34rJ.js → tools-list-BLb9qfIc.js} +1 -1
- package/dist/client/assets/{tooltip-CVWZHqDE.js → tooltip-BSXVaBlo.js} +1 -1
- package/dist/client/assets/{types-DN4cpsla.js → types-CW7ZOun0.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CfUFRLbc.js → use-ai-providers-DgrJbqX_.js} +1 -1
- package/dist/client/assets/{use-automations-CVh8KOjc.js → use-automations-DBdgxV3H.js} +1 -1
- package/dist/client/assets/{use-capability-DcmTJhWJ.js → use-capability-Eehj-BpA.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BvSG5BTR.js → use-clock-tick-DPcjVtPA.js} +1 -1
- package/dist/client/assets/{use-collections-MesBmxz_.js → use-collections-DjC7Ypl5.js} +1 -1
- package/dist/client/assets/{use-connection-D3xX52hr.js → use-connection-7tdlY0jj.js} +1 -1
- package/dist/client/assets/{use-copy-DiUMv0tR.js → use-copy-ckRwBULD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DOwRMTij.js → use-create-virtual-mcp-CTtsn--I.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-TgSONybe.js → use-debounced-autosave-BVDwIAHm.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D2XBE5Mz.js → use-debounced-value-oGdpiioQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-7G4ltOgv.js → use-decopilot-events-BnSgb6E0.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CCaNZkAg.js → use-delete-connection-CFbejh3A.js} +1 -1
- package/dist/client/assets/{use-file-configs-Djxv1P8g.js → use-file-configs-B97O4PfR.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B29kn5P-.js → use-infinite-scroll-QzP5zPjo.js} +1 -1
- package/dist/client/assets/{use-join-requests-BZfHlMtM.js → use-join-requests-BsrYNQHQ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-gNudG4cW.js → use-mcp-client-DRnyEF4E.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-fJdNHgV2.js → use-mcp-prompts-Dt2Yyv1s.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BWyeUQTN.js → use-mcp-tools-CJd9d3C9.js} +1 -1
- package/dist/client/assets/{use-members-BYJoNyqe.js → use-members-DeXp8KsZ.js} +1 -1
- package/dist/client/assets/{use-mobile-C1ohciFj.js → use-mobile-CESLOj6_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-eLmXUDUb.js → use-navigate-to-agent-BWgBGz3w.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-hNlfWMli.js → use-org-auth-client-DkXyhh6b.js} +1 -1
- package/dist/client/assets/{use-org-sso-GVYmeCM6.js → use-org-sso-CQTD4Geu.js} +1 -1
- package/dist/client/assets/{use-organization-roles-V7_qHihR.js → use-organization-roles-DwdSTUAS.js} +1 -1
- package/dist/client/assets/{use-organization-settings-KGhRyO27.js → use-organization-settings-Ft8VT2rI.js} +1 -1
- package/dist/client/assets/{use-registry-connections-xtMeuplQ.js → use-registry-connections-cSFc3MwX.js} +1 -1
- package/dist/client/assets/{use-secrets-C2lBQt4a.js → use-secrets-DrJBkEJo.js} +1 -1
- package/dist/client/assets/{use-status-sounds-HGDdc7Da.js → use-status-sounds-DHYin-yC.js} +1 -1
- package/dist/client/assets/{use-view-mode-CF2C3SGo.js → use-view-mode-BPzXY9hV.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DBgkyn6I.js → use-virtual-mcp-BzHPoDxI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CGQ-CYW7.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DXgcnWBu.js +1 -0
- package/dist/client/assets/{variant-calendar-D-Yg4WTu.js → variant-calendar-DM-1ESC4.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-jtU-AQWe.js → view-mode-toggle-qOYtO4A9.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/app-editor-ENaoW19P.js +0 -1
- package/dist/client/assets/category-editor-CA2Gxp2T.js +0 -1
- package/dist/client/assets/page-seo-sheet-pMRDSacj.js +0 -1
- package/dist/client/assets/project-app-view-BH4qgEv7.js +0 -1
- package/dist/client/assets/record-editor-BrL-mRds.js +0 -1
- package/dist/client/assets/registry-s3_igCEG.js +0 -2
- package/dist/client/assets/sections-editor-BdDGhj1J.js +0 -2
- package/dist/client/assets/store-registry-C1dkqeX_.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CIlyzB3j.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D8zYi0_A.js +0 -1
package/dist/client/assets/{agent-capabilities-Cm5HYFmQ.js → agent-capabilities-C91jFxqd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ 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-Dxcn_nOJ.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-CdFMHTip.js";import{C as bn}from"./collection-search-nXgNWOlu.js";import{C as Nn}from"./collection-tabs-CMh3M6dF.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-DKf3Mif8.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-BWuLPbg0.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-Cr5fMabi.js";import{u as Ln}from"./use-mobile-C1ohciFj.js";import{F as M,b as B,c as O,d as L,e as $,a as Qe}from"./form-DSQg44DT.js";import{I as W}from"./input-DbIh_DQ-.js";import{a as $n,c as En,d as Rn,S as zn,b as ue}from"./select-DxQd4Zje.js";import{T as Kn}from"./textarea-CPaOQ5Q-.js";import{b as rn}from"./use-connection-D3xX52hr.js";import{n as Se,c as $e}from"./XCircle-Bs14VgYx.js";import{s as Ee}from"./Star01-B_fupSXJ.js";import{ak as Hn}from"./agent-icon-CHGytPYJ.js";import{s as Un}from"./XClose-SQhAqs2a.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-CyYj3Wny.js";import{u as Ye}from"./use-infinite-scroll-B29kn5P-.js";import{a as Re}from"./authenticate-and-persist-oauth-DoQRhISA.js";import{B as Ne}from"./badge-DwmkR0N4.js";import{T as ze,a as Ke,b as He}from"./tooltip-CVWZHqDE.js";import{u as Yn}from"./useSuspenseInfiniteQuery-D8zYi0_A.js";import{u as Jn}from"./use-mcp-client-gNudG4cW.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-o4IMkC0H.js";import{s as et}from"./Plus-Cpk__IrK.js";import{u as nt}from"./studio-tools-DvRYvkde.js";import{u as tt}from"./use-ai-providers-CfUFRLbc.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,Ut as b,Xt as c,qt as d,Qt as f,Ht as g,Ue as r,Kt as u};
|
|
1
|
+
import{$ 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-1tq-v_jD.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-D7UMhmoL.js";import{C as bn}from"./collection-search-DqFYsS2f.js";import{C as Nn}from"./collection-tabs-Dfpjtn5X.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-61ceTNtY.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-wWwKTugd.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-DvfRkFdD.js";import{u as Ln}from"./use-mobile-CESLOj6_.js";import{F as M,b as B,c as O,d as L,e as $,a as Qe}from"./form-opTKWwEv.js";import{I as W}from"./input-DIWznmhc.js";import{a as $n,c as En,d as Rn,S as zn,b as ue}from"./select-B1S4w9cB.js";import{T as Kn}from"./textarea-ZvTV1L4Y.js";import{b as rn}from"./use-connection-7tdlY0jj.js";import{n as Se,c as $e}from"./XCircle-DtD5Ond8.js";import{s as Ee}from"./Star01-DohQLS4t.js";import{ak as Hn}from"./agent-icon-Dws4XouX.js";import{s as Un}from"./XClose-CZwseyzK.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-BoLhqJuB.js";import{u as Ye}from"./use-infinite-scroll-QzP5zPjo.js";import{a as Re}from"./authenticate-and-persist-oauth-ByNtVmwR.js";import{B as Ne}from"./badge-BAjGZv6o.js";import{T as ze,a as Ke,b as He}from"./tooltip-BSXVaBlo.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DXgcnWBu.js";import{u as Jn}from"./use-mcp-client-DRnyEF4E.js";import{S as Zn}from"./constants-B72Xmt_K.js";import{i as Je}from"./Check-Dl_2v6Kk.js";import{s as et}from"./Plus-DnmBhP91.js";import{u as nt}from"./studio-tools-BnlYbx8P.js";import{u as tt}from"./use-ai-providers-DgrJbqX_.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,Ut as b,Xt as c,qt as d,Qt as f,Ht as g,Ue as r,Kt as u};
|