decocms 4.99.0 → 4.99.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-XqqGV3Z6.js → AlertCircle-hYag6BbI.js} +1 -1
- package/dist/client/assets/{AreaChart-Cb5vezEb.js → AreaChart-dF42II9e.js} +1 -1
- package/dist/client/assets/{ArrowRight-eKd4fN-U.js → ArrowRight-n-TBn01e.js} +1 -1
- package/dist/client/assets/{ArrowUp-CwqP3NfG.js → ArrowUp-CV_nwp67.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DpLV-PnO.js → ArrowUpRight-CUu0poE7.js} +1 -1
- package/dist/client/assets/{Check-CuStPfkH.js → Check-BqUfCoBF.js} +1 -1
- package/dist/client/assets/{CheckCircle-CELt-Ff1.js → CheckCircle-Ci5HXbyi.js} +1 -1
- package/dist/client/assets/{ChevronDown-BhzSzO-F.js → ChevronDown-B5nNx5Dx.js} +1 -1
- package/dist/client/assets/{ChevronRight-D-6a6xHj.js → ChevronRight-BIhvsLci.js} +1 -1
- package/dist/client/assets/{ChevronUp-B2lEsVKS.js → ChevronUp-DskNR2pe.js} +1 -1
- package/dist/client/assets/{Copy01-Ckds0BNV.js → Copy01-CZUAh9vx.js} +1 -1
- package/dist/client/assets/{DotsVertical-BBjpcaJY.js → DotsVertical-DH3n__PV.js} +1 -1
- package/dist/client/assets/{Eye-CVbV_raa.js → Eye-CbhCOWW3.js} +1 -1
- package/dist/client/assets/{FilterLines-Bm-n53eP.js → FilterLines-CjyDVxAQ.js} +1 -1
- package/dist/client/assets/{Globe01-B29qVwMW.js → Globe01-xZl4NLjm.js} +1 -1
- package/dist/client/assets/{Globe04-C5fQerBK.js → Globe04-DHgs3GZc.js} +1 -1
- package/dist/client/assets/{HardDrive-BeV2wHr7.js → HardDrive-BwxUHvE5.js} +1 -1
- package/dist/client/assets/{Image01-CpzRhjw-.js → Image01-zzq68Thg.js} +1 -1
- package/dist/client/assets/{Key01-Br-NL4v6.js → Key01-BG2GwAxV.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D3pEEPrL.js → LayoutLeft-CJjI1ZVY.js} +1 -1
- package/dist/client/assets/{LinkExternal01-VPpYp_Nz.js → LinkExternal01-DuM-ETL7.js} +1 -1
- package/dist/client/assets/{Monitor01-BbWyfKM-.js → Monitor01-DCBBoK-Q.js} +1 -1
- package/dist/client/assets/{Package-giUmCQTv.js → Package-DGdUJKLk.js} +1 -1
- package/dist/client/assets/{Palette-cb_H6dYq.js → Palette-B9U3WzWJ.js} +1 -1
- package/dist/client/assets/{Play-BSxzVROp.js → Play-MPnFN4Ot.js} +1 -1
- package/dist/client/assets/{Plus-D3J2ZkJj.js → Plus-D8R0whKy.js} +1 -1
- package/dist/client/assets/{SearchLg-Bji00daO.js → SearchLg-DxljGMIS.js} +1 -1
- package/dist/client/assets/{SearchMd-DRA_fm-t.js → SearchMd-Cl1wFEaP.js} +1 -1
- package/dist/client/assets/{Settings02-DUAOVJ9V.js → Settings02-CHWQ4cze.js} +1 -1
- package/dist/client/assets/{Shield01-H9zDGPeG.js → Shield01-KvnJOfKG.js} +1 -1
- package/dist/client/assets/{Star01-Bi9Snhbv.js → Star01-CFLS8vM8.js} +1 -1
- package/dist/client/assets/{Stars01-D7TqAQfA.js → Stars01-Du90yOKu.js} +1 -1
- package/dist/client/assets/{Stars02-Ds-FqbiT.js → Stars02-DNKnMVas.js} +1 -1
- package/dist/client/assets/{Sun-1owZLJ_o.js → Sun-wJrJ62L2.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DWJ1XbLE.js → SwitchHorizontal01-Bu9Qz3KN.js} +1 -1
- package/dist/client/assets/{Tool01-DfPAe4eV.js → Tool01-C2j5CN3o.js} +1 -1
- package/dist/client/assets/{Tool02-B_haJwud.js → Tool02-M4Cw_hi1.js} +1 -1
- package/dist/client/assets/{Trash01-DE0_omFY.js → Trash01-BRj8BMoQ.js} +1 -1
- package/dist/client/assets/{TrendUp01-B5MySlCF.js → TrendUp01-DCszOWxx.js} +1 -1
- package/dist/client/assets/{Upload01-Cy9naNzM.js → Upload01-BYmQrCvZ.js} +1 -1
- package/dist/client/assets/{User01-5RIq4_Iv.js → User01-xWnqcBX5.js} +1 -1
- package/dist/client/assets/{Users01-Vq-rydwi.js → Users01-BCCI59Cd.js} +1 -1
- package/dist/client/assets/{Users03-CkwkDwFQ.js → Users03-BhAf1OI0.js} +1 -1
- package/dist/client/assets/{X-CbgRopSM.js → X-D9a7mA7z.js} +1 -1
- package/dist/client/assets/{XCircle-CiX77iUK.js → XCircle-CLqcbEJ5.js} +1 -1
- package/dist/client/assets/{XClose-DyOwi7PW.js → XClose-B4_aZN-d.js} +1 -1
- package/dist/client/assets/{Zap-D-ISyZlf.js → Zap-BM4kHy7D.js} +1 -1
- package/dist/client/assets/{ZapSquare-D0caCqhB.js → ZapSquare-CHvbVMtu.js} +1 -1
- package/dist/client/assets/{ZoomOut-BccWsYWo.js → ZoomOut-BgBVt7xO.js} +1 -1
- package/dist/client/assets/{access-gate-vNRBQIRg.js → access-gate-Blc6kHRZ.js} +1 -1
- package/dist/client/assets/{add-section-modal-CWKrN_Du.js → add-section-modal-CLgI9snf.js} +1 -1
- package/dist/client/assets/{agent-icon-C9M8Qgs2.js → agent-icon-CWafS0z1.js} +1 -1
- package/dist/client/assets/{agents-list-CPC1QRJp.js → agents-list-DARePumV.js} +1 -1
- package/dist/client/assets/{ai-providers-DVp-_mzP.js → ai-providers-CcOvZknr.js} +1 -1
- package/dist/client/assets/{alert-xjBDiZuV.js → alert-CEbwozBK.js} +1 -1
- package/dist/client/assets/{alert-dialog-DabruZmQ.js → alert-dialog-Dlf2Maxi.js} +1 -1
- package/dist/client/assets/{app-editor-CKQ7q9xg.js → app-editor-CfMliRW7.js} +1 -1
- package/dist/client/assets/{auth-B8BgG_-A.js → auth-_luaz7eq.js} +1 -1
- package/dist/client/assets/{auth-catchall-wZ-9EzxJ.js → auth-catchall-BIhNL7Oo.js} +1 -1
- package/dist/client/assets/{auth-entry-dAaFyjRj.js → auth-entry-Bu2S0sSm.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CivV-kxO.js → auth-split-layout-jhdl7GwA.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DTf1gJW3.js → authenticate-and-persist-oauth-DuV0O3R6.js} +1 -1
- package/dist/client/assets/{automation-list-row-Bxe1UuJn.js → automation-list-row-BOa-I3b7.js} +1 -1
- package/dist/client/assets/{automation-runs-CmZ9KW0J.js → automation-runs-5NMUIL2C.js} +1 -1
- package/dist/client/assets/{automations-CHRgOy3z.js → automations-BaTgc-lk.js} +1 -1
- package/dist/client/assets/{autosend-DpJObari.js → autosend-BqtYaPyS.js} +1 -1
- package/dist/client/assets/{avatar-CR9iVdur.js → avatar-Bm7TRFyI.js} +1 -1
- package/dist/client/assets/{badge-XvDeZ6fv.js → badge-BfKxdp6w.js} +1 -1
- package/dist/client/assets/{block-document-STUEK7ED.js → block-document-SAqGRPVB.js} +1 -1
- package/dist/client/assets/{brand-context-BAFCVOhd.js → brand-context-7QvMVJRB.js} +1 -1
- package/dist/client/assets/{buckets-CEBGtnhb.js → buckets-DN160Fe5.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-ZfEla-pE.js → bulk-category-panel-BeU95ijv.js} +1 -1
- package/dist/client/assets/{calendar-DRUl8y7E.js → calendar-ChM-0ri5.js} +2 -2
- package/dist/client/assets/{capability-load-error-C-aOXmL5.js → capability-load-error-DED97G7U.js} +1 -1
- package/dist/client/assets/{card-BFt8D388.js → card-_b2At37s.js} +1 -1
- package/dist/client/assets/{category-editor-B0gjpnu6.js → category-editor-C3tPwo-O.js} +1 -1
- package/dist/client/assets/{chat-context-b7wY40dG.js → chat-context-CWj_5Xjy.js} +1 -1
- package/dist/client/assets/{checkbox-B7bcFvg_.js → checkbox-B8I8ULDM.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bv9ENzK8.js → cli-auth-success-BZZJ8ljw.js} +1 -1
- package/dist/client/assets/{collection-detail-CCMftDyC.js → collection-detail-CAJRlJNz.js} +1 -1
- package/dist/client/assets/{collection-display-button-It-ZN9Ac.js → collection-display-button-MK8sJgYK.js} +1 -1
- package/dist/client/assets/{collection-search-B8DE7pS0.js → collection-search-JF6iMFQe.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-K3-9Ykil.js → collection-table-wrapper-DfpdV9wl.js} +1 -1
- package/dist/client/assets/{collection-tabs-CRi5sPF6.js → collection-tabs-DTBgpjpb.js} +1 -1
- package/dist/client/assets/{command-iaeulMQd.js → command-X9fO0ToS.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CzaxUno1.js → commerce-onboarding-CKQucrdu.js} +1 -1
- package/dist/client/assets/{companions-core-C0CN4_0i.js → companions-core-j_0J30PJ.js} +1 -1
- package/dist/client/assets/{connect-C8ZBm-KO.js → connect-BeRtumRu.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DPKgLupF.js → connect-desktop-dialog-CUJxiyZC.js} +1 -1
- package/dist/client/assets/{connection-card-e2bclNdE.js → connection-card-Bxo1rJ_l.js} +1 -1
- package/dist/client/assets/{connection-detail-DriwvK0v.js → connection-detail-VMrYv0bl.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BgZpP06w.js → connection-form-helpers-Dwr0QnsN.js} +1 -1
- package/dist/client/assets/{connections-Ca9MKk6b.js → connections-k5M7YhJ5.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BQUdJLw8.js → decopilot-sse-pool-CsaxjWqo.js} +1 -1
- package/dist/client/assets/{dialog-u_k4pxo5.js → dialog-DTERmMdq.js} +1 -1
- package/dist/client/assets/{domain-settings-DXrYDUa3.js → domain-settings-QEBY_O22.js} +1 -1
- package/dist/client/assets/{drawer-C86weXnc.js → drawer-D592XSz-.js} +1 -1
- package/dist/client/assets/{dropdown-menu-ClB-SnGU.js → dropdown-menu-DCVSlDdU.js} +1 -1
- package/dist/client/assets/{empty-state-BQe89JAr.js → empty-state-DnkxLOwP.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DwqarX0g.js → extract-connection-data-D0xv5f6d.js} +1 -1
- package/dist/client/assets/{file-explorer-BnmyGDBl.js → file-explorer-Cc7Fo9Vw.js} +1 -1
- package/dist/client/assets/{file-type-icon-CUUaDbpn.js → file-type-icon-DKZTktyz.js} +1 -1
- package/dist/client/assets/{files-ClD_mI04.js → files-C52diAtY.js} +1 -1
- package/dist/client/assets/{form-DvGgcBNp.js → form-CTIDjV5U.js} +1 -1
- package/dist/client/assets/{general-Bscno4fJ.js → general-CA388VDO.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CJwuyICc.js → github-repo-picker-DTwuNdN8.js} +1 -1
- package/dist/client/assets/{hooks-Dat9iskm.js → hooks-CGrRNfgB.js} +1 -1
- package/dist/client/assets/{index-DHwzISKL.js → index-AYpZp1GA.js} +1 -1
- package/dist/client/assets/{index-D5oNRj-6.js → index-BFgGPpC8.js} +5 -5
- package/dist/client/assets/{index-yySTLmxN.js → index-BG2iLEXm.js} +26 -26
- package/dist/client/assets/{index-DR8PhBak.js → index-BbVhqZHS.js} +1 -1
- package/dist/client/assets/{index-CTjjDL0k.js → index-BndAfnBN.js} +3 -3
- package/dist/client/assets/{index-DfYr6tBQ.js → index-CziH8yUr.js} +1 -1
- package/dist/client/assets/{index-B8aeAWA2.js → index-DExceWv9.js} +1 -1
- package/dist/client/assets/{index-CoFQWjWu.js → index-DcuzUaPh.js} +1 -1
- package/dist/client/assets/{index-Ch1cAHXh.js → index-Dq0Rv4T6.js} +1 -1
- package/dist/client/assets/{index-DvwWkvbF.js → index-fNoeLmyx.js} +1 -1
- package/dist/client/assets/{index-Akgr_Xwr.js → index-pOKU1sel.js} +1 -1
- package/dist/client/assets/{index-CteIQMB0.js → index-pSvo-p7O.js} +1 -1
- package/dist/client/assets/{index-redirect-D9npRwTP.js → index-redirect-WN2k7pJg.js} +1 -1
- package/dist/client/assets/{index-8q4ROgAp.js → index-vNH0v8Fd.js} +1 -1
- package/dist/client/assets/{index-C08sv2c-.js → index-zBE2ow0w.js} +1 -1
- package/dist/client/assets/{input-C_SNan5h.js → input-CsC1Diu-.js} +1 -1
- package/dist/client/assets/{integration-icon-B1EIcmc7.js → integration-icon-pm2IQO2U.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CprMrq6s.js → invite-member-dialog-D7IRVBXl.js} +1 -1
- package/dist/client/assets/{label-CWIiksOC.js → label-DqXNZATI.js} +1 -1
- package/dist/client/assets/{layout-rGJqztT6.js → layout-BqTeageM.js} +1 -1
- package/dist/client/assets/{login-CyLQ2590.js → login-ClDrj-2f.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CdDVM1Kh.js → mcp-oauth-BORbgW4H.js} +1 -1
- package/dist/client/assets/{members-Dgm_D9GP.js → members-WF-PminE.js} +1 -1
- package/dist/client/assets/{monaco-editor-BqkNRmLm.js → monaco-editor-B9HyQg7v.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C0eUS1sK.js → monitoring-stats-row-pvL8qOz4.js} +1 -1
- package/dist/client/assets/{multi-select-CNkG8utF.js → multi-select-BDaSL9uP.js} +1 -1
- package/dist/client/assets/{oauth-callback-7PHJt0k1.js → oauth-callback-B5QzBUa_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DWmpRKc4.js → oauth-callback-ai-provider-BDKSQRVP.js} +1 -1
- package/dist/client/assets/{onboarding-BJf0JUOS.js → onboarding-iNKOe8fc.js} +1 -1
- package/dist/client/assets/{org-install-C5x_1xL7.js → org-install-CWBMjUat.js} +1 -1
- package/dist/client/assets/{org-layout-CnVB6jxb.js → org-layout-BAP0xFKg.js} +1 -1
- package/dist/client/assets/{organization-choice-DrsNwuL0.js → organization-choice-BSm2aJn0.js} +1 -1
- package/dist/client/assets/{orgs-BkkK5Lgq.js → orgs-DmDVOJNZ.js} +1 -1
- package/dist/client/assets/{page-seo-form-4ntsafg7.js → page-seo-form-D3Q5GmQ_.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BHz6iSrk.js +1 -0
- package/dist/client/assets/{popover-ByY44B0c.js → popover-BHJXyBcl.js} +1 -1
- package/dist/client/assets/{post-editor-DnWlQ00I.js → post-editor-L5eyLvH2.js} +1 -1
- package/dist/client/assets/{primitives-alsZ8klS.js → primitives-BTXI1UhP.js} +1 -1
- package/dist/client/assets/{profile-BUunAU3P.js → profile-D40D6IbB.js} +1 -1
- package/dist/client/assets/project-app-view-dFDZ7PrH.js +1 -0
- package/dist/client/assets/record-editor-JpnOewHP.js +1 -0
- package/dist/client/assets/{redirect-editor-4U80yExP.js → redirect-editor-DJ1Y_Dqx.js} +1 -1
- package/dist/client/assets/registry-US3Gsp4u.js +2 -0
- package/dist/client/assets/{registry-layout-DO7biD8T.js → registry-layout-Czee_ui1.js} +2 -2
- package/dist/client/assets/{reports-B2iXa55y.js → reports-BvsqcplZ.js} +1 -1
- package/dist/client/assets/{require-capability-BM6Hy4og.js → require-capability-DmAVYrxg.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Bz1oFz-W.js → required-auth-layout-DZtKKGLa.js} +1 -1
- package/dist/client/assets/{reset-password-D_USgXUk.js → reset-password-Bk83Kx_H.js} +1 -1
- package/dist/client/assets/{roles-DL1onjEm.js → roles-DsJ5Ylxf.js} +1 -1
- package/dist/client/assets/{search-input-DnkWW-Gd.js → search-input-CwAJ7BWA.js} +1 -1
- package/dist/client/assets/{secrets-ByYupfvM.js → secrets-B-pJRADZ.js} +1 -1
- package/dist/client/assets/{sections-editor-la9j1l6Z.js → sections-editor-CJbGysPH.js} +1 -1
- package/dist/client/assets/{select-OlHxoBJz.js → select-DyDdd0ox.js} +1 -1
- package/dist/client/assets/{select-model-HBS9R2j8.js → select-model-J8fBCN0u.js} +1 -1
- package/dist/client/assets/{self-tool-result-CKjdMiqf.js → self-tool-result-nnnPnWxT.js} +1 -1
- package/dist/client/assets/{seo-editor-DT3BuQ4t.js → seo-editor-CCzJc2E0.js} +1 -1
- package/dist/client/assets/{settings-layout-Cyvna48K.js → settings-layout-DwppcUBS.js} +1 -1
- package/dist/client/assets/{settings-section-D4ATPOeT.js → settings-section-ZQhYRZpE.js} +1 -1
- package/dist/client/assets/{shell-controls-xSJ_CBz8.js → shell-controls-scS1Rhux.js} +1 -1
- package/dist/client/assets/{shell-layout-573UShEI.js → shell-layout-EXrCt72h.js} +1 -1
- package/dist/client/assets/{sidebar-xm1vgluP.js → sidebar-DosOHS89.js} +1 -1
- package/dist/client/assets/{skeleton-B3CL8fZK.js → skeleton-BTs-Tdu0.js} +1 -1
- package/dist/client/assets/{sso-Dl7qGlaM.js → sso-BM8eE3tq.js} +1 -1
- package/dist/client/assets/{store-DuHY87h0.js → store-CRnZmc6Z.js} +1 -1
- package/dist/client/assets/store-registry-BWDgwr86.js +2 -0
- package/dist/client/assets/{studio-tools-DkN8b8B7.js → studio-tools-ukrAmOkD.js} +1 -1
- package/dist/client/assets/{switch-Ct1C5yNI.js → switch-C9pj46Z6.js} +1 -1
- package/dist/client/assets/{table-D_twSt1A.js → table-DWcE-ljO.js} +1 -1
- package/dist/client/assets/{tabs-BL4qz_0v.js → tabs-CzbcVejC.js} +1 -1
- package/dist/client/assets/{textarea-CD_WoWL0.js → textarea-I-beCo8f.js} +1 -1
- package/dist/client/assets/{toggle-group-DXDWKX1n.js → toggle-group-CSett6iF.js} +1 -1
- package/dist/client/assets/{toolbar-DKPP0B2n.js → toolbar-f60X9WiD.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Do2JIH_X.js → toolbar-icon-button-BFnmKkKr.js} +1 -1
- package/dist/client/assets/{tooltip-DVgeIxlJ.js → tooltip-BDJ7iYv_.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CVaUEgsU.js → use-ai-providers-7OtHxRqt.js} +1 -1
- package/dist/client/assets/{use-api-keys-WnPQfDGG.js → use-api-keys-B-WaFIiT.js} +1 -1
- package/dist/client/assets/{use-automations-DUwCWM9N.js → use-automations-886ySqJq.js} +1 -1
- package/dist/client/assets/{use-autosave-BUrBAntN.js → use-autosave-CXrMNytc.js} +1 -1
- package/dist/client/assets/{use-capability-DstzlECw.js → use-capability-HyvPV9Kc.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CkqVwQ_W.js → use-clock-tick-ByL-Lh2G.js} +1 -1
- package/dist/client/assets/{use-connection-CRV9qKeY.js → use-connection-C8ytM15b.js} +1 -1
- package/dist/client/assets/{use-copy-jN-dJpfw.js → use-copy-8xFrbNwA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BLkCl8r2.js → use-create-virtual-mcp-vCdnBcqV.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0tzNtga.js → use-debounced-autosave-Dl0bn9CK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BX6NTr7f.js → use-debounced-value-KA9O7hhh.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DwHVvh8Z.js → use-deco-credits-DO8B21gs.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-jVx0nTmd.js → use-decopilot-events-ik0j7Idu.js} +1 -1
- package/dist/client/assets/{use-delete-connection-5wMwKJdr.js → use-delete-connection-CB9H-v-Z.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-B5DXZ0Si.js → use-deployment-admin-DmUmcR7f.js} +1 -1
- package/dist/client/assets/{use-file-configs-D1SQkyYf.js → use-file-configs-BrCSqQHA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BfSBcFKy.js → use-infinite-scroll-0_XM1a-S.js} +1 -1
- package/dist/client/assets/{use-join-requests-Ds7gm29T.js → use-join-requests-DKHalNnE.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-vmtcr5QJ.js → use-mcp-auth-status-DlBw1ZFI.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BiD2fCU0.js → use-mcp-client-DYOS_8eo.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C43bRzXb.js → use-mcp-tools-BLQoKB-2.js} +1 -1
- package/dist/client/assets/{use-members-1sm2C2bs.js → use-members-XmfA74-e.js} +1 -1
- package/dist/client/assets/{use-mobile-CWHotxPh.js → use-mobile-CLI42gmv.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CTFgvUlq.js → use-navigate-to-agent-Cilssw61.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DCuPZekg.js → use-org-auth-client-DOOxheWY.js} +1 -1
- package/dist/client/assets/{use-org-sso-DQPVwN8s.js → use-org-sso-ClgxAraI.js} +1 -1
- package/dist/client/assets/{use-organization-roles-EiyKpsj2.js → use-organization-roles-D9JXEbEX.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BkAAShAG.js → use-organization-settings-VgIejHMx.js} +1 -1
- package/dist/client/assets/{use-registry-app-CRmTGCyB.js → use-registry-app-DNeAw21p.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DkXu4rfL.js → use-registry-connections-Bluv6sTk.js} +1 -1
- package/dist/client/assets/{use-secrets-C-zmL48q.js → use-secrets-3k-32-A8.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cgzuw-1r.js → use-status-sounds-D9IFNrZv.js} +1 -1
- package/dist/client/assets/{use-view-mode-CwZaCSk5.js → use-view-mode-CjB0RzKt.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-rTU-PkMs.js → use-virtual-mcp-B8ePNwQG.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CzUic10e.js +1 -0
- package/dist/client/assets/{useRouterState-C8UzLSub.js → useRouterState-DUsZKnyS.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B96CIiaZ.js +1 -0
- package/dist/client/assets/{users-DqPNFRiE.js → users-KkKpy9nz.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bj6Yxd7M.js → variant-calendar-y8BhfKBh.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DbBhjVUT.js → view-mode-toggle-RIrGcafb.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/page-seo-sheet-zFYVW9Rn.js +0 -1
- package/dist/client/assets/project-app-view-CPVCpqtg.js +0 -1
- package/dist/client/assets/record-editor-DlYuibE1.js +0 -1
- package/dist/client/assets/registry-DpVhBBcq.js +0 -2
- package/dist/client/assets/store-registry-qsAKCr1t.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D2RarQG6.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DFzk5M-u.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m}from"./extract-connection-data-
|
|
1
|
+
import{b as m}from"./extract-connection-data-D0xv5f6d.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-
|
|
1
|
+
import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-BFgGPpC8.js";import{A as J,b as V}from"./alert-CEbwozBK.js";import{C as X}from"./card-_b2At37s.js";import{b as T,T as L,c as B,a as D}from"./tabs-CzbcVejC.js";import{u as O}from"./use-copy-8xFrbNwA.js";import{i as F}from"./Check-BqUfCoBF.js";import{a as I}from"./Copy01-CZUAh9vx.js";import{i as q}from"./Key01-BG2GwAxV.js";import{n as Q}from"./LinkExternal01-DuM-ETL7.js";import{s as Z}from"./Trash01-BRj8BMoQ.js";import{P as z}from"./index-pSvo-p7O.js";import{c as ee}from"./settings-section-ZQhYRZpE.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-B-WaFIiT.js";import"./sidebar-DosOHS89.js";import"./LayoutLeft-CJjI1ZVY.js";import"./use-mobile-CLI42gmv.js";import"./X-D9a7mA7z.js";import"./tooltip-BDJ7iYv_.js";import"./ArrowUpRight-CUu0poE7.js";import"./use-mcp-client-DYOS_8eo.js";import"./auth-_luaz7eq.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
|
|
2
2
|
--header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${l}]`,`url = "${i}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
|
|
3
3
|
`)}}if(e==="claude-desktop"){const n={type:"http",url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${i}
|
|
4
4
|
|
package/dist/client/assets/{connect-desktop-dialog-DPKgLupF.js → connect-desktop-dialog-CUJxiyZC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as z,j as t,b as A,r as _,B,m as w}from"./index-
|
|
1
|
+
import{c as z,j as t,b as A,r as _,B,m as w}from"./index-BFgGPpC8.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-DTERmMdq.js";import{u as P,S as F}from"./chat-context-CWj_5Xjy.js";import{i as G}from"./Check-BqUfCoBF.js";import{a as W}from"./Copy01-CZUAh9vx.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,o=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const n=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==n.hostname||e[3]!==n.machineId||e[4]!==n.online||e[5]!==l||e[6]!==s||e[7]!==o){const c=n.hostname??n.machineId??o("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=n.online?o("chat.connectDesktopDialog.connectedTo",{desktopName:c}):o("chat.connectDesktopDialog.connectYourDesktop"),e[2]=n.hostname,e[3]=n.machineId,e[4]=n.online,e[5]=l,e[6]=s,e[7]=o,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==n.online||e[20]!==o?(D=n.online?o("chat.connectDesktopDialog.machineAgentsDescription"):o("chat.connectDesktopDialog.runCommandDescription"),e[19]=n.online,e[20]=o,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==n.online?(k=!n.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T),M(!0),setTimeout(()=>M(!1),1500)},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=n.online,e[30]=k):k=e[30];let C;e[31]!==n.capabilities||e[32]!==n.online||e[33]!==o?(C=n.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=n.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:o(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),o("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=n.capabilities,e[32]=n.online,e[33]=o,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,F as $,aZ as L,K as k,m as w,j as I}from"./index-
|
|
1
|
+
import{c as M,F as $,aZ as L,K as k,m as w,j as I}from"./index-BFgGPpC8.js";import{u as D}from"./use-registry-connections-Bluv6sTk.js";import{c as K}from"./use-organization-settings-VgIejHMx.js";import{S as E,j as F}from"./use-mcp-client-DYOS_8eo.js";import{u as Q}from"./useInfiniteQuery-CzUic10e.js";import{i as H,f as q}from"./extract-connection-data-D0xv5f6d.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-_b2At37s.js";import{I as X}from"./integration-icon-pm2IQO2U.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const Z=24,_=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=z(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:Z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(B),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function B(s){return A(s)}function W(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as be,ag as $e,b4 as De,M as me,ae as Oe,c as R,b as H,j as t,k as ve,B,r as Z,m as Ne,F as te,w as Me,K as ae,d as se,aJ as ue,D as ze,b5 as Ee,E as Ue,f as Re,b6 as Ve,o as Fe,R as Le,P as Be,t as Y,b7 as He}from"./index-D5oNRj-6.js";import{g as qe}from"./extract-connection-data-DwqarX0g.js";import{E as Se}from"./empty-state-BQe89JAr.js";import{E as Ge,c as Ke,r as Qe,b as Xe,d as We}from"./connection-form-helpers-BgZpP06w.js";import{c as Je,S as Ye,V as Ze}from"./index-8q4ROgAp.js";import{u as ye,T as et}from"./use-mcp-auth-status-vmtcr5QJ.js";import{a as tt}from"./use-members-1sm2C2bs.js";import{A as st}from"./avatar-CR9iVdur.js";import{a as Ce,b as _e,u as nt}from"./use-connection-CRV9qKeY.js";import{u as we}from"./use-mcp-client-BiD2fCU0.js";import{a as it}from"./use-mcp-tools-C43bRzXb.js";import{c as ot,C as at,a as rt,d as lt}from"./AreaChart-Cb5vezEb.js";import{i as ct,a as dt}from"./mcp-oauth-CdDVM1Kh.js";import{I as re}from"./integration-icon-B1EIcmc7.js";import{s as mt}from"./Plus-D3J2ZkJj.js";import{R as ut,S as xt,az as pt,b as ft}from"./agent-icon-C9M8Qgs2.js";import{a as ke,s as ht}from"./Settings02-DUAOVJ9V.js";import{s as ce}from"./Trash01-DE0_omFY.js";import{q as gt,p as jt,o as bt,m as vt,n as Nt}from"./sidebar-xm1vgluP.js";import{F as K,b as Q,c as X,d as L,f as W,e as St,a as yt}from"./form-DvGgcBNp.js";import{I as J}from"./input-C_SNan5h.js";import{u as Ct,D as _t}from"./use-delete-connection-5wMwKJdr.js";import{c as wt,B as kt,a as It,C as Tt}from"./monitoring-stats-row-C0eUS1sK.js";import{u as At}from"./studio-tools-DkN8b8B7.js";import{u as Pt}from"./use-virtual-mcp-rTU-PkMs.js";import{i as Ie}from"./ChevronRight-D-6a6xHj.js";import{a as Te}from"./Users03-CkwkDwFQ.js";import{c as ne,b as $t,T as ie,a as Dt}from"./tabs-BL4qz_0v.js";import{g as Ae}from"./connection-slug-eyAPH6o3.js";import{n as Ot}from"./ZapSquare-D0caCqhB.js";import{c as Mt}from"./Tool01-DfPAe4eV.js";import{g as de,M as zt}from"./index-DR8PhBak.js";import{C as Et}from"./collection-search-B8DE7pS0.js";import{C as Ut}from"./card-BFt8D388.js";import{B as Rt}from"./badge-XvDeZ6fv.js";import{c as Vt,D as Ft,b as Lt,a as xe}from"./dropdown-menu-ClB-SnGU.js";import{S as pe,a as fe,b as he,c as ge,d as G}from"./select-OlHxoBJz.js";import{i as Bt}from"./CheckCircle-CELt-Ff1.js";import{t as Ht}from"./ChevronDown-BhzSzO-F.js";import{n as qt}from"./Tool02-B_haJwud.js";import{s as oe}from"./Star01-Bi9Snhbv.js";import{s as Gt}from"./XClose-DyOwi7PW.js";import"./index-CteIQMB0.js";import"./ZoomOut-BccWsYWo.js";import"./Key01-Br-NL4v6.js";import"./auth-B8BgG_-A.js";import"./use-registry-connections-DkXu4rfL.js";import"./use-organization-settings-BkAAShAG.js";import"./index-DvwWkvbF.js";import"./index-B8aeAWA2.js";import"./popover-ByY44B0c.js";import"./tooltip-DVgeIxlJ.js";import"./Check-CuStPfkH.js";import"./SearchMd-DRA_fm-t.js";import"./use-mobile-CWHotxPh.js";import"./use-create-virtual-mcp-BLkCl8r2.js";import"./use-navigate-to-agent-CTFgvUlq.js";import"./hooks-Dat9iskm.js";import"./decopilot-sse-pool-BQUdJLw8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-CVbV_raa.js";import"./use-org-auth-client-DCuPZekg.js";import"./User01-5RIq4_Iv.js";import"./AlertCircle-XqqGV3Z6.js";import"./ArrowUp-CwqP3NfG.js";import"./ArrowRight-eKd4fN-U.js";import"./ArrowUpRight-DpLV-PnO.js";import"./TrendUp01-B5MySlCF.js";import"./ChevronUp-B2lEsVKS.js";import"./DotsVertical-BBjpcaJY.js";import"./Stars02-Ds-FqbiT.js";import"./Copy01-Ckds0BNV.js";import"./Globe01-B29qVwMW.js";import"./FilterLines-Bm-n53eP.js";import"./Globe04-C5fQerBK.js";import"./SwitchHorizontal01-DWJ1XbLE.js";import"./HardDrive-BeV2wHr7.js";import"./Image01-CpzRhjw-.js";import"./LayoutLeft-D3pEEPrL.js";import"./XCircle-CiX77iUK.js";import"./LinkExternal01-VPpYp_Nz.js";import"./Monitor01-BbWyfKM-.js";import"./Sun-1owZLJ_o.js";import"./Package-giUmCQTv.js";import"./Palette-cb_H6dYq.js";import"./Play-BSxzVROp.js";import"./SearchLg-Bji00daO.js";import"./Shield01-H9zDGPeG.js";import"./Stars01-D7TqAQfA.js";import"./Upload01-Cy9naNzM.js";import"./Users01-Vq-rydwi.js";import"./X-CbgRopSM.js";import"./Zap-D-ISyZlf.js";import"./label-CWIiksOC.js";import"./alert-dialog-DabruZmQ.js";const Kt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Kt}];function Xt(s){const e=R.c(55),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=H();let l;e[0]!==n.id?(l={connectionId:n.id},e[0]=n.id,e[1]=l):l=e[1];const u=ye(l),d=!(n.connection_type==="VIRTUAL")&&u.supportsOAuth&&!u.isAuthenticated,h=n.status!=="active",m=d||h?"border-destructive/50 bg-destructive/5":"border-transparent";let f;e[2]!==m?(f=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let N;e[7]!==n.title?(N=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=N):N=e[8];let S;e[9]!==n.status||e[10]!==h||e[11]!==d||e[12]!==a?(S=d?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):h?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=h,e[11]=d,e[12]=a,e[13]=S):S=e[13];let b;e[14]!==N||e[15]!==S?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[N,S]}),e[14]=N,e[15]=S,e[16]=b):b=e[16];let y;e[17]!==n||e[18]!==d||e[19]!==o||e[20]!==a?(y=d&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=d,e[19]=o,e[20]=a,e[21]=y):y=e[21];let T;e[22]!==n||e[23]!==h||e[24]!==r||e[25]!==a?(T=h?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ut,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),children:t.jsx(xt,{size:13})}),e[22]=n,e[23]=h,e[24]=r,e[25]=a,e[26]=T):T=e[26];let A;e[27]!==n||e[28]!==c?(A=()=>c(n),e[27]=n,e[28]=c,e[29]=A):A=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ke,{size:13}),e[32]=M):M=e[32];let k;e[33]!==A||e[34]!==_?(k=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:A,title:_,children:M}),e[33]=A,e[34]=_,e[35]=k):k=e[35];let P;e[36]!==n||e[37]!==i?(P=()=>i(n),e[36]=n,e[37]=i,e[38]=P):P=e[38];let I;e[39]!==a?(I=a("details.connectionInstancesPanel.delete"),e[39]=a,e[40]=I):I=e[40];let v;e[41]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ce,{size:13}),e[41]=v):v=e[41];let j;e[42]!==P||e[43]!==I?(j=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:P,title:I,children:v}),e[42]=P,e[43]=I,e[44]=j):j=e[44];let D;e[45]!==k||e[46]!==j||e[47]!==y||e[48]!==T?(D=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,T,k,j]}),e[45]=k,e[46]=j,e[47]=y,e[48]=T,e[49]=D):D=e[49];let U;return e[50]!==D||e[51]!==f||e[52]!==g||e[53]!==b?(U=t.jsxs("div",{className:f,children:[g,b,D]}),e[50]=D,e[51]=f,e[52]=g,e[53]=b,e[54]=U):U=e[54],U}function Wt(s){const e=R.c(18),{instance:n,onConfigure:c}=s,o=H();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let l;e[8]!==o?(l=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ke,{size:13}),e[10]=u):u=e[10];let p;e[11]!==a||e[12]!==l?(p=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:l,children:u})}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let d;return e[14]!==i||e[15]!==r||e[16]!==p?(d=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,p]}),e[14]=i,e[15]=r,e[16]=p,e[17]=d):d=e[17],d}function Jt(s){const e=R.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:l}=s,u=H();if(n.length===0)return null;let p;e[0]!==n.length||e[1]!==u?(p=n.length===1?u("details.connectionInstancesPanel.instance"):u("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=u,e[2]=p):p=e[2];let d;e[3]!==p?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:p}),e[3]=p,e[4]=d):d=e[4];let h;e[5]!==l?(h=l?t.jsx(ve,{size:13,className:"animate-spin"}):t.jsx(mt,{size:13}),e[5]=l,e[6]=h):h=e[6];let m;e[7]!==u?(m=u("details.connectionInstancesPanel.addInstance"),e[7]=u,e[8]=m):m=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==h||e[12]!==m?(f=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:l,children:[h,m]}),e[9]=l,e[10]=a,e[11]=h,e[12]=m,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==f?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,f]}),e[14]=d,e[15]=f,e[16]=g):g=e[16];let N;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=T=>t.jsx(Z.Suspense,{fallback:t.jsx(Wt,{instance:T,onConfigure:c}),children:t.jsx(Xt,{instance:T,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},T.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],N=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=N}else N=e[22];let S;e[28]!==N?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:N}),e[28]=N,e[29]=S):S=e[29];let b;return e[30]!==g||e[31]!==S?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=b):b=e[32],b}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=R.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=H(),r=At(),a=es(o),{data:l}=Me({queryKey:ae.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),u=wt(l?.logs??[],a),p=u.data,d=u.totalCalls>0,h=Yt(l?.logs??[]),m=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let f;e[0]!==i?(f=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=f):f=e[1];let g;return e[2]!==f?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:f}),e[2]=f,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),g]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),d?t.jsxs("div",{children:[t.jsx(ot,{config:ts,className:"h-16 w-full",children:t.jsxs(kt,{data:p,barCategoryGap:"4%",children:[t.jsx(at,{content:t.jsx(rt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(It,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),h.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),m>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:m.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:h.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(Tt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function rs(s){const e=R.c(19),{connectionId:n}=s,c=H(),[o,i]=Z.useState("14d"),{org:r}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let l;e[2]!==a?(l=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=l):l=e[3];let u;e[4]!==o?(u=Zt.map(g=>t.jsx("button",{type:"button",onClick:()=>i(g.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===g.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:g.label},g.value)),e[4]=o,e[5]=u):u=e[5];let p;e[6]!==u?(p=t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[6]=u,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==p?(d=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[l,p]}),e[8]=l,e[9]=p,e[10]=d):d=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(as,{}),e[11]=h):h=e[11];let m;e[12]!==n||e[13]!==r.id||e[14]!==o?(m=t.jsx(Z.Suspense,{fallback:h,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[12]=n,e[13]=r.id,e[14]=o,e[15]=m):m=e[15];let f;return e[16]!==d||e[17]!==m?(f=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,m]}),e[16]=d,e[17]=m,e[18]=f):f=e[18],f}function ls(s){const e=R.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const d=crypto.randomUUID();o({to:"/$org/$taskId",params:{org:c,taskId:d},search:{virtualmcpid:n.id}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Te,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let p;return e[11]!==i||e[12]!==a||e[13]!==l?(p=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,l,u]}),e[11]=i,e[12]=a,e[13]=l,e[14]=p):p=e[14],p}function cs(s){const e=R.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=R.c(7),{connection:n}=s,{org:c}=te();let o;e[0]!==n.id?(o={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=o):o=e[1];const i=Pt(o);if(!(i.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=a):a=e[3];let l;return e[4]!==c.slug||e[5]!==i?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:i,org:c.slug})})]}),e[4]=c.slug,e[5]=i,e[6]=l):l=e[6],l}function ms(s){const e=R.c(35),{tools:n,connectionId:c,org:o}=s,i=H(),r=se(),{org:a}=te();let l;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const u=we(l),p=Ce(c);let d;e[4]!==p||e[5]!==c?(d=p?Ae(p):c,e[4]=p,e[5]=c,e[6]=d):d=e[6];const h=d,[m,f]=Z.useState("");let g,N,S,b;if(e[7]!==h||e[8]!==u||e[9]!==r||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const A=(n??[]).filter(us),_=m.toLowerCase().trim(),M=_?A.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):A;let k;e[18]!==h||e[19]!==r||e[20]!==o?(k=j=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:h,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=h,e[19]=r,e[20]=o,e[21]=k):k=e[21];const P=k;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Escape"&&(f(""),j.target.blur())},e[24]=v):v=e[24],e[25]!==m||e[26]!==I?(b=t.jsx(Et,{value:m,onChange:f,placeholder:I,onKeyDown:v}),e[25]=m,e[26]=I,e[27]=b):b=e[27],g="flex-1 overflow-auto p-5",N=M.length===0?t.jsx(Se,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(j=>{const D=de(j._meta);return t.jsxs(Ut,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(zt,{resourceURI:D,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:u})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.name}),t.jsx(et,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=h,e[8]=u,e[9]=r,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=N,e[16]=S,e[17]=b}else g=e[14],N=e[15],S=e[16],b=e[17];let y;e[28]!==g||e[29]!==N?(y=t.jsx("div",{className:g,children:N}),e[28]=g,e[29]=N,e[30]=y):y=e[30];let T;return e[31]!==S||e[32]!==b||e[33]!==y?(T=t.jsxs("div",{className:S,children:[b,y]}),e[31]=S,e[32]=b,e[33]=y,e[34]=T):T=e[34],T}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=R.c(5),{label:n}=s,c=H();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=R.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const l=a;let u;e[2]!==o?(u=o===void 0?[]:o,e[2]=o,e[3]=u):u=e[3];const p=u,d=H(),h=se(),m=Ce(i??"");let f;e[4]!==m||e[5]!==i?(f=m?Ae(m):i,e[4]=m,e[5]=i,e[6]=f):f=e[6];const g=f;let N;e[7]!==g||e[8]!==i||e[9]!==h||e[10]!==r?(N=function(V){!i||!r||h({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=h,e[10]=r,e[11]=N):N=e[11];const S=N;let b;e[12]!==i||e[13]!==r||e[14]!==n?(b=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=b):b=e[15];const y=b;if(n.length+l.length+p.length===0){let C;e[16]!==d?(C=d("details.connectionCapabilities.capabilities"),e[16]=d,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let q;e[20]!==d?(q=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=d,e[21]=q):q=e[21];let F;e[22]!==q?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:q}),e[22]=q,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let A;e[27]!==d||e[28]!==n.length?(A=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=d,e[28]=n.length,e[29]=A):A=e[29];let _;e[30]!==A?(_=t.jsx(ne,{value:"tools",variant:"underline",children:A}),e[30]=A,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==d?(M=y&&t.jsx(ne,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=d,e[34]=M):M=e[34];let k;e[35]!==d?(k=d("details.connectionCapabilities.promptsTab"),e[35]=d,e[36]=k):k=e[36];let P;e[37]!==k?(P=t.jsx(ne,{value:"prompts",variant:"underline",children:k}),e[37]=k,e[38]=P):P=e[38];let I;e[39]!==d?(I=d("details.connectionCapabilities.resourcesTab"),e[39]=d,e[40]=I):I=e[40];let v;e[41]!==I?(v=t.jsx(ne,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=v):v=e[42];let j;e[43]!==M||e[44]!==P||e[45]!==v||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs($t,{variant:"underline",className:"gap-1",children:[_,M,P,v]})}),e[43]=M,e[44]=P,e[45]=v,e[46]=_,e[47]=j):j=e[47];let D;e[48]!==S||e[49]!==n?(D=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=D):D=e[50];let U;e[51]!==D?(U=t.jsx(ie,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:D})}),e[51]=D,e[52]=U):U=e[52];let O;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(O=y&&t.jsx(ie,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=O):O=e[57];let z;e[58]!==l?(z=l.length>0?l.map(fs):t.jsx(le,{label:"prompts"}),e[58]=l,e[59]=z):z=e[59];let E;e[60]!==z?(E=t.jsx(ie,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[60]=z,e[61]=E):E=e[61];let x;e[62]!==p?(x=p.length>0?p.map(ps):t.jsx(le,{label:"resources"}),e[62]=p,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ie,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let $;return e[66]!==j||e[67]!==U||e[68]!==O||e[69]!==E||e[70]!==w?($=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Dt,{defaultValue:"tools",variant:"underline",children:[j,U,O,E,w]})}),e[66]=j,e[67]=U,e[68]=O,e[69]=E,e[70]=w,e[71]=$):$=e[71],$}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(pt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=R.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=l):l=e[9];let u;return e[10]!==i||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,l]}),e[10]=i,e[11]=l,e[12]=u):u=e[12],u}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=H(),r=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:l}=ze(),u=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),p=l||e.connection_type==="STDIO",d=e.connection_type==="VIRTUAL",h=d?Ee(e.connection_url):null;return d?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),h&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:h})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(oe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(G,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(G,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ft,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(W,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(W,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Ge,{value:m.value??[],onChange:m.onChange})}),t.jsx(W,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i(u?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Ft,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Rt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ht,{size:12})]})})}),t.jsxs(Lt,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ht,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&m.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Gt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(J,{type:"password",placeholder:i(u?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),u&&t.jsxs(St,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&He(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=We(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const l=H(),u=se({from:"/$org/settings/connections/$appSlug"}),p=Fe(),d=_e(),{org:h}=te(),m=Ct({onSuccess:()=>{a.length<=1&&u({to:"/$org/settings/connections",params:{org:n}})}}),[f,g]=Z.useState(null),[N,S]=Z.useState(!1),b=ye({connectionId:e}),{data:y}=tt(),T=y?.data?.members??[],A=f??s,_=T.find(x=>x.userId===A.created_by),k=s?.connection_type==="VIRTUAL"||b.isAuthenticated,P={...s,tools:o},I=Je(P,Qt),v=Le({resolver:Be(Ke),values:je(f??s)}),j=v.formState.isDirty,D=async()=>{if(!await v.trigger())return;const w=v.getValues(),$=Ss(w),C=f?.id??e;await d.update.mutateAsync({id:C,data:$}),v.reset(w)},U=()=>{v.reset(je(f??s))},O=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:$,tokenInfo:C,error:V}=await dt({connectionId:x,orgSlug:h.slug,...w?{scope:w}:{}});if(V||!$){Y.error(l("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${h.slug}/connections/${x}/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})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await d.update.mutateAsync({id:x,data:{connection_token:$}});else try{await d.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await d.update.mutateAsync({id:x,data:{connection_token:$}})}else await d.update.mutateAsync({id:x,data:{connection_token:$}});const q=new URL(`/api/${h.slug}/mcp/${x}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(q.href,null)}),await p.invalidateQueries({queryKey:ae.mcpClientPrefix()}),Y.success(l("details.connection.authSuccess"))},z=()=>O(s.id),E=async()=>{try{const x=await fetch(`/api/${h.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const $=await x.text();Y.error(l("details.connection.failedRemoveOAuth",{error:$}));return}const w=new URL(`/api/${h.slug}/mcp/${s.id}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),Y.success(l("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),Y.error(l("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...m}),t.jsx(gt,{open:f!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(jt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(bt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:f?.title??s.title}),t.jsx(Nt,{className:"text-xs",children:l("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:l("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(yt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:v.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...x})}),t.jsx(W,{})]})}),t.jsx(K,{control:v.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...x,value:x.value||""})}),t.jsx(W,{})]})})]}),t.jsx(js,{form:v,connection:f??s,hasOAuthToken:b.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:E}),t.jsx(Ye,{connection:f??s,form:v,hasMcpBinding:I,isMCPAuthenticated:k,supportsOAuth:b.supportsOAuth,isServerError:b.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:D,disabled:!j||c,className:"flex-1",children:l(c?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(B,{variant:"outline",onClick:U,children:l("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=f??s;g(null),m.requestDelete(x)},children:[t.jsx(ce,{size:15}),l("details.connection.deleteButton")]})]})]},f?.id??s.id)]})}),t.jsx(Ze,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>O(x.id),onDelete:x=>m.requestDelete(x),onToggleStatus:async(x,w)=>{try{await d.update.mutateAsync({id:x.id,data:{status:w}}),Y.success(l(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(l("details.connection.failedUpdateConnection"))}},isAdding:N,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),$=a.length+1,C=`${w} (${$})`,V=qe("conn");await d.create.mutateAsync({id:V,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${h.slug}/mcp/${V}`,window.location.origin),F=await ct({url:q.href,token:null,orgId:h.id});F.supportsOAuth&&!F.isAuthenticated&&await O(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=R.c(52),e=H();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Re(o),{org:a}=te(),l=_e();let u;s[2]!==i?(u={slug:i},s[2]=i,s[3]=u):u=s[3];const p=nt(u),d=p[0]??null,h=d?.id??"",m=h||null;let f;s[4]!==a.id||s[5]!==a.slug||s[6]!==m?(f={connectionId:m,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=m,s[7]=f):f=s[7];const g=we(f);let N;s[8]!==g?(N={client:g},s[8]=g,s[9]=N):N=s[9];const{data:S}=it(N);let b;if(s[10]!==d?.tools||s[11]!==h||s[12]!==p||s[13]!==S){const O=S?S.tools.map(As):(d?.tools??[]).map(Ts);e:{if(p.length<=1){b=O;break e}const z=new Set,E=[],x=ks;for(const w of p){const $=w.id===h?O:x(w.tools);for(const C of $)z.has(C.name)||(z.add(C.name),E.push(C))}b=E.length>0?E:O}s[10]=d?.tools,s[11]=h,s[12]=p,s[13]=S,s[14]=b}else b=s[14];const y=b;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:A}=lt(T);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let k;s[19]!==A?.prompts?(k=A?.prompts??[],s[19]=A?.prompts,s[20]=k):k=s[20];let P;s[21]!==k?(P=k.map(ws),s[21]=k,s[22]=P):P=s[22];const I=P;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let j;s[25]!==v?(j=v.map(_s),s[25]=v,s[26]=j):j=s[26];const D=j;if(!d){let O;s[27]!==e?(O=e("details.connection.notFoundTitle"),s[27]=e,s[28]=O):O=s[28];let z;s[29]!==e?(z=e("details.connection.notFoundDescription"),s[29]=e,s[30]=z):z=s[30];let E;s[31]!==c||s[32]!==r?(E=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=E):E=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==E||s[37]!==x?(w=t.jsx(B,{variant:"outline",onClick:E,children:x}),s[36]=E,s[37]=x,s[38]=w):w=s[38];let $;return s[39]!==O||s[40]!==z||s[41]!==w?($=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:O,description:z,actions:w})}),s[39]=O,s[40]=z,s[41]=w,s[42]=$):$=s[42],$}let U;return s[43]!==l.update.isPending||s[44]!==y||s[45]!==d||s[46]!==h||s[47]!==r||s[48]!==I||s[49]!==D||s[50]!==p?(U=t.jsx(ys,{org:r,connection:d,connectionId:h,isUpdating:l.update.isPending,tools:y,prompts:I,resources:D,siblings:p}),s[43]=l.update.isPending,s[44]=y,s[45]=d,s[46]=h,s[47]=r,s[48]=I,s[49]=D,s[50]=p,s[51]=U):U=s[51],U}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Si(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{Si as default};
|
|
1
|
+
import{J as be,ag as $e,b4 as De,M as me,ae as Oe,c as R,b as H,j as t,k as ve,B,r as Z,m as Ne,F as te,w as Me,K as ae,d as se,aJ as ue,D as ze,b5 as Ee,E as Ue,f as Re,b6 as Ve,o as Fe,R as Le,P as Be,t as Y,b7 as He}from"./index-BFgGPpC8.js";import{g as qe}from"./extract-connection-data-D0xv5f6d.js";import{E as Se}from"./empty-state-DnkxLOwP.js";import{E as Ge,c as Ke,r as Qe,b as Xe,d as We}from"./connection-form-helpers-Dwr0QnsN.js";import{c as Je,S as Ye,V as Ze}from"./index-vNH0v8Fd.js";import{u as ye,T as et}from"./use-mcp-auth-status-DlBw1ZFI.js";import{a as tt}from"./use-members-XmfA74-e.js";import{A as st}from"./avatar-Bm7TRFyI.js";import{a as Ce,b as _e,u as nt}from"./use-connection-C8ytM15b.js";import{u as we}from"./use-mcp-client-DYOS_8eo.js";import{a as it}from"./use-mcp-tools-BLQoKB-2.js";import{c as ot,C as at,a as rt,d as lt}from"./AreaChart-dF42II9e.js";import{i as ct,a as dt}from"./mcp-oauth-BORbgW4H.js";import{I as re}from"./integration-icon-pm2IQO2U.js";import{s as mt}from"./Plus-D8R0whKy.js";import{R as ut,S as xt,az as pt,b as ft}from"./agent-icon-CWafS0z1.js";import{a as ke,s as ht}from"./Settings02-CHWQ4cze.js";import{s as ce}from"./Trash01-BRj8BMoQ.js";import{q as gt,p as jt,o as bt,m as vt,n as Nt}from"./sidebar-DosOHS89.js";import{F as K,b as Q,c as X,d as L,f as W,e as St,a as yt}from"./form-CTIDjV5U.js";import{I as J}from"./input-CsC1Diu-.js";import{u as Ct,D as _t}from"./use-delete-connection-CB9H-v-Z.js";import{c as wt,B as kt,a as It,C as Tt}from"./monitoring-stats-row-pvL8qOz4.js";import{u as At}from"./studio-tools-ukrAmOkD.js";import{u as Pt}from"./use-virtual-mcp-B8ePNwQG.js";import{i as Ie}from"./ChevronRight-BIhvsLci.js";import{a as Te}from"./Users03-BhAf1OI0.js";import{c as ne,b as $t,T as ie,a as Dt}from"./tabs-CzbcVejC.js";import{g as Ae}from"./connection-slug-eyAPH6o3.js";import{n as Ot}from"./ZapSquare-CHvbVMtu.js";import{c as Mt}from"./Tool01-C2j5CN3o.js";import{g as de,M as zt}from"./index-BbVhqZHS.js";import{C as Et}from"./collection-search-JF6iMFQe.js";import{C as Ut}from"./card-_b2At37s.js";import{B as Rt}from"./badge-BfKxdp6w.js";import{c as Vt,D as Ft,b as Lt,a as xe}from"./dropdown-menu-DCVSlDdU.js";import{S as pe,a as fe,b as he,c as ge,d as G}from"./select-DyDdd0ox.js";import{i as Bt}from"./CheckCircle-Ci5HXbyi.js";import{t as Ht}from"./ChevronDown-B5nNx5Dx.js";import{n as qt}from"./Tool02-M4Cw_hi1.js";import{s as oe}from"./Star01-CFLS8vM8.js";import{s as Gt}from"./XClose-B4_aZN-d.js";import"./index-pSvo-p7O.js";import"./ZoomOut-BgBVt7xO.js";import"./Key01-BG2GwAxV.js";import"./auth-_luaz7eq.js";import"./use-registry-connections-Bluv6sTk.js";import"./use-organization-settings-VgIejHMx.js";import"./index-fNoeLmyx.js";import"./index-DExceWv9.js";import"./popover-BHJXyBcl.js";import"./tooltip-BDJ7iYv_.js";import"./Check-BqUfCoBF.js";import"./SearchMd-Cl1wFEaP.js";import"./use-mobile-CLI42gmv.js";import"./use-create-virtual-mcp-vCdnBcqV.js";import"./use-navigate-to-agent-Cilssw61.js";import"./hooks-CGrRNfgB.js";import"./decopilot-sse-pool-CsaxjWqo.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-CbhCOWW3.js";import"./use-org-auth-client-DOOxheWY.js";import"./User01-xWnqcBX5.js";import"./AlertCircle-hYag6BbI.js";import"./ArrowUp-CV_nwp67.js";import"./ArrowRight-n-TBn01e.js";import"./ArrowUpRight-CUu0poE7.js";import"./TrendUp01-DCszOWxx.js";import"./ChevronUp-DskNR2pe.js";import"./DotsVertical-DH3n__PV.js";import"./Stars02-DNKnMVas.js";import"./Copy01-CZUAh9vx.js";import"./Globe01-xZl4NLjm.js";import"./FilterLines-CjyDVxAQ.js";import"./Globe04-DHgs3GZc.js";import"./SwitchHorizontal01-Bu9Qz3KN.js";import"./HardDrive-BwxUHvE5.js";import"./Image01-zzq68Thg.js";import"./LayoutLeft-CJjI1ZVY.js";import"./XCircle-CLqcbEJ5.js";import"./LinkExternal01-DuM-ETL7.js";import"./Monitor01-DCBBoK-Q.js";import"./Sun-wJrJ62L2.js";import"./Package-DGdUJKLk.js";import"./Palette-B9U3WzWJ.js";import"./Play-MPnFN4Ot.js";import"./SearchLg-DxljGMIS.js";import"./Shield01-KvnJOfKG.js";import"./Stars01-Du90yOKu.js";import"./Upload01-BYmQrCvZ.js";import"./Users01-BCCI59Cd.js";import"./X-D9a7mA7z.js";import"./Zap-BM4kHy7D.js";import"./label-DqXNZATI.js";import"./alert-dialog-Dlf2Maxi.js";const Kt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Kt}];function Xt(s){const e=R.c(55),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=H();let l;e[0]!==n.id?(l={connectionId:n.id},e[0]=n.id,e[1]=l):l=e[1];const u=ye(l),d=!(n.connection_type==="VIRTUAL")&&u.supportsOAuth&&!u.isAuthenticated,h=n.status!=="active",m=d||h?"border-destructive/50 bg-destructive/5":"border-transparent";let f;e[2]!==m?(f=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let N;e[7]!==n.title?(N=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=N):N=e[8];let S;e[9]!==n.status||e[10]!==h||e[11]!==d||e[12]!==a?(S=d?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):h?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=h,e[11]=d,e[12]=a,e[13]=S):S=e[13];let b;e[14]!==N||e[15]!==S?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[N,S]}),e[14]=N,e[15]=S,e[16]=b):b=e[16];let y;e[17]!==n||e[18]!==d||e[19]!==o||e[20]!==a?(y=d&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=d,e[19]=o,e[20]=a,e[21]=y):y=e[21];let T;e[22]!==n||e[23]!==h||e[24]!==r||e[25]!==a?(T=h?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ut,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),children:t.jsx(xt,{size:13})}),e[22]=n,e[23]=h,e[24]=r,e[25]=a,e[26]=T):T=e[26];let A;e[27]!==n||e[28]!==c?(A=()=>c(n),e[27]=n,e[28]=c,e[29]=A):A=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ke,{size:13}),e[32]=M):M=e[32];let k;e[33]!==A||e[34]!==_?(k=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:A,title:_,children:M}),e[33]=A,e[34]=_,e[35]=k):k=e[35];let P;e[36]!==n||e[37]!==i?(P=()=>i(n),e[36]=n,e[37]=i,e[38]=P):P=e[38];let I;e[39]!==a?(I=a("details.connectionInstancesPanel.delete"),e[39]=a,e[40]=I):I=e[40];let v;e[41]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ce,{size:13}),e[41]=v):v=e[41];let j;e[42]!==P||e[43]!==I?(j=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:P,title:I,children:v}),e[42]=P,e[43]=I,e[44]=j):j=e[44];let D;e[45]!==k||e[46]!==j||e[47]!==y||e[48]!==T?(D=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,T,k,j]}),e[45]=k,e[46]=j,e[47]=y,e[48]=T,e[49]=D):D=e[49];let U;return e[50]!==D||e[51]!==f||e[52]!==g||e[53]!==b?(U=t.jsxs("div",{className:f,children:[g,b,D]}),e[50]=D,e[51]=f,e[52]=g,e[53]=b,e[54]=U):U=e[54],U}function Wt(s){const e=R.c(18),{instance:n,onConfigure:c}=s,o=H();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let l;e[8]!==o?(l=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ke,{size:13}),e[10]=u):u=e[10];let p;e[11]!==a||e[12]!==l?(p=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:l,children:u})}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let d;return e[14]!==i||e[15]!==r||e[16]!==p?(d=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,p]}),e[14]=i,e[15]=r,e[16]=p,e[17]=d):d=e[17],d}function Jt(s){const e=R.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:l}=s,u=H();if(n.length===0)return null;let p;e[0]!==n.length||e[1]!==u?(p=n.length===1?u("details.connectionInstancesPanel.instance"):u("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=u,e[2]=p):p=e[2];let d;e[3]!==p?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:p}),e[3]=p,e[4]=d):d=e[4];let h;e[5]!==l?(h=l?t.jsx(ve,{size:13,className:"animate-spin"}):t.jsx(mt,{size:13}),e[5]=l,e[6]=h):h=e[6];let m;e[7]!==u?(m=u("details.connectionInstancesPanel.addInstance"),e[7]=u,e[8]=m):m=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==h||e[12]!==m?(f=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:l,children:[h,m]}),e[9]=l,e[10]=a,e[11]=h,e[12]=m,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==f?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,f]}),e[14]=d,e[15]=f,e[16]=g):g=e[16];let N;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=T=>t.jsx(Z.Suspense,{fallback:t.jsx(Wt,{instance:T,onConfigure:c}),children:t.jsx(Xt,{instance:T,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},T.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],N=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=N}else N=e[22];let S;e[28]!==N?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:N}),e[28]=N,e[29]=S):S=e[29];let b;return e[30]!==g||e[31]!==S?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=b):b=e[32],b}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=R.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=H(),r=At(),a=es(o),{data:l}=Me({queryKey:ae.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),u=wt(l?.logs??[],a),p=u.data,d=u.totalCalls>0,h=Yt(l?.logs??[]),m=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let f;e[0]!==i?(f=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=f):f=e[1];let g;return e[2]!==f?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:f}),e[2]=f,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),g]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),d?t.jsxs("div",{children:[t.jsx(ot,{config:ts,className:"h-16 w-full",children:t.jsxs(kt,{data:p,barCategoryGap:"4%",children:[t.jsx(at,{content:t.jsx(rt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(It,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),h.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),m>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:m.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:h.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(Tt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function rs(s){const e=R.c(19),{connectionId:n}=s,c=H(),[o,i]=Z.useState("14d"),{org:r}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let l;e[2]!==a?(l=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=l):l=e[3];let u;e[4]!==o?(u=Zt.map(g=>t.jsx("button",{type:"button",onClick:()=>i(g.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===g.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:g.label},g.value)),e[4]=o,e[5]=u):u=e[5];let p;e[6]!==u?(p=t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[6]=u,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==p?(d=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[l,p]}),e[8]=l,e[9]=p,e[10]=d):d=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(as,{}),e[11]=h):h=e[11];let m;e[12]!==n||e[13]!==r.id||e[14]!==o?(m=t.jsx(Z.Suspense,{fallback:h,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[12]=n,e[13]=r.id,e[14]=o,e[15]=m):m=e[15];let f;return e[16]!==d||e[17]!==m?(f=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,m]}),e[16]=d,e[17]=m,e[18]=f):f=e[18],f}function ls(s){const e=R.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const d=crypto.randomUUID();o({to:"/$org/$taskId",params:{org:c,taskId:d},search:{virtualmcpid:n.id}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Te,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let p;return e[11]!==i||e[12]!==a||e[13]!==l?(p=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,l,u]}),e[11]=i,e[12]=a,e[13]=l,e[14]=p):p=e[14],p}function cs(s){const e=R.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=R.c(7),{connection:n}=s,{org:c}=te();let o;e[0]!==n.id?(o={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=o):o=e[1];const i=Pt(o);if(!(i.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=a):a=e[3];let l;return e[4]!==c.slug||e[5]!==i?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:i,org:c.slug})})]}),e[4]=c.slug,e[5]=i,e[6]=l):l=e[6],l}function ms(s){const e=R.c(35),{tools:n,connectionId:c,org:o}=s,i=H(),r=se(),{org:a}=te();let l;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const u=we(l),p=Ce(c);let d;e[4]!==p||e[5]!==c?(d=p?Ae(p):c,e[4]=p,e[5]=c,e[6]=d):d=e[6];const h=d,[m,f]=Z.useState("");let g,N,S,b;if(e[7]!==h||e[8]!==u||e[9]!==r||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const A=(n??[]).filter(us),_=m.toLowerCase().trim(),M=_?A.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):A;let k;e[18]!==h||e[19]!==r||e[20]!==o?(k=j=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:h,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=h,e[19]=r,e[20]=o,e[21]=k):k=e[21];const P=k;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Escape"&&(f(""),j.target.blur())},e[24]=v):v=e[24],e[25]!==m||e[26]!==I?(b=t.jsx(Et,{value:m,onChange:f,placeholder:I,onKeyDown:v}),e[25]=m,e[26]=I,e[27]=b):b=e[27],g="flex-1 overflow-auto p-5",N=M.length===0?t.jsx(Se,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(j=>{const D=de(j._meta);return t.jsxs(Ut,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(zt,{resourceURI:D,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:u})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.name}),t.jsx(et,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=h,e[8]=u,e[9]=r,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=N,e[16]=S,e[17]=b}else g=e[14],N=e[15],S=e[16],b=e[17];let y;e[28]!==g||e[29]!==N?(y=t.jsx("div",{className:g,children:N}),e[28]=g,e[29]=N,e[30]=y):y=e[30];let T;return e[31]!==S||e[32]!==b||e[33]!==y?(T=t.jsxs("div",{className:S,children:[b,y]}),e[31]=S,e[32]=b,e[33]=y,e[34]=T):T=e[34],T}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=R.c(5),{label:n}=s,c=H();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=R.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const l=a;let u;e[2]!==o?(u=o===void 0?[]:o,e[2]=o,e[3]=u):u=e[3];const p=u,d=H(),h=se(),m=Ce(i??"");let f;e[4]!==m||e[5]!==i?(f=m?Ae(m):i,e[4]=m,e[5]=i,e[6]=f):f=e[6];const g=f;let N;e[7]!==g||e[8]!==i||e[9]!==h||e[10]!==r?(N=function(V){!i||!r||h({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=h,e[10]=r,e[11]=N):N=e[11];const S=N;let b;e[12]!==i||e[13]!==r||e[14]!==n?(b=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=b):b=e[15];const y=b;if(n.length+l.length+p.length===0){let C;e[16]!==d?(C=d("details.connectionCapabilities.capabilities"),e[16]=d,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let q;e[20]!==d?(q=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=d,e[21]=q):q=e[21];let F;e[22]!==q?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:q}),e[22]=q,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let A;e[27]!==d||e[28]!==n.length?(A=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=d,e[28]=n.length,e[29]=A):A=e[29];let _;e[30]!==A?(_=t.jsx(ne,{value:"tools",variant:"underline",children:A}),e[30]=A,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==d?(M=y&&t.jsx(ne,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=d,e[34]=M):M=e[34];let k;e[35]!==d?(k=d("details.connectionCapabilities.promptsTab"),e[35]=d,e[36]=k):k=e[36];let P;e[37]!==k?(P=t.jsx(ne,{value:"prompts",variant:"underline",children:k}),e[37]=k,e[38]=P):P=e[38];let I;e[39]!==d?(I=d("details.connectionCapabilities.resourcesTab"),e[39]=d,e[40]=I):I=e[40];let v;e[41]!==I?(v=t.jsx(ne,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=v):v=e[42];let j;e[43]!==M||e[44]!==P||e[45]!==v||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs($t,{variant:"underline",className:"gap-1",children:[_,M,P,v]})}),e[43]=M,e[44]=P,e[45]=v,e[46]=_,e[47]=j):j=e[47];let D;e[48]!==S||e[49]!==n?(D=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=D):D=e[50];let U;e[51]!==D?(U=t.jsx(ie,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:D})}),e[51]=D,e[52]=U):U=e[52];let O;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(O=y&&t.jsx(ie,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=O):O=e[57];let z;e[58]!==l?(z=l.length>0?l.map(fs):t.jsx(le,{label:"prompts"}),e[58]=l,e[59]=z):z=e[59];let E;e[60]!==z?(E=t.jsx(ie,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[60]=z,e[61]=E):E=e[61];let x;e[62]!==p?(x=p.length>0?p.map(ps):t.jsx(le,{label:"resources"}),e[62]=p,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ie,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let $;return e[66]!==j||e[67]!==U||e[68]!==O||e[69]!==E||e[70]!==w?($=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Dt,{defaultValue:"tools",variant:"underline",children:[j,U,O,E,w]})}),e[66]=j,e[67]=U,e[68]=O,e[69]=E,e[70]=w,e[71]=$):$=e[71],$}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(pt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=R.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=l):l=e[9];let u;return e[10]!==i||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,l]}),e[10]=i,e[11]=l,e[12]=u):u=e[12],u}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=H(),r=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:l}=ze(),u=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),p=l||e.connection_type==="STDIO",d=e.connection_type==="VIRTUAL",h=d?Ee(e.connection_url):null;return d?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),h&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:h})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(oe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(G,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(G,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),p&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ft,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(W,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(W,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Ge,{value:m.value??[],onChange:m.onChange})}),t.jsx(W,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i(u?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Ft,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Rt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ht,{size:12})]})})}),t.jsxs(Lt,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ht,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&m.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Gt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(J,{type:"password",placeholder:i(u?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),u&&t.jsxs(St,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&He(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=We(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const l=H(),u=se({from:"/$org/settings/connections/$appSlug"}),p=Fe(),d=_e(),{org:h}=te(),m=Ct({onSuccess:()=>{a.length<=1&&u({to:"/$org/settings/connections",params:{org:n}})}}),[f,g]=Z.useState(null),[N,S]=Z.useState(!1),b=ye({connectionId:e}),{data:y}=tt(),T=y?.data?.members??[],A=f??s,_=T.find(x=>x.userId===A.created_by),k=s?.connection_type==="VIRTUAL"||b.isAuthenticated,P={...s,tools:o},I=Je(P,Qt),v=Le({resolver:Be(Ke),values:je(f??s)}),j=v.formState.isDirty,D=async()=>{if(!await v.trigger())return;const w=v.getValues(),$=Ss(w),C=f?.id??e;await d.update.mutateAsync({id:C,data:$}),v.reset(w)},U=()=>{v.reset(je(f??s))},O=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:$,tokenInfo:C,error:V}=await dt({connectionId:x,orgSlug:h.slug,...w?{scope:w}:{}});if(V||!$){Y.error(l("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${h.slug}/connections/${x}/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})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await d.update.mutateAsync({id:x,data:{connection_token:$}});else try{await d.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await d.update.mutateAsync({id:x,data:{connection_token:$}})}else await d.update.mutateAsync({id:x,data:{connection_token:$}});const q=new URL(`/api/${h.slug}/mcp/${x}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(q.href,null)}),await p.invalidateQueries({queryKey:ae.mcpClientPrefix()}),Y.success(l("details.connection.authSuccess"))},z=()=>O(s.id),E=async()=>{try{const x=await fetch(`/api/${h.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const $=await x.text();Y.error(l("details.connection.failedRemoveOAuth",{error:$}));return}const w=new URL(`/api/${h.slug}/mcp/${s.id}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),Y.success(l("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),Y.error(l("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...m}),t.jsx(gt,{open:f!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(jt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(bt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:f?.title??s.title}),t.jsx(Nt,{className:"text-xs",children:l("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:l("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(yt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:v.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...x})}),t.jsx(W,{})]})}),t.jsx(K,{control:v.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(X,{children:l("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...x,value:x.value||""})}),t.jsx(W,{})]})})]}),t.jsx(js,{form:v,connection:f??s,hasOAuthToken:b.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:E}),t.jsx(Ye,{connection:f??s,form:v,hasMcpBinding:I,isMCPAuthenticated:k,supportsOAuth:b.supportsOAuth,isServerError:b.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:D,disabled:!j||c,className:"flex-1",children:l(c?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(B,{variant:"outline",onClick:U,children:l("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=f??s;g(null),m.requestDelete(x)},children:[t.jsx(ce,{size:15}),l("details.connection.deleteButton")]})]})]},f?.id??s.id)]})}),t.jsx(Ze,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>O(x.id),onDelete:x=>m.requestDelete(x),onToggleStatus:async(x,w)=>{try{await d.update.mutateAsync({id:x.id,data:{status:w}}),Y.success(l(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(l("details.connection.failedUpdateConnection"))}},isAdding:N,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),$=a.length+1,C=`${w} (${$})`,V=qe("conn");await d.create.mutateAsync({id:V,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${h.slug}/mcp/${V}`,window.location.origin),F=await ct({url:q.href,token:null,orgId:h.id});F.supportsOAuth&&!F.isAuthenticated&&await O(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=R.c(52),e=H();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Re(o),{org:a}=te(),l=_e();let u;s[2]!==i?(u={slug:i},s[2]=i,s[3]=u):u=s[3];const p=nt(u),d=p[0]??null,h=d?.id??"",m=h||null;let f;s[4]!==a.id||s[5]!==a.slug||s[6]!==m?(f={connectionId:m,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=m,s[7]=f):f=s[7];const g=we(f);let N;s[8]!==g?(N={client:g},s[8]=g,s[9]=N):N=s[9];const{data:S}=it(N);let b;if(s[10]!==d?.tools||s[11]!==h||s[12]!==p||s[13]!==S){const O=S?S.tools.map(As):(d?.tools??[]).map(Ts);e:{if(p.length<=1){b=O;break e}const z=new Set,E=[],x=ks;for(const w of p){const $=w.id===h?O:x(w.tools);for(const C of $)z.has(C.name)||(z.add(C.name),E.push(C))}b=E.length>0?E:O}s[10]=d?.tools,s[11]=h,s[12]=p,s[13]=S,s[14]=b}else b=s[14];const y=b;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:A}=lt(T);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let k;s[19]!==A?.prompts?(k=A?.prompts??[],s[19]=A?.prompts,s[20]=k):k=s[20];let P;s[21]!==k?(P=k.map(ws),s[21]=k,s[22]=P):P=s[22];const I=P;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let j;s[25]!==v?(j=v.map(_s),s[25]=v,s[26]=j):j=s[26];const D=j;if(!d){let O;s[27]!==e?(O=e("details.connection.notFoundTitle"),s[27]=e,s[28]=O):O=s[28];let z;s[29]!==e?(z=e("details.connection.notFoundDescription"),s[29]=e,s[30]=z):z=s[30];let E;s[31]!==c||s[32]!==r?(E=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=E):E=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==E||s[37]!==x?(w=t.jsx(B,{variant:"outline",onClick:E,children:x}),s[36]=E,s[37]=x,s[38]=w):w=s[38];let $;return s[39]!==O||s[40]!==z||s[41]!==w?($=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:O,description:z,actions:w})}),s[39]=O,s[40]=z,s[41]=w,s[42]=$):$=s[42],$}let U;return s[43]!==l.update.isPending||s[44]!==y||s[45]!==d||s[46]!==h||s[47]!==r||s[48]!==I||s[49]!==D||s[50]!==p?(U=t.jsx(ys,{org:r,connection:d,connectionId:h,isUpdating:l.update.isPending,tools:y,prompts:I,resources:D,siblings:p}),s[43]=l.update.isPending,s[44]=y,s[45]=d,s[46]=h,s[47]=r,s[48]=I,s[49]=D,s[50]=p,s[51]=U):U=s[51],U}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Si(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{Si as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as R,ag as A,b4 as I,M as a,ae as j,af as z,c as L,j as u,B as C}from"./index-
|
|
1
|
+
import{J as R,ag as A,b4 as I,M as a,ae as j,af as z,c as L,j as u,B as C}from"./index-BFgGPpC8.js";import{I as H}from"./input-CsC1Diu-.js";import{s as W}from"./Plus-D8R0whKy.js";import{s as q}from"./Trash01-BRj8BMoQ.js";const K=R({key:a().min(1,"Key is required"),value:a()}),G=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:A(a(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=V(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
|