decocms 2.367.38 → 2.369.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CVwjiL5t.js → AlertCircle-BCHNBTJj.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BsdiWOZ_.js → ArrowUpRight-DOVZA3k4.js} +1 -1
- package/dist/client/assets/{Check-BIvjG7jh.js → Check-B34N9tsV.js} +1 -1
- package/dist/client/assets/{CheckCircle-naAuY0Am.js → CheckCircle-CFtTCxLL.js} +1 -1
- package/dist/client/assets/{ChevronDown-2DdfyPVo.js → ChevronDown-Dr50fepz.js} +1 -1
- package/dist/client/assets/{ChevronRight-Djwmm7yx.js → ChevronRight-CISMqQmL.js} +1 -1
- package/dist/client/assets/{ChevronUp-CYign-Xr.js → ChevronUp-Caidv6lK.js} +1 -1
- package/dist/client/assets/{Container-BYMVUIOR.js → Container-B1RIjk98.js} +1 -1
- package/dist/client/assets/{DotsVertical-6XBT76_0.js → DotsVertical-rWYOU3RE.js} +1 -1
- package/dist/client/assets/{FilterLines-xU-m-2To.js → FilterLines-Bdqyhomu.js} +1 -1
- package/dist/client/assets/{HardDrive-CPUYFXaj.js → HardDrive-DoscLgG-.js} +1 -1
- package/dist/client/assets/{Key01-CTY2QvpD.js → Key01-BoIyqgwL.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BA4wxcAF.js → LayoutLeft-D7dJReEM.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Dn8eWUjC.js → LinkExternal01-DVJRR2up.js} +1 -1
- package/dist/client/assets/{Lock01-DzYUukb5.js → Lock01-Bk5T6G6y.js} +1 -1
- package/dist/client/assets/{Monitor01-nKIM1K_1.js → Monitor01-5rN-C0di.js} +1 -1
- package/dist/client/assets/{Palette-B6NpJZ9F.js → Palette-B-cRX_Fx.js} +1 -1
- package/dist/client/assets/{Play-qd-MZyD5.js → Play-BsXLejZM.js} +1 -1
- package/dist/client/assets/{Plus-Cq_1PqM9.js → Plus-beS007Js.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CYXiv82D.js → RefreshCcw01-Dcpv3eTL.js} +1 -1
- package/dist/client/assets/{SearchMd-WZzMz_xm.js → SearchMd-CB2F2Eh5.js} +1 -1
- package/dist/client/assets/{Settings02-BGX5GQSJ.js → Settings02-DB_WZ-LQ.js} +1 -1
- package/dist/client/assets/{Shield01-Dd3PCkCh.js → Shield01-D_j6WQ24.js} +1 -1
- package/dist/client/assets/{Star01-TIrOjEGQ.js → Star01-CH8zsyZS.js} +1 -1
- package/dist/client/assets/{Stars02-BgabhO3x.js → Stars02-CH6m9NsR.js} +1 -1
- package/dist/client/assets/{Sun-BMF5NYnu.js → Sun-vCQYJllf.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B39nOlBz.js → SwitchHorizontal01-BXOMQbPs.js} +1 -1
- package/dist/client/assets/{Tool01-CAdd6NGF.js → Tool01-B1_kF5r4.js} +1 -1
- package/dist/client/assets/{Trash01-CHrTm5S-.js → Trash01-Dv-uw8l0.js} +1 -1
- package/dist/client/assets/{Upload01-CfhmyOeM.js → Upload01-Dei9Gr0H.js} +1 -1
- package/dist/client/assets/{User01-CnVuEZ_q.js → User01-DuylSQbh.js} +1 -1
- package/dist/client/assets/{Users01-CARILaym.js → Users01-BWQyCQSo.js} +1 -1
- package/dist/client/assets/{Users03-COREII3z.js → Users03-Xhe-Woui.js} +1 -1
- package/dist/client/assets/{X-CexC7CUQ.js → X-DgjPW3BN.js} +1 -1
- package/dist/client/assets/XCircle-Kzv3aw-k.js +1 -0
- package/dist/client/assets/{XClose-BOJwjK3-.js → XClose-C8_9CjoM.js} +1 -1
- package/dist/client/assets/{Zap-DRsZpKeC.js → Zap-Co2SfCXQ.js} +1 -1
- package/dist/client/assets/{ZapSquare-rxLTzaCI.js → ZapSquare-BGWKuepx.js} +1 -1
- package/dist/client/assets/{accordion-DEFWqB9v.js → accordion-Bf2zVAiI.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CJWirXjW.js → add-connection-dialog-wVzM7TTa.js} +1 -1
- package/dist/client/assets/agent-icon-DAOer5aY.js +1 -0
- package/dist/client/assets/{agent-icons-BMYEM-93.js → agent-icons-DNhkZE7D.js} +1 -1
- package/dist/client/assets/agents-list-DABEUXXh.js +1 -0
- package/dist/client/assets/{ai-providers-DOK2_evy.js → ai-providers-ra9PS9Te.js} +1 -1
- package/dist/client/assets/{alert-DsUJkc45.js → alert-B8IvxWyW.js} +1 -1
- package/dist/client/assets/{alert-dialog-DJnXid5j.js → alert-dialog-CBy2mP5M.js} +3 -3
- package/dist/client/assets/{auth-catchall-D2kMqSF3.js → auth-catchall-DwI_DCPg.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DNx4VwCy.js → auth-split-layout-CPl1Ogax.js} +1 -1
- package/dist/client/assets/{automation-list-row-9h6JxfVT.js → automation-list-row-DPAKg98L.js} +1 -1
- package/dist/client/assets/automations-vmGkl90g.js +1 -0
- package/dist/client/assets/{avatar-ByQQ7GEH.js → avatar-CBIJBj_W.js} +1 -1
- package/dist/client/assets/{badge-Dci-e_Pw.js → badge-CXArobm8.js} +1 -1
- package/dist/client/assets/{brand-context-CQ0JpFGU.js → brand-context-BHVsDYH_.js} +1 -1
- package/dist/client/assets/{card-CqaEJI_U.js → card-CNyFBXf4.js} +1 -1
- package/dist/client/assets/{chat-context-DxSqonhB.js → chat-context-BWXApvuA.js} +1 -1
- package/dist/client/assets/{checkbox-DdM7zWwz.js → checkbox-D1Q1psVt.js} +1 -1
- package/dist/client/assets/{cli-auth-success-W0LeKzND.js → cli-auth-success-Cv251YT1.js} +1 -1
- package/dist/client/assets/collection-detail-4oC2alH8.js +1 -0
- package/dist/client/assets/{collection-display-button-Bb5eYsxS.js → collection-display-button-CxfftABc.js} +1 -1
- package/dist/client/assets/{collection-search-CZPmAdbz.js → collection-search-CtjpA7Tw.js} +1 -1
- package/dist/client/assets/{collection-search-DYkFJwme.js → collection-search-D3hp8frj.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-VrRyg9Ib.js → collection-table-wrapper-htzX5Cc-.js} +1 -1
- package/dist/client/assets/{collection-tabs-BME6pm9f.js → collection-tabs-B9KC7Uhn.js} +1 -1
- package/dist/client/assets/{collections-CuEt9akO.js → collections-CEURDRm7.js} +1 -1
- package/dist/client/assets/{command-DaAuDqUV.js → command-BTA7LUZM.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-v3Y8dgGN.js → connect-desktop-dialog-DygjlLBa.js} +1 -1
- package/dist/client/assets/{connection-card-BY9Z3I7R.js → connection-card-4Md1PbMA.js} +1 -1
- package/dist/client/assets/connection-detail-k_WdL2vk.js +1 -0
- package/dist/client/assets/{connection-form-helpers-M4qUZwhZ.js → connection-form-helpers-DI61y2e0.js} +1 -1
- package/dist/client/assets/connections-CMhBDlPe.js +1 -0
- package/dist/client/assets/{constants-piR0edM1.js → constants-D5RCRPRT.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DWRmePhE.js → decopilot-sse-pool-BgB0FvkR.js} +1 -1
- package/dist/client/assets/{dialog-Bg6eRMC4.js → dialog-2y75M1_6.js} +1 -1
- package/dist/client/assets/{domain-settings-CHHiS2Vl.js → domain-settings-qIsJxkrR.js} +1 -1
- package/dist/client/assets/{drawer-q5yKuLmY.js → drawer-W7QX6Ax_.js} +1 -1
- package/dist/client/assets/{dropdown-menu-TulqWZOe.js → dropdown-menu-9FoS_14a.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DEIRfHv3.js → dynamic-plugin-layout-DE7Rx2Mh.js} +1 -1
- package/dist/client/assets/{empty-state-CKtqz2A5.js → empty-state-BlF5e09g.js} +1 -1
- package/dist/client/assets/{empty-state-ZqctI9xZ.js → empty-state-CRPtBPjo.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BYGRbWJu.js → extract-connection-data-CtQqD73R.js} +1 -1
- package/dist/client/assets/features-6QwqoSn3.js +1 -0
- package/dist/client/assets/file-explorer-C9P9tLrr.js +2 -0
- package/dist/client/assets/{files-CXeAP3oD.js → files-B8cc-gBv.js} +1 -1
- package/dist/client/assets/{form-B-pClhzT.js → form-BVQywbIc.js} +1 -1
- package/dist/client/assets/general-CnRlBB-m.js +1 -0
- package/dist/client/assets/{generate-id-DfUEx9en.js → generate-id-CpWgmfmA.js} +1 -1
- package/dist/client/assets/{github-repo-picker-A9GOBLjA.js → github-repo-picker-DmuX5zhB.js} +1 -1
- package/dist/client/assets/{hooks-Buro5ByR.js → hooks-18b6g3fs.js} +1 -1
- package/dist/client/assets/{hover-card-CUfoIFQV.js → hover-card-DOoMOMFv.js} +1 -1
- package/dist/client/assets/index-0fMq3-pH.js +1 -0
- package/dist/client/assets/{index-BDOr2buP.js → index-8_y4UNLc.js} +1 -1
- package/dist/client/assets/{index-B_5hPR5_.js → index-B6vP9EOZ.js} +1 -1
- package/dist/client/assets/{index-C_m1_Qyy.js → index-BM33-uTI.js} +27 -27
- package/dist/client/assets/{index-DjuWoEWL.js → index-B_mvEXXb.js} +1 -1
- package/dist/client/assets/{index-Df1UV_SS.js → index-Bn5sNNK8.js} +1 -1
- package/dist/client/assets/{index-zGvFjFjO.js → index-BwE83rPX.js} +1 -1
- package/dist/client/assets/{index-CdCX0F7Y.js → index-C0gY1SEz.js} +4 -4
- package/dist/client/assets/{index-BHpJxImt.js → index-CZU3_Yg-.js} +2 -2
- package/dist/client/assets/{index-Wwb5vGkQ.js → index-Ct4M2Ud6.js} +1 -1
- package/dist/client/assets/index-D6GfXYzs.js +1 -0
- package/dist/client/assets/{index-CKs6rcu1.js → index-DHCuljhb.js} +1 -1
- package/dist/client/assets/{index-DKWbd0LS.js → index-g7KxjIc5.js} +2 -2
- package/dist/client/assets/index-k6iT8Tf1.js +1 -0
- package/dist/client/assets/{index-B55MEl-c.js → index-oIPZXuqi.js} +1 -1
- package/dist/client/assets/{index-DvIjF9DA.js → index-vupo1sDr.js} +13 -13
- package/dist/client/assets/{infiniteQueryObserver-CUomJPae.js → infiniteQueryObserver-DjZk0454.js} +1 -1
- package/dist/client/assets/{input-DHJ18fY7.js → input-DyimJ0YM.js} +1 -1
- package/dist/client/assets/{integration-icon-Bo72bKVV.js → integration-icon-D9qjqDnw.js} +1 -1
- package/dist/client/assets/{label-jUTi8Oc4.js → label-CYBEQrtl.js} +1 -1
- package/dist/client/assets/{layout-PcloJcLR.js → layout-CwSzvRV6.js} +1 -1
- package/dist/client/assets/{login-C1Yqpj4I.js → login-BwJgBWmn.js} +1 -1
- package/dist/client/assets/{members-x8tMmNra.js → members-SZUmLKla.js} +1 -1
- package/dist/client/assets/{monaco-editor-D-22abDQ.js → monaco-editor-BYDkxeGd.js} +3 -3
- package/dist/client/assets/{monitoring-stats-row-DkPBMjPc.js → monitoring-stats-row-8DFwtJdG.js} +1 -1
- package/dist/client/assets/{oauth-callback-5B-GDOKs.js → oauth-callback-D3HQSih9.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-KqAiGkB8.js → oauth-callback-ai-provider-hlYQfy41.js} +1 -1
- package/dist/client/assets/{onboarding-BQaPrCwV.js → onboarding-ClFOQyD0.js} +1 -1
- package/dist/client/assets/{org-layout-DOPcV20w.js → org-layout-CQSZYn7L.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BlQBf5vT.js → org-plugin-layout-CkozoVe-.js} +1 -1
- package/dist/client/assets/{pair-DgOi01tx.js → pair-XXkclPo3.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-qP6k2hvb.js → plugin-empty-state-DcMxNkqz.js} +1 -1
- package/dist/client/assets/{plugin-header-D3WS6Tch.js → plugin-header-RG7So6zC.js} +1 -1
- package/dist/client/assets/{plugin-layout--Nx4BaLL.js → plugin-layout-1Sg2oR8k.js} +1 -1
- package/dist/client/assets/{popover-COqcQ0Rg.js → popover-DOu91n_v.js} +1 -1
- package/dist/client/assets/{profile-DZu-CjT9.js → profile-Bu4-Eb6R.js} +1 -1
- package/dist/client/assets/project-app-view-yK_XWVMG.js +1 -0
- package/dist/client/assets/registry-D1JNm-Xx.js +2 -0
- package/dist/client/assets/{registry-layout-B6kU_bv7.js → registry-layout-BmtyLpq5.js} +3 -3
- package/dist/client/assets/{required-auth-layout-CJnuX5pr.js → required-auth-layout-tzyLq2cT.js} +1 -1
- package/dist/client/assets/{reset-password-B2Ia2er4.js → reset-password-CsA4hRoj.js} +1 -1
- package/dist/client/assets/roles-dL46UDfg.js +1 -0
- package/dist/client/assets/{search-input-BX9Kn801.js → search-input-DHqGiAAb.js} +1 -1
- package/dist/client/assets/{secrets-BEffGZyZ.js → secrets-CXaOA3bo.js} +1 -1
- package/dist/client/assets/sections-editor-AHG3CG-Y.js +1 -0
- package/dist/client/assets/{select-DAV_VIox.js → select-C7bkDnqt.js} +1 -1
- package/dist/client/assets/settings-layout-MCrWdztj.js +1 -0
- package/dist/client/assets/{settings-section-DLBjUAhp.js → settings-section-DFOkupJ0.js} +1 -1
- package/dist/client/assets/{shell-controls-CNwl3y79.js → shell-controls-jx6fo9En.js} +1 -1
- package/dist/client/assets/shell-layout-BgY4DXFm.js +1 -0
- package/dist/client/assets/{sidebar-BFp8v2I0.js → sidebar-Dne1fKYn.js} +1 -1
- package/dist/client/assets/{skeleton-tYEs8dsN.js → skeleton-BiCcS3UT.js} +1 -1
- package/dist/client/assets/{sortable.esm-vK1UhoBn.js → sortable.esm-BQrMCI5H.js} +1 -1
- package/dist/client/assets/{spinner-DLBC6d93.js → spinner-Bb25iFDc.js} +1 -1
- package/dist/client/assets/{sso-BvpZRsH4.js → sso-MK5Q0tuC.js} +1 -1
- package/dist/client/assets/{store-DMo12WtF.js → store-Cu8faowN.js} +1 -1
- package/dist/client/assets/store-registry-DYz-eLFY.js +2 -0
- package/dist/client/assets/{switch-Bmqleb0M.js → switch-STNewpCh.js} +1 -1
- package/dist/client/assets/{table-Cbi2Lt5J.js → table-BR0ZQG-N.js} +1 -1
- package/dist/client/assets/{tabs-DKgnbdu4.js → tabs-BIXB9X7f.js} +1 -1
- package/dist/client/assets/{task-status-CqP04HQ9.js → task-status-Cpj07cgX.js} +1 -1
- package/dist/client/assets/{textarea-C035ZOMR.js → textarea-Csq7UfFg.js} +1 -1
- package/dist/client/assets/{toggle-group-D_tMezdr.js → toggle-group-Cvm94FnA.js} +1 -1
- package/dist/client/assets/toolbar-BFZ_P1su.js +1 -0
- package/dist/client/assets/{tools-list-DmcpkTFh.js → tools-list-BG_WhFGX.js} +1 -1
- package/dist/client/assets/{tooltip-BeTs1OMg.js → tooltip-GbZ-ULDS.js} +1 -1
- package/dist/client/assets/{types-BZ3eurxp.js → types-BGMjh8Dq.js} +5 -5
- package/dist/client/assets/{use-ai-providers-CgowGcDz.js → use-ai-providers-CaxnWnZW.js} +1 -1
- package/dist/client/assets/{use-collections-D_7JW6dX.js → use-collections-DnQvffUs.js} +1 -1
- package/dist/client/assets/{use-connection-BbCw9KPq.js → use-connection-CRCT5mv0.js} +1 -1
- package/dist/client/assets/{use-copy-DbsD5qK3.js → use-copy-Bx-USwd1.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DJVm-5Gn.js → use-create-virtual-mcp-DgE9-y_o.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B4_HunOp.js → use-debounced-autosave-BBZX5k0R.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B0yMHUHX.js → use-delete-connection-BXEk19GO.js} +1 -1
- package/dist/client/assets/{use-file-configs-DEsQ0trh.js → use-file-configs-D9H5_-BE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-XJXa4_f9.js → use-infinite-scroll-D0a1rm12.js} +1 -1
- package/dist/client/assets/{use-list-state-C8eifEnv.js → use-list-state-BN7DRxUQ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Cxw_xwII.js → use-mcp-prompts-Bn3MJOn8.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cg4H0QB3.js → use-mcp-tools-BppARYHs.js} +1 -1
- package/dist/client/assets/{use-members-BB2rBOpc.js → use-members-BF_X33y-.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CVbR4ICA.js → use-navigate-to-agent-COcSBZ_P.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bk4CKLSt.js → use-org-auth-client-Bu3yErl5.js} +1 -1
- package/dist/client/assets/{use-org-sso-Baws_Cb6.js → use-org-sso-Cbun5-U-.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DNG5Wg-t.js → use-organization-roles-BZFkc9QW.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BfJ6uqm2.js → use-organization-settings-BgjGLKnf.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CRI9AlTc.js → use-registry-connections-0IoXir_p.js} +1 -1
- package/dist/client/assets/{use-secrets-CPfeyzy3.js → use-secrets-CUom62Zy.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Ch0BXIj1.js → use-status-sounds-BKNm7I6l.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bzy-dMu6.js → use-view-mode-CWH9EmAt.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DXij_fSZ.js → use-virtual-mcp-DA5BI4_W.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C-wnWXsR.js +1 -0
- package/dist/client/assets/{useRouterState-DNwJdpeR.js → useRouterState-Rq7IpB5d.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Q-NFKrZT.js +1 -0
- package/dist/client/assets/{user-D0ZUKhOx.js → user-CpeLJRjb.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DPGq5mgK.js → view-mode-toggle-s0VkAFh3.js} +1 -1
- package/dist/client/assets/workflow-DPBHWxQm.js +1 -0
- package/dist/client/assets/workflow-detail-Din6OWiM.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js +36 -6
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +15 -0
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js +36 -6
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +15 -0
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js +36 -6
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +15 -0
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/package.json +12 -14
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js +13 -10
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/protobuf.js +14 -55
- package/dist/server/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/package.json +1 -1
- package/dist/server/node_modules/protobufjs/src/message.js +7 -3
- package/dist/server/node_modules/protobufjs/src/object.js +3 -6
- package/dist/server/node_modules/protobufjs/src/parse.js +1 -45
- package/dist/server/node_modules/protobufjs/src/type.js +1 -0
- package/package.json +1 -1
- package/dist/client/assets/ArrowNarrowLeft-C0lNfAd-.js +0 -1
- package/dist/client/assets/XCircle-D5rCjCCo.js +0 -1
- package/dist/client/assets/agent-icon-C3wnlI99.js +0 -1
- package/dist/client/assets/agents-list-B3SpQwX5.js +0 -1
- package/dist/client/assets/automations-r03D9cAA.js +0 -1
- package/dist/client/assets/collection-detail-CGNHV1EW.js +0 -1
- package/dist/client/assets/connection-detail-CGrlvist.js +0 -1
- package/dist/client/assets/connections-BV1UPzfV.js +0 -1
- package/dist/client/assets/features-D7qzU1ah.js +0 -1
- package/dist/client/assets/file-explorer-C4vwodhd.js +0 -2
- package/dist/client/assets/general-BHrzNm6e.js +0 -1
- package/dist/client/assets/index-2vcb4P4k.js +0 -1
- package/dist/client/assets/index-BPYCGyhU.js +0 -1
- package/dist/client/assets/index-RQIiwepL.js +0 -1
- package/dist/client/assets/project-app-view-CbzbFEPu.js +0 -1
- package/dist/client/assets/registry-10Lvnw38.js +0 -2
- package/dist/client/assets/roles-Dnu1ERmI.js +0 -1
- package/dist/client/assets/sections-editor-6afDX4oI.js +0 -1
- package/dist/client/assets/settings-layout-Cs92wKZb.js +0 -1
- package/dist/client/assets/shell-layout-BZaILYv9.js +0 -1
- package/dist/client/assets/store-registry-BzJ2CQJA.js +0 -2
- package/dist/client/assets/toolbar-AIIkxXjs.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D0JT5WrD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D794zrC9.js +0 -1
- package/dist/client/assets/workflow-DkG9K0We.js +0 -1
- package/dist/client/assets/workflow-detail-CEB6a5Nl.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/license +0 -9
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
package/dist/client/assets/{add-connection-dialog-CJWirXjW.js → add-connection-dialog-wVzM7TTa.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as Xe,b as Ze,u as dn,F as un,G as pn,j as e,B as G,o as B,r as pe,D as mn,f as hn,l as ke,I as Ee,H as Le,t as C,K as Ne,e as fn,p as xn,U as gn,c as jn}from"./index-C_m1_Qyy.js";import{g as yn}from"./connection-slug-eyAPH6o3.js";import{u as en,a as nn,g as _n,C as Be}from"./connection-card-BY9Z3I7R.js";import{C as vn}from"./collection-search-CZPmAdbz.js";import{C as wn}from"./collection-tabs-BME6pm9f.js";import{g as Cn}from"./generate-id-DfUEx9en.js";import{b as tn,a as sn,c as on,d as an,e as kn,D as Nn}from"./dialog-Bg6eRMC4.js";import{b as Sn,a as bn,c as In,D as An,d as Tn,e as Dn,f as Pn}from"./drawer-q5yKuLmY.js";import{u as Fn,b as ze,T as Ue,a as He}from"./tooltip-BeTs1OMg.js";import{F as D,b as P,c as F,d as O,f as V,a as Qe}from"./form-B-pClhzT.js";import{I as Q}from"./input-DHJ18fY7.js";import{S as On,a as Vn,b as $n,c as Mn,d as ue}from"./select-DAV_VIox.js";import{T as En}from"./textarea-C035ZOMR.js";import{b as cn}from"./use-connection-BbCw9KPq.js";import{n as Se}from"./Container-BYMVUIOR.js";import{s as Re}from"./Star01-TIrOjEGQ.js";import{w as Ln}from"./agent-icon-C3wnlI99.js";import{s as Bn}from"./XClose-BOJwjK3-.js";import{c as zn,i as we,a as Ge,E as Un,p as Hn,b as Rn,d as Kn}from"./connection-form-helpers-M4qUZwhZ.js";import{u as Je}from"./use-infinite-scroll-XJXa4_f9.js";import{u as Xn}from"./useSuspenseInfiniteQuery-D794zrC9.js";import{S as qn,u as Wn}from"./constants-piR0edM1.js";import{g as Qn,e as Gn,a as Jn}from"./extract-connection-data-BYGRbWJu.js";import{B as Ce}from"./badge-Dci-e_Pw.js";import{d as Ke}from"./XCircle-D5rCjCCo.js";import{i as Ye}from"./Check-BIvjG7jh.js";import{s as Yn}from"./Plus-Cq_1PqM9.js";function Zn({open:u,onOpenChange:n,onCreated:J}){const{org:z}=Xe(),{data:j}=Ze.useSession(),{stdioEnabled:$}=dn(),M=Fn(),X=cn(),v=en(),Y=nn(v,"").items,o=un({resolver:pn(zn),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"),I=o.watch("connection_url"),U=o.watch("npx_package"),h=we({uiType:x,connectionUrl:I??"",npxPackage:U??""})??Ge({uiType:x,connectionUrl:I??"",registryItems:Y}),l=s=>{const t=s.trim();if(!t)return;const i=!!o.formState.dirtyFields.title,f=!!o.formState.dirtyFields.description,g=!!o.formState.dirtyFields.env_vars,c=m=>{if(m&&(!i&&!o.getValues("title").trim()&&m.title&&o.setValue("title",m.title,{shouldDirty:!1}),!f&&!(o.getValues("description")??"").trim()&&m.description&&o.setValue("description",m.description,{shouldDirty:!1}),!g&&m.envVarKeys?.length)){const S=o.getValues("env_vars")??[],y=new Set(S.map(w=>w.key)),_=m.envVarKeys.filter(w=>!y.has(w));_.length>0&&o.setValue("env_vars",[...S,..._.map(w=>({key:w,value:""}))],{shouldDirty:!0})}},r=Hn(t);if(r&&$){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",r.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),c(we({uiType:"NPX",npxPackage:r.packageName}));return}if(t.startsWith("http://")||t.startsWith("https://")){const m=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";o.setValue("ui_type",m,{shouldDirty:!0}),o.setValue("connection_url",t,{shouldDirty:!0}),c(we({uiType:m,connectionUrl:t})??Ge({uiType:m,connectionUrl:t,registryItems:Y}));return}x==="NPX"&&c(we({uiType:"NPX",npxPackage:t}))},H=s=>{s||o.reset(),n(s)},p=async s=>{let t,i=null,f=null,g=null;s.ui_type==="NPX"?(t="STDIO",i="",g=Rn(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(t="STDIO",i="",g=Kn(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(t=s.ui_type,i=s.connection_url||"",f=s.connection_token||null);const c=Cn("conn");try{await X.create.mutateAsync({id:c,title:s.title,description:s.description||null,connection_type:t,connection_url:i,connection_token:f,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:j?.user?.id||"system",organization_id:z.id,icon:s.icon??null,app_name:null,app_id:null,connection_headers:g,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),J?.(c)}catch{B.error("Failed to create connection")}},A="Create Connection",N="Create a custom connection in your organization. Fill in the details below.",R=o.formState.isSubmitting?"Saving...":"Create Connection",E=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(D,{control:o.control,name:"ui_type",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Type *"}),e.jsxs(On,{value:s.value,onValueChange:s.onChange,children:[e.jsx(O,{children:e.jsx(Vn,{children:e.jsx($n,{})})}),e.jsxs(Mn,{children:[e.jsx(ue,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(ue,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(ue,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"Websocket"]})}),$&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(ue,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ln,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(V,{})]})}),x==="NPX"&&e.jsx(D,{control:o.control,name:"npx_package",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"NPM Package *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"@perplexity-ai/mcp-server",...s,value:s.value??"",onPaste:t=>{const i=t.clipboardData.getData("text");i&&(t.preventDefault(),o.setValue("npx_package",i.trim(),{shouldDirty:!0}),l(i))},onBlur:t=>{l(t.target.value),s.onBlur()}})}),e.jsx(V,{})]})}),x==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(D,{control:o.control,name:"stdio_command",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Command *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"node, bun, python...",...s,value:s.value??""})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"stdio_args",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Arguments"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"arg1 arg2 --flag value",...s,value:s.value??""})}),e.jsx(V,{})]})})]}),e.jsx(D,{control:o.control,name:"stdio_cwd",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Working Directory"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"/path/to/project (optional)",...s,value:s.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(V,{})]})})]}),(x==="NPX"||x==="STDIO")&&e.jsx(D,{control:o.control,name:"env_vars",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Environment Variables"}),e.jsx(O,{children:e.jsx(Un,{value:s.value??[],onChange:s.onChange})}),e.jsx(V,{})]})}),x!=="NPX"&&x!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(D,{control:o.control,name:"connection_url",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"URL *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"https://example.com/mcp",...s,value:s.value??"",onPaste:t=>{const i=t.clipboardData.getData("text");i&&(t.preventDefault(),o.setValue("connection_url",i.trim(),{shouldDirty:!0}),l(i))},onBlur:t=>{l(t.target.value),s.onBlur()}})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"connection_token",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:h?.token?.label??"Token (optional)"}),e.jsx(O,{children:e.jsx(Q,{type:"password",placeholder:h?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...s,value:s.value??""})}),h?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(V,{})]})})]}),e.jsx(D,{control:o.control,name:"title",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Name *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"My Connection",...s})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"description",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Description"}),e.jsx(O,{children:e.jsx(En,{placeholder:"A brief description of this connection",rows:3,...s,value:s.value??""})}),e.jsx(V,{})]})})]});return M?e.jsx(Sn,{open:u,onOpenChange:H,children:e.jsxs(bn,{className:"max-h-[90vh]",children:[e.jsx(In,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(An,{children:A}),e.jsx(Tn,{className:"mt-1",children:N})]}),e.jsx(Dn,{asChild:!0,children:e.jsx(G,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Bn,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),e.jsx(Pn,{children:e.jsx(G,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:R})})]})})]})}):e.jsx(tn,{open:u,onOpenChange:H,children:e.jsxs(sn,{className:"sm:max-w-[525px]",children:[e.jsxs(on,{children:[e.jsx(an,{children:A}),e.jsx(kn,{children:N})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),children:[e.jsx("div",{className:"py-4",children:E}),e.jsxs(Nn,{children:[e.jsx(G,{type:"button",variant:"outline",onClick:()=>H(!1),children:"Cancel"}),e.jsx(G,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:R})]})]})})]})})}function et(u){const n=fn.c(73),{mode:J,agentId:z,addedConnectionIds:j,onAdd:$,onCloneAndAdd:M,onConnectAndAdd:X,connectingItemId:v,search:k,onCreateConnection:Y,onBrowseNavigate:o,defaultTab:x}=u,I=J===void 0?"add":J,U=x===void 0?"connected":x,{org:h}=Xe(),l=pe.useDeferredValue(k),H=k!==l,p=l.trim().toLowerCase();let A;n[0]!==U?(A=a=>a??U,n[0]=U,n[1]=A):A=n[1];const[N,R]=xn(gn.connectionsTab(h.slug)+(U==="all"?":home-modal":":agent-modal"),A);let E;n[2]!==N||n[3]!==R?(E=a=>{a!==N&&C("connections_dialog_tab_changed",{to_tab:a}),R(a)},n[2]=N,n[3]=R,n[4]=E):E=n[4];const s=E;let t;n[5]!==h.id||n[6]!==h.slug?(t={connectionId:qn,orgId:h.id,orgSlug:h.slug},n[5]=h.id,n[6]=h.slug,n[7]=t):t=n[7];const i=Wn(t);let f,g,c;if(n[8]!==i||n[9]!==l||n[10]!==h.id){c=l?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:l.trim()},{field:["description"],operator:"contains",value:l.trim()}]}:void 0;const a={...c&&{where:c},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},d=JSON.stringify(a);g=Xn,f=Ne.collectionListInfinite(i,h.id,"","CONNECTIONS",d),n[8]=i,n[9]=l,n[10]=h.id,n[11]=f,n[12]=g,n[13]=c}else f=n[11],g=n[12],c=n[13];let r;n[14]!==i||n[15]!==c?(r=async a=>{const{pageParam:d}=a,L=d===void 0?0:d;return(await i.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...c&&{where:c},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:L}})).structuredContent},n[14]=i,n[15]=c,n[16]=r):r=n[16];let m;n[17]!==f||n[18]!==r?(m={queryKey:f,queryFn:r,initialPageParam:0,getNextPageParam:it,staleTime:3e4},n[17]=f,n[18]=r,n[19]=m):m=n[19];const{data:S,fetchNextPage:y,hasNextPage:_,isFetchingNextPage:w}=g(m),be=S?.pages.flatMap(at)??[],me=_n(be),rn=new Set(be.filter(ot).map(st)),he=en(),q=nn(he,l),Ie=Je(q.loadMore,q.hasMore,q.isLoadingMore),Ae=Je(y,_??!1,w),T=N==="all"||!!p,qe=T?q.items.filter(a=>{const d=Qn(a);if(d&&rn.has(d))return!1;if(!p)return!0;const L=a._meta?.["mcp.mesh"];return[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,L?.friendly_name,L?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(p)}):[],le=qe.filter(tt),de=qe.filter(nt);let fe;n[20]!==j?(fe=a=>a.some(d=>j.has(d.id)),n[20]=j,n[21]=fe):fe=n[21];const Te=fe;let xe;n[22]!==j||n[23]!==z||n[24]!==v||n[25]!==Te||n[26]!==I||n[27]!==$||n[28]!==o||n[29]!==M?(xe=(a,d,L,ce,K)=>{const ve=Te(K),re=K.find(W=>!j.has(W.id)),b=K[0];if(I==="browse"){const W=yn(b);return e.jsx(Be,{connection:{title:d,icon:L,description:K.length>1?`${K.length} instances`:ce??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ce,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:b.app_name??null,connection_id:b.id,instances_count:K.length}),o?.(W)}},a)}return e.jsx(Be,{connection:{title:d,icon:L,description:ce},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[ve&&e.jsxs(Ce,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Added"]}),e.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:v!==null,onClick:W=>{W.stopPropagation(),re?(C("connection_add_clicked",{action:"use_existing",app_name:b.app_name??null,connection_id:re.id}),z&&C("agent_connection_attached",{agent_id:z,connection_id:re.id,app_name:b.app_name??null,mode:"existing"}),$(re.id)):(C("connection_add_clicked",{action:"clone",app_name:b.app_name??null,base_connection_id:b.id}),M(b))},children:"Add"})]})},a)},n[22]=j,n[23]=z,n[24]=v,n[25]=Te,n[26]=I,n[27]=$,n[28]=o,n[29]=M,n[30]=xe):xe=n[30];const ge=xe;let je;n[31]!==v||n[32]!==I||n[33]!==X?(je=a=>{const d=a._meta?.["mcp.mesh"],L=d?.friendlyName||d?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",ce=a.server?.description||a.description||null,K=a.server?.icons?.[0]?.src||Jn(a.server?.repository)||null,ve=d?.official===!0,re=d?.verified===!0,b=d?.owner==="deco";return e.jsx(Be,{connection:{title:L,description:ce,icon:K},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[b&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!b&&ve&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(Ce,{variant:"outline",size:"icon",children:e.jsx(Ke,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!b&&!ve&&re&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(Ce,{variant:"outline",size:"icon",children:e.jsx(Ke,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:v!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:d?.friendlyName||a.server?.name||a.name||null}),X(a)},children:v===a.id?e.jsx(ke,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[31]=v,n[32]=I,n[33]=X,n[34]=je):je=n[34];const We=je,De=!p&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(wn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:N,onTabChange:a=>s(a)}),e.jsxs(G,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),Y()},children:[e.jsx(Yn,{size:12}),"Custom Connection"]})]}),Pe=H&&"opacity-50 pointer-events-none";let Z;n[35]!==Pe?(Z=jn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[35]=Pe,n[36]=Z):Z=n[36];const ln="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[37]!==ge?(ye=a=>{if(a.type==="group")return ge(a.key,a.title,a.icon,null,a.connections);const d=a.connection;return ge(d.id,d.title,d.icon,d.description??null,[d])},n[37]=ge,n[38]=ye):ye=n[38];const Fe=me.map(ye);let ee;n[39]!==Ae?(ee=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[39]=Ae,n[40]=ee):ee=n[40];let ne;n[41]!==w?(ne=w&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[41]=w,n[42]=ne):ne=n[42];const Oe=T&&le.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Ke,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=T&&le.map(We),$e=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(We);let te;n[43]!==Ie||n[44]!==he||n[45]!==T?(te=T&&he.length>0&&e.jsx("div",{ref:Ie,className:"col-span-full h-1"}),n[43]=Ie,n[44]=he,n[45]=T,n[46]=te):te=n[46];let se;n[47]!==q.isLoadingMore||n[48]!==T?(se=T&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[47]=q.isLoadingMore,n[48]=T,n[49]=se):se=n[49];let oe;n[50]!==Fe||n[51]!==ee||n[52]!==ne||n[53]!==Oe||n[54]!==Ve||n[55]!==$e||n[56]!==Me||n[57]!==te||n[58]!==se?(oe=e.jsxs("div",{className:ln,children:[Fe,ee,ne,Oe,Ve,$e,Me,te,se]}),n[50]=Fe,n[51]=ee,n[52]=ne,n[53]=Oe,n[54]=Ve,n[55]=$e,n[56]=Me,n[57]=te,n[58]=se,n[59]=oe):oe=n[59];let ae;n[60]!==N||n[61]!==me.length||n[62]!==de||n[63]!==k||n[64]!==le?(ae=me.length===0&&le.length===0&&de.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:k?`No connections match "${k}"`:N==="connected"?"No connections yet":"No connections available"}),n[60]=N,n[61]=me.length,n[62]=de,n[63]=k,n[64]=le,n[65]=ae):ae=n[65];let ie;n[66]!==Z||n[67]!==oe||n[68]!==ae?(ie=e.jsxs("div",{className:Z,children:[oe,ae]}),n[66]=Z,n[67]=oe,n[68]=ae,n[69]=ie):ie=n[69];let _e;return n[70]!==De||n[71]!==ie?(_e=e.jsxs(e.Fragment,{children:[De,ie]}),n[70]=De,n[71]=ie,n[72]=_e):_e=n[72],_e}function nt(u){return!u.verified&&!u._meta?.["mcp.mesh"]?.verified&&!u.meta?.verified}function tt(u){return u.verified||u._meta?.["mcp.mesh"]?.verified||u.meta?.verified}function st(u){return u.app_name}function ot(u){return u.app_name}function at(u){return u?.items??[]}function it(u,n){if(u?.hasMore)return n.reduce(ct,0)}function ct(u,n){return u+(n?.items?.length??0)}function Vt({open:u,onOpenChange:n,defaultTab:J,initialSearch:z="",...j}){const $=j.mode??"add",M="agentId"in j?j.agentId:void 0,X="addedConnectionIds"in j?j.addedConnectionIds??new Set:new Set,v="onAdd"in j&&j.onAdd?j.onAdd:t=>{},k=(t,i,f)=>{M&&C("agent_connection_attached",{agent_id:M,connection_id:t,app_name:i,mode:f})},[Y,o]=pe.useState(null),[x,I]=pe.useState(z),[U,h]=pe.useState(!1),{org:l}=Xe(),{data:H}=Ze.useSession(),p=cn(),A=mn(),N=hn(),R=t=>{n(!1),N({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:t}})},E=async t=>{o(t.app_name??t.id);try{const f=`${t.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,c=(await p.create.mutateAsync({title:f,description:t.description??null,connection_type:t.connection_type,connection_url:t.connection_url??null,connection_token:null,icon:t.icon??null,app_name:t.app_name??null,app_id:t.app_id??null,connection_headers:t.connection_headers??null})).id,r=new URL(`/api/${l.slug}/mcp/${c}`,window.location.origin),m=await Ee({url:r.href,token:null,orgId:l.id});if(m.supportsOAuth&&!m.isAuthenticated){const{token:S,tokenInfo:y,error:_}=await Le({connectionId:c,orgSlug:l.slug,scope:"offline_access"});if(_||!S){C("connection_oauth_failed",{connection_id:c,flow:"clone",error:_??"no_token"}),B.error(`Authentication failed: ${_??"no token received"}`),await p.delete.mutateAsync(c);return}if(C("connection_oauth_succeeded",{connection_id:c,flow:"clone"}),y)try{(await fetch(`/api/${l.slug}/connections/${c}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:y.accessToken,refreshToken:y.refreshToken,expiresIn:y.expiresIn,scope:y.scope,clientId:y.clientId,clientSecret:y.clientSecret,tokenEndpoint:y.tokenEndpoint})})).ok?await p.update.mutateAsync({id:c,data:{}}):await p.update.mutateAsync({id:c,data:{connection_token:S}})}catch{await p.update.mutateAsync({id:c,data:{connection_token:S}})}else await p.update.mutateAsync({id:c,data:{connection_token:S}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(r.href,null)})}k(c,t.app_name??null,"clone"),v(c)}catch(i){console.error("Failed to add connection:",i),B.error("Failed to add connection")}finally{o(null)}},s=async t=>{if(!(!l||!H?.user?.id)){o(t.id);try{const i=Gn(t,l.id,H.user.id,{remoteIndex:0}),f=i.connection_type==="STDIO",g=!!i.connection_url,c=f&&i.connection_headers&&typeof i.connection_headers=="object"&&"command"in i.connection_headers;if(!g&&!c){B.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:r}=await p.create.mutateAsync(i),m=new URL(`/api/${l.slug}/mcp/${r}`,window.location.origin),S=await Ee({url:m.href,token:null,orgId:l.id});if(S.supportsOAuth&&!S.isAuthenticated){const{token:y,tokenInfo:_,error:w}=await Le({connectionId:r,orgSlug:l.slug,scope:"offline_access"});if(w||!y){C("connection_oauth_failed",{connection_id:r,flow:"connect_new",error:w??"no_token"}),B.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w??"no token received"})`}),k(r,i.app_name??null,"new"),v(r);return}if(C("connection_oauth_succeeded",{connection_id:r,flow:"connect_new"}),_)try{(await fetch(`/api/${l.slug}/connections/${r}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:_.accessToken,refreshToken:_.refreshToken,expiresIn:_.expiresIn,scope:_.scope,clientId:_.clientId,clientSecret:_.clientSecret,tokenEndpoint:_.tokenEndpoint})})).ok?await p.update.mutateAsync({id:r,data:{}}):await p.update.mutateAsync({id:r,data:{connection_token:y}})}catch{await p.update.mutateAsync({id:r,data:{connection_token:y}})}else await p.update.mutateAsync({id:r,data:{connection_token:y}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(m.href,null)}),B.success("Connected and authenticated")}else B.success("Connected");k(r,i.app_name??null,"new"),v(r)}catch(i){console.error("Failed to connect:",i),B.error("Failed to connect")}finally{o(null)}}};return e.jsxs(tn,{open:u,onOpenChange:n,children:[e.jsxs(sn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(on,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(an,{className:"text-base font-semibold",children:$==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(vn,{value:x,onChange:I,placeholder:"Search connections..."})}),e.jsx(pe.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(et,{mode:$,agentId:M,addedConnectionIds:X,onAdd:v,onCloneAndAdd:E,onConnectAndAdd:s,connectingItemId:Y,search:x,onCreateConnection:()=>h(!0),onBrowseNavigate:R,defaultTab:J})})]}),e.jsx(Zn,{open:U,onOpenChange:h,onCreated:async t=>{h(!1);const i=new URL(`/api/${l.slug}/mcp/${t}`,window.location.origin),f=await Ee({url:i.href,token:null,orgId:l.id});if(f.supportsOAuth&&!f.isAuthenticated){const{token:g,tokenInfo:c,error:r}=await Le({connectionId:t,orgSlug:l.slug,scope:"offline_access"});if(r||!g){C("connection_oauth_failed",{connection_id:t,flow:"custom_create",error:r??"no_token"}),B.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r??"no token received"})`}),k(t,null,"custom"),v(t),n(!1);return}if(C("connection_oauth_succeeded",{connection_id:t,flow:"custom_create"}),c)try{(await fetch(`/api/${l.slug}/connections/${t}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:c.accessToken,refreshToken:c.refreshToken,expiresIn:c.expiresIn,scope:c.scope,clientId:c.clientId,clientSecret:c.clientSecret,tokenEndpoint:c.tokenEndpoint})})).ok?await p.update.mutateAsync({id:t,data:{}}):await p.update.mutateAsync({id:t,data:{connection_token:g}})}catch{await p.update.mutateAsync({id:t,data:{connection_token:g}})}else await p.update.mutateAsync({id:t,data:{connection_token:g}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(i.href,null)})}k(t,null,"custom"),v(t),n(!1)}})]})}export{Vt as A};
|
|
1
|
+
import{q as Xe,b as Ze,u as dn,F as un,G as pn,j as e,B as G,o as B,r as pe,D as mn,f as hn,l as ke,I as Ee,H as Le,t as C,K as Ne,e as fn,p as xn,U as gn,c as jn}from"./index-BM33-uTI.js";import{g as yn}from"./connection-slug-eyAPH6o3.js";import{u as en,a as nn,g as _n,C as Be}from"./connection-card-4Md1PbMA.js";import{C as vn}from"./collection-search-D3hp8frj.js";import{C as wn}from"./collection-tabs-B9KC7Uhn.js";import{g as Cn}from"./generate-id-CpWgmfmA.js";import{b as tn,a as sn,c as on,d as an,e as kn,D as Nn}from"./dialog-2y75M1_6.js";import{b as Sn,a as bn,c as In,D as An,d as Tn,e as Dn,f as Pn}from"./drawer-W7QX6Ax_.js";import{u as Fn,b as ze,T as Ue,a as He}from"./tooltip-GbZ-ULDS.js";import{F as D,b as P,c as F,d as O,f as V,a as Qe}from"./form-BVQywbIc.js";import{I as Q}from"./input-DyimJ0YM.js";import{S as On,a as Vn,b as $n,c as Mn,d as ue}from"./select-C7bkDnqt.js";import{T as En}from"./textarea-Csq7UfFg.js";import{b as cn}from"./use-connection-CRCT5mv0.js";import{n as Se}from"./Container-B1RIjk98.js";import{s as Re}from"./Star01-CH8zsyZS.js";import{w as Ln}from"./agent-icon-DAOer5aY.js";import{s as Bn}from"./XClose-C8_9CjoM.js";import{c as zn,i as we,a as Ge,E as Un,p as Hn,b as Rn,d as Kn}from"./connection-form-helpers-DI61y2e0.js";import{u as Je}from"./use-infinite-scroll-D0a1rm12.js";import{u as Xn}from"./useSuspenseInfiniteQuery-Q-NFKrZT.js";import{S as qn,u as Wn}from"./constants-D5RCRPRT.js";import{g as Qn,e as Gn,a as Jn}from"./extract-connection-data-CtQqD73R.js";import{B as Ce}from"./badge-CXArobm8.js";import{d as Ke}from"./XCircle-Kzv3aw-k.js";import{i as Ye}from"./Check-B34N9tsV.js";import{s as Yn}from"./Plus-beS007Js.js";function Zn({open:u,onOpenChange:n,onCreated:J}){const{org:z}=Xe(),{data:j}=Ze.useSession(),{stdioEnabled:$}=dn(),M=Fn(),X=cn(),v=en(),Y=nn(v,"").items,o=un({resolver:pn(zn),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"),I=o.watch("connection_url"),U=o.watch("npx_package"),h=we({uiType:x,connectionUrl:I??"",npxPackage:U??""})??Ge({uiType:x,connectionUrl:I??"",registryItems:Y}),l=s=>{const t=s.trim();if(!t)return;const i=!!o.formState.dirtyFields.title,f=!!o.formState.dirtyFields.description,g=!!o.formState.dirtyFields.env_vars,c=m=>{if(m&&(!i&&!o.getValues("title").trim()&&m.title&&o.setValue("title",m.title,{shouldDirty:!1}),!f&&!(o.getValues("description")??"").trim()&&m.description&&o.setValue("description",m.description,{shouldDirty:!1}),!g&&m.envVarKeys?.length)){const S=o.getValues("env_vars")??[],y=new Set(S.map(w=>w.key)),_=m.envVarKeys.filter(w=>!y.has(w));_.length>0&&o.setValue("env_vars",[...S,..._.map(w=>({key:w,value:""}))],{shouldDirty:!0})}},r=Hn(t);if(r&&$){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",r.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),c(we({uiType:"NPX",npxPackage:r.packageName}));return}if(t.startsWith("http://")||t.startsWith("https://")){const m=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";o.setValue("ui_type",m,{shouldDirty:!0}),o.setValue("connection_url",t,{shouldDirty:!0}),c(we({uiType:m,connectionUrl:t})??Ge({uiType:m,connectionUrl:t,registryItems:Y}));return}x==="NPX"&&c(we({uiType:"NPX",npxPackage:t}))},H=s=>{s||o.reset(),n(s)},p=async s=>{let t,i=null,f=null,g=null;s.ui_type==="NPX"?(t="STDIO",i="",g=Rn(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(t="STDIO",i="",g=Kn(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(t=s.ui_type,i=s.connection_url||"",f=s.connection_token||null);const c=Cn("conn");try{await X.create.mutateAsync({id:c,title:s.title,description:s.description||null,connection_type:t,connection_url:i,connection_token:f,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:j?.user?.id||"system",organization_id:z.id,icon:s.icon??null,app_name:null,app_id:null,connection_headers:g,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),J?.(c)}catch{B.error("Failed to create connection")}},A="Create Connection",N="Create a custom connection in your organization. Fill in the details below.",R=o.formState.isSubmitting?"Saving...":"Create Connection",E=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(D,{control:o.control,name:"ui_type",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Type *"}),e.jsxs(On,{value:s.value,onValueChange:s.onChange,children:[e.jsx(O,{children:e.jsx(Vn,{children:e.jsx($n,{})})}),e.jsxs(Mn,{children:[e.jsx(ue,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(ue,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(ue,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),"Websocket"]})}),$&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(ue,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ln,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(V,{})]})}),x==="NPX"&&e.jsx(D,{control:o.control,name:"npx_package",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"NPM Package *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"@perplexity-ai/mcp-server",...s,value:s.value??"",onPaste:t=>{const i=t.clipboardData.getData("text");i&&(t.preventDefault(),o.setValue("npx_package",i.trim(),{shouldDirty:!0}),l(i))},onBlur:t=>{l(t.target.value),s.onBlur()}})}),e.jsx(V,{})]})}),x==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(D,{control:o.control,name:"stdio_command",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Command *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"node, bun, python...",...s,value:s.value??""})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"stdio_args",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Arguments"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"arg1 arg2 --flag value",...s,value:s.value??""})}),e.jsx(V,{})]})})]}),e.jsx(D,{control:o.control,name:"stdio_cwd",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Working Directory"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"/path/to/project (optional)",...s,value:s.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(V,{})]})})]}),(x==="NPX"||x==="STDIO")&&e.jsx(D,{control:o.control,name:"env_vars",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Environment Variables"}),e.jsx(O,{children:e.jsx(Un,{value:s.value??[],onChange:s.onChange})}),e.jsx(V,{})]})}),x!=="NPX"&&x!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(D,{control:o.control,name:"connection_url",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"URL *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"https://example.com/mcp",...s,value:s.value??"",onPaste:t=>{const i=t.clipboardData.getData("text");i&&(t.preventDefault(),o.setValue("connection_url",i.trim(),{shouldDirty:!0}),l(i))},onBlur:t=>{l(t.target.value),s.onBlur()}})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"connection_token",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:h?.token?.label??"Token (optional)"}),e.jsx(O,{children:e.jsx(Q,{type:"password",placeholder:h?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...s,value:s.value??""})}),h?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(V,{})]})})]}),e.jsx(D,{control:o.control,name:"title",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Name *"}),e.jsx(O,{children:e.jsx(Q,{placeholder:"My Connection",...s})}),e.jsx(V,{})]})}),e.jsx(D,{control:o.control,name:"description",render:({field:s})=>e.jsxs(P,{children:[e.jsx(F,{children:"Description"}),e.jsx(O,{children:e.jsx(En,{placeholder:"A brief description of this connection",rows:3,...s,value:s.value??""})}),e.jsx(V,{})]})})]});return M?e.jsx(Sn,{open:u,onOpenChange:H,children:e.jsxs(bn,{className:"max-h-[90vh]",children:[e.jsx(In,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(An,{children:A}),e.jsx(Tn,{className:"mt-1",children:N})]}),e.jsx(Dn,{asChild:!0,children:e.jsx(G,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Bn,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),e.jsx(Pn,{children:e.jsx(G,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:R})})]})})]})}):e.jsx(tn,{open:u,onOpenChange:H,children:e.jsxs(sn,{className:"sm:max-w-[525px]",children:[e.jsxs(on,{children:[e.jsx(an,{children:A}),e.jsx(kn,{children:N})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(p),children:[e.jsx("div",{className:"py-4",children:E}),e.jsxs(Nn,{children:[e.jsx(G,{type:"button",variant:"outline",onClick:()=>H(!1),children:"Cancel"}),e.jsx(G,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:R})]})]})})]})})}function et(u){const n=fn.c(73),{mode:J,agentId:z,addedConnectionIds:j,onAdd:$,onCloneAndAdd:M,onConnectAndAdd:X,connectingItemId:v,search:k,onCreateConnection:Y,onBrowseNavigate:o,defaultTab:x}=u,I=J===void 0?"add":J,U=x===void 0?"connected":x,{org:h}=Xe(),l=pe.useDeferredValue(k),H=k!==l,p=l.trim().toLowerCase();let A;n[0]!==U?(A=a=>a??U,n[0]=U,n[1]=A):A=n[1];const[N,R]=xn(gn.connectionsTab(h.slug)+(U==="all"?":home-modal":":agent-modal"),A);let E;n[2]!==N||n[3]!==R?(E=a=>{a!==N&&C("connections_dialog_tab_changed",{to_tab:a}),R(a)},n[2]=N,n[3]=R,n[4]=E):E=n[4];const s=E;let t;n[5]!==h.id||n[6]!==h.slug?(t={connectionId:qn,orgId:h.id,orgSlug:h.slug},n[5]=h.id,n[6]=h.slug,n[7]=t):t=n[7];const i=Wn(t);let f,g,c;if(n[8]!==i||n[9]!==l||n[10]!==h.id){c=l?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:l.trim()},{field:["description"],operator:"contains",value:l.trim()}]}:void 0;const a={...c&&{where:c},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},d=JSON.stringify(a);g=Xn,f=Ne.collectionListInfinite(i,h.id,"","CONNECTIONS",d),n[8]=i,n[9]=l,n[10]=h.id,n[11]=f,n[12]=g,n[13]=c}else f=n[11],g=n[12],c=n[13];let r;n[14]!==i||n[15]!==c?(r=async a=>{const{pageParam:d}=a,L=d===void 0?0:d;return(await i.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...c&&{where:c},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:L}})).structuredContent},n[14]=i,n[15]=c,n[16]=r):r=n[16];let m;n[17]!==f||n[18]!==r?(m={queryKey:f,queryFn:r,initialPageParam:0,getNextPageParam:it,staleTime:3e4},n[17]=f,n[18]=r,n[19]=m):m=n[19];const{data:S,fetchNextPage:y,hasNextPage:_,isFetchingNextPage:w}=g(m),be=S?.pages.flatMap(at)??[],me=_n(be),rn=new Set(be.filter(ot).map(st)),he=en(),q=nn(he,l),Ie=Je(q.loadMore,q.hasMore,q.isLoadingMore),Ae=Je(y,_??!1,w),T=N==="all"||!!p,qe=T?q.items.filter(a=>{const d=Qn(a);if(d&&rn.has(d))return!1;if(!p)return!0;const L=a._meta?.["mcp.mesh"];return[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,L?.friendly_name,L?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(p)}):[],le=qe.filter(tt),de=qe.filter(nt);let fe;n[20]!==j?(fe=a=>a.some(d=>j.has(d.id)),n[20]=j,n[21]=fe):fe=n[21];const Te=fe;let xe;n[22]!==j||n[23]!==z||n[24]!==v||n[25]!==Te||n[26]!==I||n[27]!==$||n[28]!==o||n[29]!==M?(xe=(a,d,L,ce,K)=>{const ve=Te(K),re=K.find(W=>!j.has(W.id)),b=K[0];if(I==="browse"){const W=yn(b);return e.jsx(Be,{connection:{title:d,icon:L,description:K.length>1?`${K.length} instances`:ce??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ce,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:b.app_name??null,connection_id:b.id,instances_count:K.length}),o?.(W)}},a)}return e.jsx(Be,{connection:{title:d,icon:L,description:ce},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[ve&&e.jsxs(Ce,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Added"]}),e.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:v!==null,onClick:W=>{W.stopPropagation(),re?(C("connection_add_clicked",{action:"use_existing",app_name:b.app_name??null,connection_id:re.id}),z&&C("agent_connection_attached",{agent_id:z,connection_id:re.id,app_name:b.app_name??null,mode:"existing"}),$(re.id)):(C("connection_add_clicked",{action:"clone",app_name:b.app_name??null,base_connection_id:b.id}),M(b))},children:"Add"})]})},a)},n[22]=j,n[23]=z,n[24]=v,n[25]=Te,n[26]=I,n[27]=$,n[28]=o,n[29]=M,n[30]=xe):xe=n[30];const ge=xe;let je;n[31]!==v||n[32]!==I||n[33]!==X?(je=a=>{const d=a._meta?.["mcp.mesh"],L=d?.friendlyName||d?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",ce=a.server?.description||a.description||null,K=a.server?.icons?.[0]?.src||Jn(a.server?.repository)||null,ve=d?.official===!0,re=d?.verified===!0,b=d?.owner==="deco";return e.jsx(Be,{connection:{title:L,description:ce,icon:K},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[b&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!b&&ve&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(Ce,{variant:"outline",size:"icon",children:e.jsx(Ke,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!b&&!ve&&re&&e.jsxs(ze,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(Ce,{variant:"outline",size:"icon",children:e.jsx(Ke,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:v!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:d?.friendlyName||a.server?.name||a.name||null}),X(a)},children:v===a.id?e.jsx(ke,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[31]=v,n[32]=I,n[33]=X,n[34]=je):je=n[34];const We=je,De=!p&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(wn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:N,onTabChange:a=>s(a)}),e.jsxs(G,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),Y()},children:[e.jsx(Yn,{size:12}),"Custom Connection"]})]}),Pe=H&&"opacity-50 pointer-events-none";let Z;n[35]!==Pe?(Z=jn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[35]=Pe,n[36]=Z):Z=n[36];const ln="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[37]!==ge?(ye=a=>{if(a.type==="group")return ge(a.key,a.title,a.icon,null,a.connections);const d=a.connection;return ge(d.id,d.title,d.icon,d.description??null,[d])},n[37]=ge,n[38]=ye):ye=n[38];const Fe=me.map(ye);let ee;n[39]!==Ae?(ee=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[39]=Ae,n[40]=ee):ee=n[40];let ne;n[41]!==w?(ne=w&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[41]=w,n[42]=ne):ne=n[42];const Oe=T&&le.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Ke,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=T&&le.map(We),$e=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(We);let te;n[43]!==Ie||n[44]!==he||n[45]!==T?(te=T&&he.length>0&&e.jsx("div",{ref:Ie,className:"col-span-full h-1"}),n[43]=Ie,n[44]=he,n[45]=T,n[46]=te):te=n[46];let se;n[47]!==q.isLoadingMore||n[48]!==T?(se=T&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[47]=q.isLoadingMore,n[48]=T,n[49]=se):se=n[49];let oe;n[50]!==Fe||n[51]!==ee||n[52]!==ne||n[53]!==Oe||n[54]!==Ve||n[55]!==$e||n[56]!==Me||n[57]!==te||n[58]!==se?(oe=e.jsxs("div",{className:ln,children:[Fe,ee,ne,Oe,Ve,$e,Me,te,se]}),n[50]=Fe,n[51]=ee,n[52]=ne,n[53]=Oe,n[54]=Ve,n[55]=$e,n[56]=Me,n[57]=te,n[58]=se,n[59]=oe):oe=n[59];let ae;n[60]!==N||n[61]!==me.length||n[62]!==de||n[63]!==k||n[64]!==le?(ae=me.length===0&&le.length===0&&de.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:k?`No connections match "${k}"`:N==="connected"?"No connections yet":"No connections available"}),n[60]=N,n[61]=me.length,n[62]=de,n[63]=k,n[64]=le,n[65]=ae):ae=n[65];let ie;n[66]!==Z||n[67]!==oe||n[68]!==ae?(ie=e.jsxs("div",{className:Z,children:[oe,ae]}),n[66]=Z,n[67]=oe,n[68]=ae,n[69]=ie):ie=n[69];let _e;return n[70]!==De||n[71]!==ie?(_e=e.jsxs(e.Fragment,{children:[De,ie]}),n[70]=De,n[71]=ie,n[72]=_e):_e=n[72],_e}function nt(u){return!u.verified&&!u._meta?.["mcp.mesh"]?.verified&&!u.meta?.verified}function tt(u){return u.verified||u._meta?.["mcp.mesh"]?.verified||u.meta?.verified}function st(u){return u.app_name}function ot(u){return u.app_name}function at(u){return u?.items??[]}function it(u,n){if(u?.hasMore)return n.reduce(ct,0)}function ct(u,n){return u+(n?.items?.length??0)}function Vt({open:u,onOpenChange:n,defaultTab:J,initialSearch:z="",...j}){const $=j.mode??"add",M="agentId"in j?j.agentId:void 0,X="addedConnectionIds"in j?j.addedConnectionIds??new Set:new Set,v="onAdd"in j&&j.onAdd?j.onAdd:t=>{},k=(t,i,f)=>{M&&C("agent_connection_attached",{agent_id:M,connection_id:t,app_name:i,mode:f})},[Y,o]=pe.useState(null),[x,I]=pe.useState(z),[U,h]=pe.useState(!1),{org:l}=Xe(),{data:H}=Ze.useSession(),p=cn(),A=mn(),N=hn(),R=t=>{n(!1),N({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:t}})},E=async t=>{o(t.app_name??t.id);try{const f=`${t.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,c=(await p.create.mutateAsync({title:f,description:t.description??null,connection_type:t.connection_type,connection_url:t.connection_url??null,connection_token:null,icon:t.icon??null,app_name:t.app_name??null,app_id:t.app_id??null,connection_headers:t.connection_headers??null})).id,r=new URL(`/api/${l.slug}/mcp/${c}`,window.location.origin),m=await Ee({url:r.href,token:null,orgId:l.id});if(m.supportsOAuth&&!m.isAuthenticated){const{token:S,tokenInfo:y,error:_}=await Le({connectionId:c,orgSlug:l.slug,scope:"offline_access"});if(_||!S){C("connection_oauth_failed",{connection_id:c,flow:"clone",error:_??"no_token"}),B.error(`Authentication failed: ${_??"no token received"}`),await p.delete.mutateAsync(c);return}if(C("connection_oauth_succeeded",{connection_id:c,flow:"clone"}),y)try{(await fetch(`/api/${l.slug}/connections/${c}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:y.accessToken,refreshToken:y.refreshToken,expiresIn:y.expiresIn,scope:y.scope,clientId:y.clientId,clientSecret:y.clientSecret,tokenEndpoint:y.tokenEndpoint})})).ok?await p.update.mutateAsync({id:c,data:{}}):await p.update.mutateAsync({id:c,data:{connection_token:S}})}catch{await p.update.mutateAsync({id:c,data:{connection_token:S}})}else await p.update.mutateAsync({id:c,data:{connection_token:S}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(r.href,null)})}k(c,t.app_name??null,"clone"),v(c)}catch(i){console.error("Failed to add connection:",i),B.error("Failed to add connection")}finally{o(null)}},s=async t=>{if(!(!l||!H?.user?.id)){o(t.id);try{const i=Gn(t,l.id,H.user.id,{remoteIndex:0}),f=i.connection_type==="STDIO",g=!!i.connection_url,c=f&&i.connection_headers&&typeof i.connection_headers=="object"&&"command"in i.connection_headers;if(!g&&!c){B.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:r}=await p.create.mutateAsync(i),m=new URL(`/api/${l.slug}/mcp/${r}`,window.location.origin),S=await Ee({url:m.href,token:null,orgId:l.id});if(S.supportsOAuth&&!S.isAuthenticated){const{token:y,tokenInfo:_,error:w}=await Le({connectionId:r,orgSlug:l.slug,scope:"offline_access"});if(w||!y){C("connection_oauth_failed",{connection_id:r,flow:"connect_new",error:w??"no_token"}),B.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w??"no token received"})`}),k(r,i.app_name??null,"new"),v(r);return}if(C("connection_oauth_succeeded",{connection_id:r,flow:"connect_new"}),_)try{(await fetch(`/api/${l.slug}/connections/${r}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:_.accessToken,refreshToken:_.refreshToken,expiresIn:_.expiresIn,scope:_.scope,clientId:_.clientId,clientSecret:_.clientSecret,tokenEndpoint:_.tokenEndpoint})})).ok?await p.update.mutateAsync({id:r,data:{}}):await p.update.mutateAsync({id:r,data:{connection_token:y}})}catch{await p.update.mutateAsync({id:r,data:{connection_token:y}})}else await p.update.mutateAsync({id:r,data:{connection_token:y}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(m.href,null)}),B.success("Connected and authenticated")}else B.success("Connected");k(r,i.app_name??null,"new"),v(r)}catch(i){console.error("Failed to connect:",i),B.error("Failed to connect")}finally{o(null)}}};return e.jsxs(tn,{open:u,onOpenChange:n,children:[e.jsxs(sn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(on,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(an,{className:"text-base font-semibold",children:$==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(vn,{value:x,onChange:I,placeholder:"Search connections..."})}),e.jsx(pe.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(et,{mode:$,agentId:M,addedConnectionIds:X,onAdd:v,onCloneAndAdd:E,onConnectAndAdd:s,connectingItemId:Y,search:x,onCreateConnection:()=>h(!0),onBrowseNavigate:R,defaultTab:J})})]}),e.jsx(Zn,{open:U,onOpenChange:h,onCreated:async t=>{h(!1);const i=new URL(`/api/${l.slug}/mcp/${t}`,window.location.origin),f=await Ee({url:i.href,token:null,orgId:l.id});if(f.supportsOAuth&&!f.isAuthenticated){const{token:g,tokenInfo:c,error:r}=await Le({connectionId:t,orgSlug:l.slug,scope:"offline_access"});if(r||!g){C("connection_oauth_failed",{connection_id:t,flow:"custom_create",error:r??"no_token"}),B.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r??"no token received"})`}),k(t,null,"custom"),v(t),n(!1);return}if(C("connection_oauth_succeeded",{connection_id:t,flow:"custom_create"}),c)try{(await fetch(`/api/${l.slug}/connections/${t}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:c.accessToken,refreshToken:c.refreshToken,expiresIn:c.expiresIn,scope:c.scope,clientId:c.clientId,clientSecret:c.clientSecret,tokenEndpoint:c.tokenEndpoint})})).ok?await p.update.mutateAsync({id:t,data:{}}):await p.update.mutateAsync({id:t,data:{connection_token:g}})}catch{await p.update.mutateAsync({id:t,data:{connection_token:g}})}else await p.update.mutateAsync({id:t,data:{connection_token:g}});await A.invalidateQueries({queryKey:Ne.isMCPAuthenticated(i.href,null)})}k(t,null,"custom"),v(t),n(!1)}})]})}export{Vt as A};
|