decocms 3.19.1 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CfP2ydlK.js → AlertCircle-B-p2hhbf.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BG7K2o4g.js → ArrowUpRight-Bq-dJGgn.js} +1 -1
- package/dist/client/assets/{Check-Rzhysg8v.js → Check-CSixRgqh.js} +1 -1
- package/dist/client/assets/{CheckCircle-ByVfCd_z.js → CheckCircle-CqLcOI7o.js} +1 -1
- package/dist/client/assets/{ChevronDown-DgAQraB9.js → ChevronDown-BptXi8Ef.js} +1 -1
- package/dist/client/assets/{ChevronLeft-hIkmA-06.js → ChevronLeft-Bq6F--2K.js} +1 -1
- package/dist/client/assets/{ChevronRight-C-1GbVi6.js → ChevronRight-CtziSifX.js} +1 -1
- package/dist/client/assets/{ChevronUp-D95kdAWS.js → ChevronUp-DChs66VU.js} +1 -1
- package/dist/client/assets/{Container-EsK9R8Cs.js → Container-DIwdobum.js} +1 -1
- package/dist/client/assets/{DotsVertical--nxfulT_.js → DotsVertical-DQ3UGDDE.js} +1 -1
- package/dist/client/assets/{Eye-0u1NnyPn.js → Eye-DepFjUJE.js} +1 -1
- package/dist/client/assets/{FilterLines-lN6ZYEU6.js → FilterLines-CIJgiiLT.js} +1 -1
- package/dist/client/assets/{Globe01-CYJ5akFo.js → Globe01-BayTDYGC.js} +1 -1
- package/dist/client/assets/{HardDrive-Bi11tZlO.js → HardDrive-OwnJRrIS.js} +1 -1
- package/dist/client/assets/{Key01-ETI9VuA0.js → Key01-CR8zfCdU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D5P3SyL5.js → LayoutLeft-6fPyjOVd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CMTN51kD.js → LinkExternal01-B2YZgRTN.js} +1 -1
- package/dist/client/assets/{Monitor01-B9COEs1V.js → Monitor01-BNXW6pu5.js} +1 -1
- package/dist/client/assets/{Palette-CvBtCHX7.js → Palette-siqkt4cQ.js} +1 -1
- package/dist/client/assets/{Play-zcNTCzY3.js → Play-CBt0NeLA.js} +1 -1
- package/dist/client/assets/{Plus-BVt3gf6N.js → Plus-gXoAw_mX.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Do9uT8r5.js → RefreshCcw01-DlKjMM-5.js} +1 -1
- package/dist/client/assets/{SearchMd-Ckbe6j0d.js → SearchMd-z6b-QOmX.js} +1 -1
- package/dist/client/assets/{Settings02-BFHOCA5h.js → Settings02-C7YqxsZL.js} +1 -1
- package/dist/client/assets/{Shield01-ebA_Mmqa.js → Shield01-BT66FEMI.js} +1 -1
- package/dist/client/assets/{Star01-DinMZEQp.js → Star01-q6EhXttt.js} +1 -1
- package/dist/client/assets/{Stars01-cUHrtzm6.js → Stars01-DcMeK1n0.js} +1 -1
- package/dist/client/assets/{Stars02-CovFPupV.js → Stars02-DJ4Y5TfK.js} +1 -1
- package/dist/client/assets/{Sun-D5MzBxyK.js → Sun-CeFpMHQU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CLmvgZdy.js → SwitchHorizontal01-__hAuhZa.js} +1 -1
- package/dist/client/assets/{Tool01-D6Ixmgxm.js → Tool01-DXWYgeBe.js} +1 -1
- package/dist/client/assets/{Trash01-C6sXu2xm.js → Trash01-B91-1KNk.js} +1 -1
- package/dist/client/assets/{Upload01-DslYY_N3.js → Upload01-CcwGyBRP.js} +1 -1
- package/dist/client/assets/{User01-9CJ-p7XF.js → User01-JR_76gHl.js} +1 -1
- package/dist/client/assets/{Users01-Ds5_zubO.js → Users01-BM2QLqUJ.js} +1 -1
- package/dist/client/assets/{Users03-C3j_vENk.js → Users03-D5pU3_ql.js} +1 -1
- package/dist/client/assets/{X-Dzpu-bw3.js → X-DCWlm9Ta.js} +1 -1
- package/dist/client/assets/{XCircle-gezQrKJB.js → XCircle-CEKwTNMD.js} +1 -1
- package/dist/client/assets/{XClose-dfaecXcF.js → XClose-DhQ5V0ST.js} +1 -1
- package/dist/client/assets/{Zap-ZCJiHFB8.js → Zap-BLBAeivN.js} +1 -1
- package/dist/client/assets/{ZapSquare-Doe97qp7.js → ZapSquare-DSdwG_FE.js} +1 -1
- package/dist/client/assets/{ZoomOut-u9z9zRXH.js → ZoomOut-CCPaeWry.js} +1 -1
- package/dist/client/assets/{access-gate-CLs4hv6_.js → access-gate-DXlQ8iVy.js} +1 -1
- package/dist/client/assets/{accordion-y8ERtqeD.js → accordion-CsQ2TTIf.js} +1 -1
- package/dist/client/assets/add-section-modal-ilTOPIUe.js +1 -0
- package/dist/client/assets/{agent-capabilities-C4HO1AsU.js → agent-capabilities-CuNGQogd.js} +1 -1
- package/dist/client/assets/{agent-icon-atw8dEpB.js → agent-icon-Lc1AgwlE.js} +1 -1
- package/dist/client/assets/{agent-icons-BO9U458u.js → agent-icons-Cprwkzhw.js} +1 -1
- package/dist/client/assets/agents-list--b7dVWdV.js +1 -0
- package/dist/client/assets/ai-providers-Dw2EV4N6.js +1 -0
- package/dist/client/assets/{alert-f3LQH8ql.js → alert-HSAarVhN.js} +1 -1
- package/dist/client/assets/{alert-dialog-BDuu9Vea.js → alert-dialog-DJLxSS_E.js} +1 -1
- package/dist/client/assets/app-editor-ZPlbW7dI.js +1 -0
- package/dist/client/assets/{auth-catchall-kvc8ufSV.js → auth-catchall-DeBOSldf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CJrIhcxn.js → auth-split-layout-DKKncNKx.js} +1 -1
- package/dist/client/assets/{automation-list-row-DCGCyvJL.js → automation-list-row-C8yWYA2H.js} +1 -1
- package/dist/client/assets/automation-runs-D-WPNg7m.js +1 -0
- package/dist/client/assets/automations-C0KOU0yb.js +1 -0
- package/dist/client/assets/{avatar-DiepLBEZ.js → avatar-3vQWE5Hu.js} +1 -1
- package/dist/client/assets/{badge-Cosh8Jv6.js → badge-DF6gVmsi.js} +1 -1
- package/dist/client/assets/brand-context-EmCiQUXD.js +1 -0
- package/dist/client/assets/buckets-SH6KUYAQ.js +1 -0
- package/dist/client/assets/{calendar-D85iiJjZ.js → calendar-CCqv5TgR.js} +1 -1
- package/dist/client/assets/{capability-load-error-h6odhJ2k.js → capability-load-error-Dn3qy9VI.js} +1 -1
- package/dist/client/assets/{card-B2dT-2ts.js → card-CeH_PUFE.js} +1 -1
- package/dist/client/assets/{chat-context-7nRfVaxU.js → chat-context-BIie9ysT.js} +1 -1
- package/dist/client/assets/{checkbox-B2YbUc0m.js → checkbox-DFFY_m2B.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLeVCI6_.js → cli-auth-success-CKQ9nJ3v.js} +1 -1
- package/dist/client/assets/collection-detail-BVeEbzxz.js +1 -0
- package/dist/client/assets/{collection-display-button-COhijorf.js → collection-display-button-_le1JW4q.js} +1 -1
- package/dist/client/assets/{collection-search-C0bvNtM9.js → collection-search-Bryj5VYk.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C_B1r31J.js → collection-table-wrapper-DoTnvoII.js} +1 -1
- package/dist/client/assets/{collection-tabs-BN4In63u.js → collection-tabs-Y3w8w2D4.js} +1 -1
- package/dist/client/assets/{collections-BUCuRVxl.js → collections-B-UBhIxv.js} +1 -1
- package/dist/client/assets/{command-BjqkQYxa.js → command-KyGHPzm4.js} +1 -1
- package/dist/client/assets/connect-desktop-dialog-BeLm4wl6.js +1 -0
- package/dist/client/assets/connection-card-Dug8PvM2.js +1 -0
- package/dist/client/assets/connection-detail-BXK_93LF.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B093QOVj.js → connection-form-helpers-Ce4ZXQGG.js} +1 -1
- package/dist/client/assets/connections-CVEBwrj4.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-DYhlxmFV.js → decopilot-sse-pool-vfZK3kan.js} +1 -1
- package/dist/client/assets/{dialog-CvJmXij7.js → dialog-nXKceTRB.js} +1 -1
- package/dist/client/assets/domain-settings-OHWjjHlQ.js +1 -0
- package/dist/client/assets/{drawer-Cm2a8ouX.js → drawer-lSnonzW3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-jK5-EocK.js → dropdown-menu-DpfpR4kx.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-BYQB-ubA.js +1 -0
- package/dist/client/assets/{empty-state-BvMn8pb-.js → empty-state-BJuYi96S.js} +1 -1
- package/dist/client/assets/{empty-state-CZ6jnWLa.js → empty-state-CY7XUbo0.js} +1 -1
- package/dist/client/assets/extract-connection-data-DxtHEsy3.js +1 -0
- package/dist/client/assets/features-DeiC9LXr.js +1 -0
- package/dist/client/assets/file-explorer-Ch6ZQfZO.js +2 -0
- package/dist/client/assets/{file-type-icon-B565DmsG.js → file-type-icon-B2skJERp.js} +1 -1
- package/dist/client/assets/{files-DDtaNJV8.js → files-CZNNukx-.js} +1 -1
- package/dist/client/assets/{form-DAahwl9B.js → form-BM4RuTjX.js} +1 -1
- package/dist/client/assets/general-sYzqMtl5.js +1 -0
- package/dist/client/assets/{generate-id-CnLzNGg6.js → generate-id-DvX29Me7.js} +1 -1
- package/dist/client/assets/{github-repo-picker-qDFzaGLa.js → github-repo-picker-Dlio4Q6_.js} +1 -1
- package/dist/client/assets/{header-tab-button-sg2Bkh9m.js → header-tab-button-BY6bk4Fs.js} +1 -1
- package/dist/client/assets/{hover-card-DyNloM84.js → hover-card-DASEEDYA.js} +1 -1
- package/dist/client/assets/image-field-BTCmGBNs.js +1 -0
- package/dist/client/assets/{index-DaTDomcZ.js → index-1xoY7YJX.js} +1 -1
- package/dist/client/assets/{index-DU03U45c.js → index-BXzjL9VS.js} +4 -4
- package/dist/client/assets/{index-RoHcRkq0.js → index-BfzqpoYd.js} +3 -3
- package/dist/client/assets/{index-Dhy2A-ml.js → index-CVPVNlMM.js} +1 -1
- package/dist/client/assets/{index-BlWGRwfE.js → index-CaqKcth7.js} +1 -1
- package/dist/client/assets/{index-B2iHTL-o.js → index-CnLAq3ph.js} +1 -1
- package/dist/client/assets/{index-BloRy46B.js → index-D3hStv8f.js} +1 -1
- package/dist/client/assets/{index-BFIoANt_.js → index-D4BxVbG6.js} +1 -1
- package/dist/client/assets/index-DFmAjKzK.js +1 -0
- package/dist/client/assets/{index-nS3rTKOQ.js → index-DOW4VN4f.js} +1 -1
- package/dist/client/assets/{index-Dw66yPMC.js → index-DcxEaxY4.js} +1 -1
- package/dist/client/assets/index-Dey5W81J.js +1 -0
- package/dist/client/assets/index-e3NOZKNP.js +1 -0
- package/dist/client/assets/{index-BDzZll30.js → index-nkMA7ZNv.js} +1 -1
- package/dist/client/assets/{index-redirect-DNU9Ckad.js → index-redirect-Dz1DdiHC.js} +1 -1
- package/dist/client/assets/{index-3Euwx3bh.js → index-uO0JijnU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-GkUb2zKT.js → infiniteQueryObserver-CvEVG_TM.js} +1 -1
- package/dist/client/assets/{input-DsRHjNfg.js → input-BGQcwAaL.js} +1 -1
- package/dist/client/assets/{integration-icon-BOg4uSLi.js → integration-icon-B-zr5uGs.js} +1 -1
- package/dist/client/assets/{label-WCbT5R_C.js → label-zIig0cjv.js} +1 -1
- package/dist/client/assets/{layout-B9kVRgC4.js → layout-VuI1aPBj.js} +1 -1
- package/dist/client/assets/{login-B2dT1ex9.js → login-DgI1VcxE.js} +1 -1
- package/dist/client/assets/members-BdlFzlWX.js +3 -0
- package/dist/client/assets/{monaco-editor-BleU3J2F.js → monaco-editor-DQviDtyP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CwPKi62k.js → monitoring-stats-row-Bsjs_3xk.js} +1 -1
- package/dist/client/assets/{oauth-callback-D_06ga7T.js → oauth-callback-CuHVTba4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-kq_yOJkf.js → oauth-callback-ai-provider-B-N2lOyI.js} +1 -1
- package/dist/client/assets/{onboarding-CFkZhYek.js → onboarding-CqGFHsnX.js} +1 -1
- package/dist/client/assets/{org-install-BNh6vn9t.js → org-install-B0qdlOKM.js} +1 -1
- package/dist/client/assets/{org-layout-3aD45RuC.js → org-layout-CMGneEfe.js} +1 -1
- package/dist/client/assets/org-plugin-layout-DGdROiZB.js +1 -0
- package/dist/client/assets/{page-seo-form-CtJ-H1-o.js → page-seo-form-C3bI8Neh.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cs2jXSnd.js +1 -0
- package/dist/client/assets/{pair-DPmFvoFZ.js → pair-NC4sCATE.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-m3Z19NWv.js → plugin-empty-state-FQw8SLzO.js} +1 -1
- package/dist/client/assets/{plugin-header-CeEbbzl3.js → plugin-header-D-cxTW9a.js} +1 -1
- package/dist/client/assets/plugin-layout-DECTyQVg.js +1 -0
- package/dist/client/assets/{popover-00xsE00R.js → popover-B1xAxEac.js} +1 -1
- package/dist/client/assets/{post-editor-DHpEWcQc.js → post-editor-BXy1yxCV.js} +1 -1
- package/dist/client/assets/{primitives-DpFr-gq2.js → primitives-CANqy_LE.js} +1 -1
- package/dist/client/assets/{profile-BJCcQ1KU.js → profile-UNuXVjVg.js} +1 -1
- package/dist/client/assets/project-app-view-7DW_WhHA.js +1 -0
- package/dist/client/assets/record-editor-D9aMJ7nl.js +1 -0
- package/dist/client/assets/registry-Ddq3KnAW.js +2 -0
- package/dist/client/assets/{registry-layout-DfY363OJ.js → registry-layout-DH7-iD95.js} +1 -1
- package/dist/client/assets/{require-capability-USY4c6Pw.js → require-capability-Bi88Fg3q.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BTqABC6o.js → required-auth-layout-3IQyeREK.js} +1 -1
- package/dist/client/assets/{reset-password-DAzKe1m4.js → reset-password-Dstl0VXR.js} +1 -1
- package/dist/client/assets/{resizable-tvU32_PL.js → resizable-Cx-Y9zvP.js} +1 -1
- package/dist/client/assets/roles-BrYnRIt_.js +1 -0
- package/dist/client/assets/{save-status-c_gSkXRz.js → save-status-DSB279Mq.js} +1 -1
- package/dist/client/assets/{schema-form-DC8-fGrX.js → schema-form-f_EsRXt1.js} +1 -1
- package/dist/client/assets/{scroll-area-DjlF9Nhh.js → scroll-area-BYy84ztj.js} +1 -1
- package/dist/client/assets/{search-input-BIE6clnk.js → search-input-C3i2qrnL.js} +1 -1
- package/dist/client/assets/secrets-CAO0zPct.js +1 -0
- package/dist/client/assets/{sections-editor-S-fGjWCd.js → sections-editor-Dq0mEIsn.js} +1 -1
- package/dist/client/assets/{select-DzGY5lz9.js → select-DpYu937I.js} +1 -1
- package/dist/client/assets/{select-model-dzURvkLU.js → select-model-B8gz_8C_.js} +1 -1
- package/dist/client/assets/seo-editor-DCppyDVT.js +1 -0
- package/dist/client/assets/{settings-layout-B12mDVFK.js → settings-layout-BYi6Agz-.js} +1 -1
- package/dist/client/assets/{settings-section-DWjadbjH.js → settings-section-pgSq0Nbi.js} +1 -1
- package/dist/client/assets/{sheet-D-hNRlw_.js → sheet-y2Nja_Ue.js} +1 -1
- package/dist/client/assets/{shell-controls-BGifAFuQ.js → shell-controls-DyDfxDen.js} +1 -1
- package/dist/client/assets/shell-layout-D8qm1N5L.js +1 -0
- package/dist/client/assets/shell-route-loading-DQ0B9hX1.js +1 -0
- package/dist/client/assets/{sidebar-3Sp07kli.js → sidebar-B3S1MC-b.js} +1 -1
- package/dist/client/assets/{skeleton-CQGVA-Lx.js → skeleton-thGJKlMg.js} +1 -1
- package/dist/client/assets/{sortable.esm-DR5iV7W2.js → sortable.esm-DYE94iJD.js} +1 -1
- package/dist/client/assets/{spinner-CCf2Lbex.js → spinner-j70e5pPL.js} +1 -1
- package/dist/client/assets/sso-DUhv1jLf.js +1 -0
- package/dist/client/assets/store-DxrJkSaq.js +1 -0
- package/dist/client/assets/store-registry-B_QywLhG.js +2 -0
- package/dist/client/assets/{switch-DhDeb5VA.js → switch-BZi96ipJ.js} +1 -1
- package/dist/client/assets/{tab-id-BNsa7AXA.js → tab-id-CjkvF5Bz.js} +1 -1
- package/dist/client/assets/{table-BMoC5dcf.js → table-C3TjNbDC.js} +1 -1
- package/dist/client/assets/{tabs-DiVDzsDA.js → tabs-sqzEAKlk.js} +1 -1
- package/dist/client/assets/{task-status-DJjK_vX7.js → task-status-CgfEdw1R.js} +1 -1
- package/dist/client/assets/{textarea-Cq68Cg3C.js → textarea-Bo_ElpPh.js} +1 -1
- package/dist/client/assets/{toggle-group-CVuIqYb9.js → toggle-group-jYWXBndg.js} +1 -1
- package/dist/client/assets/{toolbar-CKVgGEMh.js → toolbar-BIjePcgn.js} +1 -1
- package/dist/client/assets/{tools-list-6s8Pp55V.js → tools-list-9Kj7tcM0.js} +1 -1
- package/dist/client/assets/{tooltip-CLHWv9z-.js → tooltip-CC_mfaKY.js} +1 -1
- package/dist/client/assets/{types-Cxg1qjf9.js → types-btWFnXlQ.js} +1 -1
- package/dist/client/assets/use-ai-providers-D2jZ5H5p.js +1 -0
- package/dist/client/assets/use-automations-B6ZTT5n1.js +1 -0
- package/dist/client/assets/{use-capability-DGItFWVB.js → use-capability-aJI8msnV.js} +1 -1
- package/dist/client/assets/{use-collections-DxWiIX9G.js → use-collections-vRlJo8MD.js} +1 -1
- package/dist/client/assets/use-connection-MP_sOdrQ.js +1 -0
- package/dist/client/assets/{use-copy-N9gIT0E2.js → use-copy-BkzArvj8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DilrGBsI.js → use-create-virtual-mcp-C88u5wPn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B43AQzLm.js → use-debounced-autosave-C2TtzjZB.js} +1 -1
- package/dist/client/assets/use-delete-connection-D8ryW-Gn.js +1 -0
- package/dist/client/assets/use-file-configs-DGSgkVs8.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-DVN8HYM6.js → use-infinite-scroll-BYw2UY-G.js} +1 -1
- package/dist/client/assets/{use-list-state-VA1tpljN.js → use-list-state-CyVLGIWk.js} +1 -1
- package/dist/client/assets/use-mcp-client-Brxiewn2.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-CY9OUQZa.js → use-mcp-prompts-CKvrvNSD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DXY52I1e.js → use-mcp-tools-DFeiBffX.js} +1 -1
- package/dist/client/assets/{use-members-9msf87Qx.js → use-members-D6H6sd8q.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B_6LJV9r.js → use-navigate-to-agent-BRFls8tQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-5h3UhfD-.js → use-org-auth-client-IT7XMFB9.js} +1 -1
- package/dist/client/assets/{use-org-sso-BTJacuR9.js → use-org-sso-BWWAvGBF.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D4RU1UCZ.js → use-organization-roles-S9xtJ6m2.js} +1 -1
- package/dist/client/assets/use-organization-settings-DjvlRnDe.js +1 -0
- package/dist/client/assets/use-registry-connections-BQfixYFV.js +1 -0
- package/dist/client/assets/use-secrets-DEcBibJG.js +1 -0
- package/dist/client/assets/{use-status-sounds-CFOYqswl.js → use-status-sounds-BJZxFfhN.js} +1 -1
- package/dist/client/assets/{use-view-mode-lzqGiNUo.js → use-view-mode-DXlui5dm.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-DDTG_-f6.js +1 -0
- package/dist/client/assets/useInfiniteQuery-BEouccKd.js +1 -0
- package/dist/client/assets/{useRouterState-mAFXQkAT.js → useRouterState-xsU2zFoM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-wDDb-pw7.js +1 -0
- package/dist/client/assets/user-BZco0YX9.js +1 -0
- package/dist/client/assets/{view-mode-toggle-PpUBwSzB.js → view-mode-toggle-BN8FgH0K.js} +1 -1
- package/dist/client/assets/workflow-BxGrEeHN.js +1 -0
- package/dist/client/assets/workflow-detail-QkGhQ2hI.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +489 -488
- package/dist/server/migrate.js +59 -59
- package/dist/server/server.js +311 -310
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-MSG0lE-F.js +0 -1
- package/dist/client/assets/agents-list-BjNtpZI5.js +0 -1
- package/dist/client/assets/ai-providers-DzY2b1ST.js +0 -1
- package/dist/client/assets/app-editor-BOf1C0bR.js +0 -1
- package/dist/client/assets/automation-runs-BPWO4Oxo.js +0 -1
- package/dist/client/assets/automations-BzMfwiu_.js +0 -1
- package/dist/client/assets/brand-context-fK95FTJj.js +0 -1
- package/dist/client/assets/buckets-C3L_6HTA.js +0 -1
- package/dist/client/assets/collection-detail-CindHN_k.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-Cd86_kfs.js +0 -1
- package/dist/client/assets/connection-card-DEJjtCgn.js +0 -1
- package/dist/client/assets/connection-detail-ChUQp5-t.js +0 -1
- package/dist/client/assets/connections-DN6XHtGB.js +0 -1
- package/dist/client/assets/constants-DDZG6Edw.js +0 -10
- package/dist/client/assets/domain-settings-BfbT9yk-.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-DLdasNw1.js +0 -1
- package/dist/client/assets/extract-connection-data-uGXsWpo7.js +0 -1
- package/dist/client/assets/features-Dr9Pp0WS.js +0 -1
- package/dist/client/assets/file-explorer-VM_XUNbz.js +0 -2
- package/dist/client/assets/general-DwCAWtBz.js +0 -1
- package/dist/client/assets/image-field-BaHZoCuZ.js +0 -1
- package/dist/client/assets/index-CEv88FJY.js +0 -1
- package/dist/client/assets/index-CPhDomOg.js +0 -1
- package/dist/client/assets/index-CW47dQON.js +0 -1
- package/dist/client/assets/members-CNZCKoI1.js +0 -3
- package/dist/client/assets/org-plugin-layout-BZ9dFRVl.js +0 -1
- package/dist/client/assets/page-seo-sheet-EUvWIgmh.js +0 -1
- package/dist/client/assets/plugin-layout-Bi-w5408.js +0 -1
- package/dist/client/assets/project-app-view-I1ua83t6.js +0 -1
- package/dist/client/assets/record-editor-B1-ONBrf.js +0 -1
- package/dist/client/assets/registry-CbWwvuqp.js +0 -2
- package/dist/client/assets/roles-B2-ESfgD.js +0 -1
- package/dist/client/assets/secrets-Dx_3aWOf.js +0 -1
- package/dist/client/assets/seo-editor-II_27c8U.js +0 -1
- package/dist/client/assets/shell-layout-DSHLjHdv.js +0 -1
- package/dist/client/assets/shell-route-loading-BMFmixVz.js +0 -1
- package/dist/client/assets/sso-qnvxODbb.js +0 -1
- package/dist/client/assets/store-DDT_HXod.js +0 -1
- package/dist/client/assets/store-registry-IbxDOVas.js +0 -2
- package/dist/client/assets/use-ai-providers-BUmRVTXM.js +0 -1
- package/dist/client/assets/use-automations-BQsS5jcL.js +0 -1
- package/dist/client/assets/use-connection-BKakpvkk.js +0 -1
- package/dist/client/assets/use-delete-connection-Sa9GqDFj.js +0 -1
- package/dist/client/assets/use-file-configs-BSxIo3R0.js +0 -1
- package/dist/client/assets/use-organization-settings-DeuE04BS.js +0 -1
- package/dist/client/assets/use-registry-connections-BFubWEDK.js +0 -1
- package/dist/client/assets/use-secrets-CEE2TPN5.js +0 -1
- package/dist/client/assets/use-virtual-mcp-wf8itLFJ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-FaewV0Uc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DzO-0tti.js +0 -1
- package/dist/client/assets/user-ujRRaChx.js +0 -1
- package/dist/client/assets/workflow-BQljQVTn.js +0 -1
- package/dist/client/assets/workflow-detail-BK_EcA2N.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-RoHcRkq0.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-DEJjtCgn.js";import{C as Rr}from"./collection-search-C0bvNtM9.js";import{C as Nr}from"./collection-tabs-BN4In63u.js";import{g as Ir}from"./generate-id-CnLzNGg6.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-CvJmXij7.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-Cm2a8ouX.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-CLHWv9z-.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-DAahwl9B.js";import{I as Ye}from"./input-DsRHjNfg.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-DzGY5lz9.js";import{T as Xr}from"./textarea-Cq68Cg3C.js";import{b as zn}from"./use-connection-BKakpvkk.js";import{n as Et}from"./Container-EsK9R8Cs.js";import{s as Jt}from"./Star01-DinMZEQp.js";import{R as Ur}from"./agent-icon-atw8dEpB.js";import{s as Kr}from"./XClose-dfaecXcF.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-B093QOVj.js";import{u as gn}from"./use-infinite-scroll-DVN8HYM6.js";import{u as Jr}from"./useSuspenseInfiniteQuery-DzO-0tti.js";import{S as Qr,u as Zr}from"./constants-DDZG6Edw.js";import{g as eo,e as to,a as no}from"./extract-connection-data-uGXsWpo7.js";import{B as Dt}from"./badge-Cosh8Jv6.js";import{c as Qt}from"./XCircle-gezQrKJB.js";import{i as mn}from"./Check-Rzhysg8v.js";import{s as ro}from"./Plus-BVt3gf6N.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
|
|
1
|
+
import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-BfzqpoYd.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-Dug8PvM2.js";import{C as Rr}from"./collection-search-Bryj5VYk.js";import{C as Nr}from"./collection-tabs-Y3w8w2D4.js";import{g as Ir}from"./generate-id-DvX29Me7.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-nXKceTRB.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-lSnonzW3.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-CC_mfaKY.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-BM4RuTjX.js";import{I as Ye}from"./input-BGQcwAaL.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-DpYu937I.js";import{T as Xr}from"./textarea-Bo_ElpPh.js";import{b as zn}from"./use-connection-MP_sOdrQ.js";import{n as Et}from"./Container-DIwdobum.js";import{s as Jt}from"./Star01-q6EhXttt.js";import{R as Ur}from"./agent-icon-Lc1AgwlE.js";import{s as Kr}from"./XClose-DhQ5V0ST.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-Ce4ZXQGG.js";import{u as gn}from"./use-infinite-scroll-BYw2UY-G.js";import{u as Jr}from"./useSuspenseInfiniteQuery-wDDb-pw7.js";import{S as Qr,u as Zr}from"./use-mcp-client-Brxiewn2.js";import{g as eo,e as to,a as no}from"./extract-connection-data-DxtHEsy3.js";import{B as Dt}from"./badge-DF6gVmsi.js";import{c as Qt}from"./XCircle-CEKwTNMD.js";import{i as mn}from"./Check-CSixRgqh.js";import{s as ro}from"./Plus-gXoAw_mX.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,c as d,bt as u,j as l}from"./index-
|
|
1
|
+
import{e as C,c as d,bt as u,j as l}from"./index-BfzqpoYd.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as D,r as v,j as e,B as p,t as S,o as c,e as N}from"./index-BfzqpoYd.js";import{D as k}from"./domain-settings-OHWjjHlQ.js";import{P as f}from"./index-CVPVNlMM.js";import{I as l}from"./input-BGQcwAaL.js";import{S as z}from"./switch-BZi96ipJ.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-BWWAvGBF.js";import{c as q,S as y,a as C,b as r,d as O}from"./settings-section-pgSq0Nbi.js";import{s as F}from"./Trash01-B91-1KNk.js";import{R as L}from"./require-capability-Bi88Fg3q.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-mcp-client-Brxiewn2.js";import"./sidebar-B3S1MC-b.js";import"./LayoutLeft-6fPyjOVd.js";import"./tooltip-CC_mfaKY.js";import"./sheet-y2Nja_Ue.js";import"./X-DCWlm9Ta.js";import"./card-CeH_PUFE.js";import"./ArrowUpRight-Bq-dJGgn.js";import"./use-capability-aJI8msnV.js";import"./access-gate-DXlQ8iVy.js";import"./capability-load-error-Dn3qy9VI.js";function B(){const{org:t}=D(),{data:a,isLoading:E}=P(t.id,t.slug),x=R(t.id,t.slug),h=A(t.id,t.slug),j=T(t.id,t.slug),[s,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(q,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(F,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${t.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ce(){const t=N.c(1);let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(L,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),t[0]=a):a=t[0],a}export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as D,j as s,E as le,r as K,q as ae,G as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,o as ie}from"./index-BfzqpoYd.js";import{i as ue}from"./AlertCircle-B-p2hhbf.js";import{i as pe}from"./ChevronRight-CtziSifX.js";import{s as xe}from"./Plus-gXoAw_mX.js";import{s as he}from"./Trash01-B91-1KNk.js";import{I as X}from"./input-BGQcwAaL.js";import{S as oe}from"./switch-BZi96ipJ.js";import{S as ye}from"./skeleton-thGJKlMg.js";import{A as ne}from"./avatar-3vQWE5Hu.js";import{P as je,a as Ce,b as Se}from"./popover-B1xAxEac.js";import{b as re}from"./use-connection-MP_sOdrQ.js";import{W as Z}from"./use-mcp-client-Brxiewn2.js";import{P as G}from"./index-CVPVNlMM.js";import{u as ve}from"./use-registry-connections-BQfixYFV.js";import{g as _e,h as be}from"./use-organization-settings-DjvlRnDe.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-pgSq0Nbi.js";import{R as Re}from"./require-capability-Bi88Fg3q.js";import"./User01-JR_76gHl.js";import"./use-collections-vRlJo8MD.js";import"./sidebar-B3S1MC-b.js";import"./LayoutLeft-6fPyjOVd.js";import"./tooltip-CC_mfaKY.js";import"./sheet-y2Nja_Ue.js";import"./X-DCWlm9Ta.js";import"./card-CeH_PUFE.js";import"./ArrowUpRight-Bq-dJGgn.js";import"./use-capability-aJI8msnV.js";import"./access-gate-DXlQ8iVy.js";import"./capability-load-error-Dn3qy9VI.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function mt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{mt as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DH7-iD95.js","assets/index-BfzqpoYd.js","assets/index-BgFgIfs8.css","assets/XCircle-CEKwTNMD.js","assets/CheckCircle-CqLcOI7o.js","assets/Container-DIwdobum.js","assets/Settings02-C7YqxsZL.js","assets/use-mcp-client-Brxiewn2.js","assets/useInfiniteQuery-BEouccKd.js","assets/infiniteQueryObserver-CvEVG_TM.js","assets/badge-DF6gVmsi.js","assets/input-BGQcwAaL.js","assets/dropdown-menu-DpfpR4kx.js","assets/Check-CSixRgqh.js","assets/ChevronRight-CtziSifX.js","assets/DotsVertical-DQ3UGDDE.js","assets/table-C3TjNbDC.js","assets/toggle-group-jYWXBndg.js","assets/use-view-mode-DXlui5dm.js","assets/tooltip-CC_mfaKY.js","assets/FilterLines-CIJgiiLT.js","assets/Globe01-BayTDYGC.js","assets/SearchMd-z6b-QOmX.js","assets/dialog-nXKceTRB.js","assets/X-DCWlm9Ta.js","assets/AlertCircle-B-p2hhbf.js","assets/Upload01-CcwGyBRP.js","assets/alert-dialog-DJLxSS_E.js","assets/card-CeH_PUFE.js","assets/Trash01-B91-1KNk.js","assets/label-zIig0cjv.js","assets/select-DpYu937I.js","assets/ChevronDown-BptXi8Ef.js","assets/ChevronUp-DChs66VU.js","assets/switch-BZi96ipJ.js","assets/textarea-Bo_ElpPh.js","assets/RefreshCcw01-DlKjMM-5.js","assets/checkbox-DFFY_m2B.js","assets/Eye-DepFjUJE.js","assets/LinkExternal01-B2YZgRTN.js","assets/use-copy-BkzArvj8.js","assets/Key01-CR8zfCdU.js","assets/Plus-gXoAw_mX.js","assets/Play-CBt0NeLA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as m,f as n,g as c,j as t,l as f,r as l,_ as p}from"./index-BfzqpoYd.js";import{R as u}from"./require-capability-Bi88Fg3q.js";import"./use-capability-aJI8msnV.js";import"./access-gate-DXlQ8iVy.js";import"./capability-load-error-Dn3qy9VI.js";const g=l.lazy(()=>p(()=>import("./registry-layout-DH7-iD95.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-
|
|
1
|
+
import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-BfzqpoYd.js";var m="Switch",[U]=H(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:a,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:a,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...a}=r,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:a=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:a});h.call(l,t),l.dispatchEvent(v)}},[u,t,a]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==a||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...a,children:n}),e[6]=a,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{L as bt,co as Et,cp as _t,bT as O,W as c,cq as oe,cr as Ve,cs as It,ct as St,U as Tt,aK as A,aJ as U,aH as te,T as b,bp as f,ba as L,cu as wt,cv as E,aI as At,o as he,r as $,e as Ee,q as Mt,j as Ot}from"./index-
|
|
1
|
+
import{L as bt,co as Et,cp as _t,bT as O,W as c,cq as oe,cr as Ve,cs as It,ct as St,U as Tt,aK as A,aJ as U,aH as te,T as b,bp as f,ba as L,cu as wt,cv as E,aI as At,o as he,r as $,e as Ee,q as Mt,j as Ot}from"./index-BfzqpoYd.js";import{S as Ct,u as Nt}from"./use-mcp-client-Brxiewn2.js";import{d as Rt,D as xt}from"./decopilot-sse-pool-vfZK3kan.js";import{e as Pt}from"./create-sse-subscription-BS5983N4.js";var K;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function a(n){throw new Error}t.assertNever=a,t.arrayToEnum=n=>{const o={};for(const i of n)o[i]=i;return o},t.getValidEnumValues=n=>{const o=t.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),i={};for(const s of o)i[s]=n[s];return t.objectValues(i)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(i);return o},t.find=(n,o)=>{for(const i of n)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,o=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(K||(K={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));K.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);K.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ie extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let s=r,d=0;for(;d<i.path.length;){const l=i.path[d];d===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(a(i))):s[l]=s[l]||{_errors:[]},s=s[l],d++}}};return n(this),r}static assert(e){if(!(e instanceof ie))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,K.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];a[o]=a[o]||[],a[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ie.create=t=>new ie(t);var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));var m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));const Dt=1e4,Vr="true";function ue(t,e){return bt.chatAutosend(t,e)}function kt(t){return t==="pending"||t==="sending"}function Lt(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!kt(e.status)?null:e}function zr(t,e,a,r,n=Date.now()){const o={message:r,createdAt:n,status:"pending"};return t.setItem(ue(e,a),JSON.stringify(o)),o}function jt(t,e,a){const r=ue(e,a),n=Lt(t.getItem(r));return n||(t.removeItem(r),null)}function Jr(t,e,a,r=Date.now()){const n=ue(e,a),o=jt(t,e,a);return!o||o.status!=="pending"?null:r-o.createdAt>=Dt?(t.removeItem(n),null):(t.setItem(n,JSON.stringify({...o,status:"sending"})),{message:o.message,createdAt:o.createdAt})}function Wr(t,e,a){t.removeItem(ue(e,a))}var ze="vercel.ai.error",Zt=Symbol.for(ze),Oe,Ce,P=class Je extends(Ce=Error,Oe=Zt,Ce){constructor({name:e,message:a,cause:r}){super(a),this[Oe]=!0,this.name=e,this.cause=r}static isInstance(e){return Je.hasMarker(e,ze)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function We(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,$t=Symbol.for(He),Ne,Re,Ut=class extends(Re=P,Ne=$t,Re){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return P.hasMarker(t,He)}},qe="AI_JSONParseError",Ge=`vercel.ai.error.${qe}`,Bt=Symbol.for(Ge),xe,Pe,De=class extends(Pe=P,xe=Bt,Pe){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${We(e)}`,cause:e}),this[xe]=!0,this.text=t}static isInstance(t){return P.hasMarker(t,Ge)}},Xe="AI_TypeValidationError",Qe=`vercel.ai.error.${Xe}`,Ft=Symbol.for(Qe),ke,Le,Y=class ve extends(Le=P,ke=Ft,Le){constructor({value:e,cause:a,context:r}){let n="Type validation failed";if(r?.field&&(n+=` for ${r.field}`),r?.entityName||r?.entityId){n+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),n+=o.join(", "),n+=")"}super({name:Xe,message:`${n}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${We(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return P.hasMarker(e,Qe)}static wrap({value:e,cause:a,context:r}){var n,o,i;return ve.isInstance(a)&&a.value===e&&((n=a.context)==null?void 0:n.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ae=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const o=a.length,i=new Array(e);for(let s=0;s<e;s++)i[s]=a[Math.random()*o|0];return i.join("")};if(t==null)return n;if(a.includes(r))throw new Ut({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${n()}`};ae();var Vt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,zt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function je(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Vt.test(t)===!1&&zt.test(t)===!1?e:Jt(e)}function Jt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const n in r){const o=r[n];o&&typeof o=="object"&&e.push(o)}}}return t}function Wt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return je(t)}try{return je(t)}finally{Error.stackTraceLimit=e}}function _e(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=Z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(Z):Z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(Z)),t.allOf!=null&&(t.allOf=t.allOf.map(Z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(Z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=Z(e[a]);return t}function Z(t){return typeof t=="boolean"?t:_e(t)}var Yt=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Ht=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function C(){return{}}function qt(t,e){var a,r,n;const o={type:"array"};return(a=t.type)!=null&&a._def&&((n=(r=t.type)==null?void 0:r._def)==null?void 0:n.typeName)!==m.ZodAny&&(o.items=g(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Gt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Xt(){return{type:"boolean"}}function Ke(t,e){return g(t.type._def,e)}var Qt=(t,e)=>g(t.innerType._def,e);function et(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,o)=>et(t,e,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Kt(t)}}var Kt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function ea(t,e){return{...g(t.innerType._def,e),default:t.defaultValue()}}function ta(t,e){return e.effectStrategy==="input"?g(t.schema._def,e):C()}function aa(t){return{type:"string",enum:Array.from(t.values)}}var ra=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function na(t,e){const a=[g(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),g(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(n=>!!n),r=[];return a.forEach(n=>{if(ra(n))r.push(...n.allOf);else{let o=n;if("additionalProperties"in n&&n.additionalProperties===!1){const{additionalProperties:i,...s}=n;o=s}r.push(o)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var pe=void 0,N={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(pe===void 0&&(pe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),pe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":R(a,"email",r.message,e);break;case"format:idn-email":R(a,"idn-email",r.message,e);break;case"pattern:zod":w(a,N.email,r.message,e);break}break;case"url":R(a,"uri",r.message,e);break;case"uuid":R(a,"uuid",r.message,e);break;case"regex":w(a,r.regex,r.message,e);break;case"cuid":w(a,N.cuid,r.message,e);break;case"cuid2":w(a,N.cuid2,r.message,e);break;case"startsWith":w(a,RegExp(`^${fe(r.value,e)}`),r.message,e);break;case"endsWith":w(a,RegExp(`${fe(r.value,e)}$`),r.message,e);break;case"datetime":R(a,"date-time",r.message,e);break;case"date":R(a,"date",r.message,e);break;case"time":R(a,"time",r.message,e);break;case"duration":R(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{w(a,RegExp(fe(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&R(a,"ipv4",r.message,e),r.version!=="v4"&&R(a,"ipv6",r.message,e);break}case"base64url":w(a,N.base64url,r.message,e);break;case"jwt":w(a,N.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&w(a,N.ipv4Cidr,r.message,e),r.version!=="v4"&&w(a,N.ipv6Cidr,r.message,e);break}case"emoji":w(a,N.emoji(),r.message,e);break;case"ulid":{w(a,N.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{R(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{w(a,N.base64,r.message,e);break}}break}case"nanoid":w(a,N.nanoid,r.message,e)}return a}function fe(t,e){return e.patternStrategy==="escape"?ia(t):t}var oa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ia(t){let e="";for(let a=0;a<t.length;a++)oa.has(t[a])||(e+="\\"),e+=t[a];return e}function R(t,e,a,r){var n;t.format||(n=t.anyOf)!=null&&n.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function w(t,e,a,r){var n;t.pattern||(n=t.allOf)!=null&&n.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:$e(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=$e(e,r)}function $e(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source;let o="",i=!1,s=!1,d=!1;for(let l=0;l<n.length;l++){if(i){o+=n[l],i=!1;continue}if(r.i){if(s){if(n[l].match(/[a-z]/)){d?(o+=n[l],o+=`${n[l-2]}-${n[l]}`.toUpperCase(),d=!1):n[l+1]==="-"&&((a=n[l+2])!=null&&a.match(/[a-z]/))?(o+=n[l],d=!0):o+=`${n[l]}${n[l].toUpperCase()}`;continue}}else if(n[l].match(/[a-z]/)){o+=`[${n[l]}${n[l].toUpperCase()}]`;continue}}if(r.m){if(n[l]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(n[l]==="$"){o+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,c as i,j as r}from"./index-
|
|
1
|
+
import{e as c,c as i,j as r}from"./index-BfzqpoYd.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as d,be as k,a7 as p,a8 as h,bf as y,ag as M,bg as P,bh as S,bi as F,bj as V,bk as D,e as g,c as x}from"./index-
|
|
1
|
+
import{r as f,j as d,be as k,a7 as p,a8 as h,bf as y,ag as M,bg as P,bh as S,bi as F,bj as V,bk as D,e as g,c as x}from"./index-BfzqpoYd.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,T]=G(m),C=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...v}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...v,ref:e})})});C.displayName=m;var N="TabsList",j=f.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=T(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=T(I,a),i=w(a),l=E(o.baseId,t),v=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":v,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:h(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:h(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:h(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=T(R,a),l=E(i.baseId,t),v=$(i.baseId,t),u=t===i.value,c=f.useRef(u);return f.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:v,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=g.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=x("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=g.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=x(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=g.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=x(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=g.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=x("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,U as b,O as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-
|
|
1
|
+
import{i as o}from"./AlertCircle-B-p2hhbf.js";import{i as t}from"./CheckCircle-CqLcOI7o.js";import{a as r}from"./DotsVertical-DQ3UGDDE.js";import{aa as a}from"./agent-icon-Lc1AgwlE.js";import{l}from"./index-BfzqpoYd.js";import{i as n}from"./XCircle-CEKwTNMD.js";const i={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:n,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:l,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return i[e??"completed"]??m}export{i as S,x as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,c as l,j as n}from"./index-
|
|
1
|
+
import{e as o,c as l,j as n}from"./index-BfzqpoYd.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,bh as b,j as c,a7 as m,a8 as k,b5 as p,be as M,bf as T,bg as S,bj as A,ag as F,bt as $,e as P,c as C}from"./index-
|
|
1
|
+
import{r as x,bh as b,j as c,a7 as m,a8 as k,b5 as p,be as M,bf as T,bg as S,bj as A,ag as F,bt as $,e as P,c as C}from"./index-BfzqpoYd.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=H(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function K(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(q({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,c as E,j as l,r as d,g as S,aU as T,P as $,X as y,Z as N}from"./index-
|
|
1
|
+
import{e as c,c as E,j as l,r as d,g as S,aU as T,P as $,X as y,Z as N}from"./index-BfzqpoYd.js";import{n as w}from"./ChevronLeft-Bq6F--2K.js";import{i as C}from"./ChevronRight-CtziSifX.js";function j(t){const e=c.c(14);let o,s,n,r,a;e[0]!==t?({active:o,className:s,ref:r,type:a,...n}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=n,e[4]=r,e[5]=a):(o=e[1],s=e[2],n=e[3],r=e[4],a=e[5]);const f=a===void 0?"button":a,h=o?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let u;e[6]!==s||e[7]!==h?(u=E("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",h,s),e[6]=s,e[7]=h,e[8]=u):u=e[8];let g;return e[9]!==n||e[10]!==r||e[11]!==u||e[12]!==f?(g=l.jsx("button",{ref:r,type:f,className:u,...n}),e[9]=n,e[10]=r,e[11]=u,e[12]=f,e[13]=g):g=e[13],g}const p=d.createContext(null);function m(){const t=d.use(p);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function k(t){const e=c.c(8),{children:o}=t,[s,n]=d.useState(null),[r,a]=d.useState(null),[f,h]=d.useState(null),[u,g]=d.useState(null);let b;e[0]!==f||e[1]!==u||e[2]!==r||e[3]!==s?(b={togglesEl:s,setTogglesEl:n,tabsEl:r,setTabsEl:a,centerEl:f,setCenterEl:h,rightEl:u,setRightEl:g},e[0]=f,e[1]=u,e[2]=r,e[3]=s,e[4]=b):b=e[4];let x;return e[5]!==o||e[6]!==b?(x=l.jsx(p,{value:b,children:o}),e[5]=o,e[6]=b,e[7]=x):x=e[7],x}function i(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx(k,{children:l.jsx("div",{className:"flex flex-col h-full min-h-0",children:o})}),e[0]=o,e[1]=s):s=e[1],s}function L(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",children:o}),e[0]=o,e[1]=s):s=e[1],s}function _(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:o}),e[0]=o,e[1]=s):s=e[1],s}function R(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:o}),e[0]=o,e[1]=s):s=e[1],s}function P(){const t=c.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(j,{onClick:G,"aria-label":"Go back",title:"Go back",children:l.jsx(w,{size:16})}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsxs(l.Fragment,{children:[e,l.jsx(j,{onClick:z,"aria-label":"Go forward",title:"Go forward",children:l.jsx(C,{size:16})})]}),t[1]=o):o=t[1],o}function z(){return window.history.forward()}function G(){return window.history.back()}function B(){const t=c.c(7),o=y().logo??N,s=typeof o=="string"?o:o.light,n=typeof o=="string"?o:o.dark;let r;t[0]!==s?(r=l.jsx("img",{src:s,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=s,t[1]=r):r=t[1];let a;t[2]!==n?(a=l.jsx("img",{src:n,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=n,t[3]=a):a=t[3];let f;return t[4]!==r||t[5]!==a?(f=l.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[r,a]}),t[4]=r,t[5]=a,t[6]=f):f=t[6],f}function v(){const t=c.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(d.Suspense,{fallback:l.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:l.jsx(B,{})}),t[0]=e):e=t[0],e}function I(){const t=c.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:o}=S(e);let s;t[1]!==o?(s={org:o},t[1]=o,t[2]=s):s=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(v,{}),t[3]=n):n=t[3];let r;return t[4]!==s?(r=l.jsx($,{to:"/$org",params:s,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:n}),t[4]=s,t[5]=r):r=t[5],r}function D(){const t=c.c(2),{setCenterEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=o):o=t[1],o}function F(t){const e=c.c(3),{children:o}=t,{centerEl:s}=m();if(!s)return null;let n;return e[0]!==s||e[1]!==o?(n=T.createPortal(o,s),e[0]=s,e[1]=o,e[2]=n):n=e[2],n}function H(){const t=c.c(2),{setTabsEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"shrink-0 flex items-center"}),t[0]=e,t[1]=o):o=t[1],o}function O(t){const e=c.c(3),{children:o}=t,{tabsEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}function U(){const t=c.c(2),{setTogglesEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"contents"}),t[0]=e,t[1]=o):o=t[1],o}function A(t){const e=c.c(3),{children:o}=t,{togglesEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}function X(){const t=c.c(2),{setRightEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=o):o=t[1],o}function Z(t){const e=c.c(3),{children:o}=t,{rightEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}i.Provider=k;i.Header=L;i.LeftColumn=_;i.RightColumn=R;i.Nav=P;i.Logo=v;i.LogoLink=I;i.CenterSlot=D;i.Center=F;i.TabsSlot=H;i.Tabs=O;i.TogglesSlot=U;i.Toggles=A;i.RightSlot=X;i.Right=Z;export{j as T,i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as h,q as I,K as T,s as C,M as b,v as k,C as N,j as o}from"./index-
|
|
1
|
+
import{e as h,q as I,K as T,s as C,M as b,v as k,C as N,j as o}from"./index-BfzqpoYd.js";import{B as x}from"./badge-DF6gVmsi.js";import{b as y,T as j,a as g,c as S}from"./tooltip-CC_mfaKY.js";import{g as _}from"./types-btWFnXlQ.js";import{s as $}from"./Eye-DepFjUJE.js";import{s as A}from"./Star01-q6EhXttt.js";import{a7 as w}from"./agent-icon-Lc1AgwlE.js";function M(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=C,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>b({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const H=[{key:"readOnlyHint",label:"Read-only",Icon:$,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:k,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:N,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function z(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=_(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?H.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=S,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(P)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function P(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{z as T,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,a7 as H,bi as Z,bh as ee,dj as te,bx as $,dk as oe,a8 as b,bk as G,dl as re,dm as V,dn as ne,dp as se,ag as ae,dq as ie,dr as le,e as _,c as ce}from"./index-
|
|
1
|
+
import{r as a,j as c,a7 as H,bi as Z,bh as ee,dj as te,bx as $,dk as oe,a8 as b,bk as G,dl as re,dm as V,dn as ne,dp as se,ag as ae,dq as ie,dr as le,e as _,c as ce}from"./index-BfzqpoYd.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",z=a.forwardRef((o,e)=>c.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));z.displayName=de;var pe=z,[O]=ae("Tooltip",[V]),D=V(),B="TooltipProvider",fe=700,A="tooltip.open",[ve,M]=O(B),F=o=>{const{__scopeTooltip:e,delayDuration:t=fe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(ve,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=B;var R="Tooltip",[he,j]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=M(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),h=Z(),f=a.useRef(0),x=i??l.disableHoverableContent,m=d??l.delayDuration,g=a.useRef(!1),[y,T]=ee({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(A))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(te,{...p,children:c.jsx(he,{scope:e,contentId:h,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};Y.displayName=R;var k="TooltipTrigger",q=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(k,t),s=M(k,t),i=D(t),d=a.useRef(null),l=$(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(oe,{asChild:!0,...i,children:c.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:b(o.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:b(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:b(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:b(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:b(o.onBlur,n.onClose),onClick:b(o.onClick,n.onClose)})})});q.displayName=k;var I="TooltipPortal",[xe,ge]=O(I,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(xe,{scope:e,forceMount:t,children:c.jsx(G,{present:t||s.open,children:c.jsx(re,{asChild:!0,container:n,children:r})})})};U.displayName=I;var C="TooltipContent",W=a.forwardRef((o,e)=>{const t=ge(C,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(C,o.__scopeTooltip);return c.jsx(G,{present:r||i.open,children:i.disableHoverableContent?c.jsx(K,{side:n,...s,ref:e}):c.jsx(me,{side:n,...s,ref:e})})}),me=a.forwardRef((o,e)=>{const t=j(C,o.__scopeTooltip),r=M(C,o.__scopeTooltip),n=a.useRef(null),s=$(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=Ce(y,g.getBoundingClientRect()),w=we(y,T),E=Ee(m.getBoundingClientRect()),P=Re([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(l&&u){const x=g=>f(g,u),m=g=>f(g,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),a.useEffect(()=>{if(i){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=l?.contains(g)||u?.contains(g),w=!Pe(y,i);T?h():w&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,h]),c.jsx(K,{...o,ref:s})}),[Te,ye]=O(R,{isInside:!1}),be=ie("TooltipContent"),K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(C,t),p=D(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),a.useEffect(()=>{if(l.trigger){const v=h=>{h.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,u]),c.jsx(ne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(se,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(be,{children:r}),c.jsx(Te,{scope:t,isInside:!0,children:c.jsx(pe,{id:l.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=C;var X="TooltipArrow",J=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return ye(X,t).isInside?null:c.jsx(le,{...n,...r,ref:e})});J.displayName=X;function Ce(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function we(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ee(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Pe(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,v=l.x,h=l.y;u>r!=h>r&&t<(v-p)*(r-u)/(h-u)+p&&(n=!n)}return n}function Re(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(e)}function _e(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var je=F,Oe=Y,De=q,Le=U,Ae=W,ke=J;const Q=768,L=()=>globalThis.innerWidth<Q;function Ne(){const o=_.c(2),[e,t]=a.useState(L);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(L),i=globalThis.matchMedia(`(max-width: ${Q-1}px)`);return i.addEventListener("change",s),t(L),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}function Me(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(je,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Me,{children:c.jsx(Oe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(De,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function $e(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(ke,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(Le,{children:c.jsxs(Ae,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}export{He as T,ue as V,$e as a,Se as b,Me as c,Ne as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bT as p,bp as t,aJ as y,W as a,bU as q,T as s,aK as f,aH as u,U as m,ba as x,bV as O,bW as fe,bX as ge,bY as $,bZ as j,b_ as be,b$ as ye,c0 as B,c1 as Se,c2 as _e,c3 as He,c4 as Me,c5 as ke,c6 as Pe,c7 as qe,c8 as Te,c9 as Ie,ca as Ee,cb as Le,cc as ze,cd as Ue,ce as Ae,cf as De,cg as Ne,ch as Oe,r as te,e as V,j as b,ci as je,cj as $e,t as Be,c as oe}from"./index-
|
|
1
|
+
import{bT as p,bp as t,aJ as y,W as a,bU as q,T as s,aK as f,aH as u,U as m,ba as x,bV as O,bW as fe,bX as ge,bY as $,bZ as j,b_ as be,b$ as ye,c0 as B,c1 as Se,c2 as _e,c3 as He,c4 as Me,c5 as ke,c6 as Pe,c7 as qe,c8 as Te,c9 as Ie,ca as Ee,cb as Le,cc as ze,cd as Ue,ce as Ae,cf as De,cg as Ne,ch as Oe,r as te,e as V,j as b,ci as je,cj as $e,t as Be,c as oe}from"./index-BfzqpoYd.js";import{P as Ve}from"./use-mcp-client-Brxiewn2.js";const le=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function We(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ke(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const g=(l.index??0)+l[0].length;return r.slice(0,g)+`
|
|
2
2
|
`+i+r.slice(g)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const g=(d.index??0)+d[0].length;return r.slice(0,g)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as g,q as f,s as _,K as m,n as I}from"./index-BfzqpoYd.js";import{S,u as P}from"./use-mcp-client-Brxiewn2.js";function A(t,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>(await t.callTool({name:"AI_PROVIDER_KEY_LIST",arguments:{}})).structuredContent??null}}function q(){const t=g.c(10),{org:e}=f();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:S,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const o=P(s);let i;t[3]!==e.id?(i=m.aiProviders(e.id),t[3]=e.id,t[4]=i):i=t[4];let l;t[5]!==o?(l=async()=>(await o.callTool({name:"AI_PROVIDERS_LIST",arguments:{}})).structuredContent,t[5]=o,t[6]=l):l=t[6];let n;t[7]!==i||t[8]!==l?(n={queryKey:i,staleTime:1/0,queryFn:l},t[7]=i,t[8]=l,t[9]=n):n=t[9];const{data:r}=_(n);return r}function v(){const t=g.c(8),{org:e}=f();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:S,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const o=P(s);let i;t[3]!==o||t[4]!==e.id?(i=A(o,e.id),t[3]=o,t[4]=e.id,t[5]=i):i=t[5];const{data:l}=_(i);let n;return t[6]!==l?.keys?(n=l?.keys??[],t[6]=l?.keys,t[7]=n):n=t[7],n}function R(t){const e=g.c(18),{org:s}=f();let o;e[0]!==s.id||e[1]!==s.slug?(o={connectionId:S,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=o):o=e[2];const i=P(o);let l;e[3]!==t||e[4]!==s.id?(l=m.aiProviderModels(s.id,t??""),e[3]=t,e[4]=s.id,e[5]=l):l=e[5];const n=!!t;let r;e[6]!==i||e[7]!==t?(r=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[6]=i,e[7]=t,e[8]=r):r=e[8];let u;e[9]!==l||e[10]!==n||e[11]!==r?(u={queryKey:l,enabled:n,staleTime:6e4,queryFn:r},e[9]=l,e[10]=n,e[11]=r,e[12]=u):u=e[12];const{data:c,isLoading:T}=I(u);let a;e[13]!==c?.models?(a=c?.models??[],e[13]=c?.models,e[14]=a):a=e[14];const y=!!t&&T;let d;return e[15]!==a||e[16]!==y?(d={models:a,isLoading:y},e[15]=a,e[16]=y,e[17]=d):d=e[17],d}function p(t){const e=g.c(14),{org:s}=f();let o;e[0]!==s.id||e[1]!==s.slug?(o={connectionId:S,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=o):o=e[2];const i=P(o);let l;e[3]!==t||e[4]!==s.id?(l=m.aiProviderModels(s.id,t),e[3]=t,e[4]=s.id,e[5]=l):l=e[5];let n;e[6]!==i||e[7]!==t?(n=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[6]=i,e[7]=t,e[8]=n):n=e[8];let r;e[9]!==l||e[10]!==n?(r={queryKey:l,staleTime:6e4,queryFn:n},e[9]=l,e[10]=n,e[11]=r):r=e[11];const{data:u}=_(r);let c;return e[12]!==u?.models?(c=u?.models??[],e[12]=u?.models,e[13]=c):c=e[13],c}export{A as a,R as b,q as c,p as d,v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as q,q as U,K as T,n as x,G as V,a as f,o as g}from"./index-BfzqpoYd.js";import{S as D,u as G}from"./use-mcp-client-Brxiewn2.js";function Y(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=q.c(12),{org:s}=U(),o=t??D;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==o?(a={connectionId:o,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=o,e[3]=a):a=e[3];const u=G(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let r;e[6]!==u?(r=async()=>{const d=await u.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(Y)},e[6]=u,e[7]=r):r=e[7];const l=!!t;let c;return e[8]!==n||e[9]!==r||e[10]!==l?(c={queryKey:n,queryFn:r,enabled:l,staleTime:3e4},e[8]=n,e[9]=r,e[10]=l,e[11]=c):c=e[11],x(c)}function nt(t){const e=q.c(12),{org:s}=U();let o;e[0]!==s.id||e[1]!==s.slug?(o={connectionId:D,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=o):o=e[2];const a=G(o);let u;e[3]!==s.id||e[4]!==t?(u=T.automations(s.id,t),e[3]=s.id,e[4]=t,e[5]=u):u=e[5];let n;e[6]!==a||e[7]!==t?(n=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},c=await a.callTool({name:"AUTOMATION_LIST",arguments:l});return(c.structuredContent??c).automations},e[6]=a,e[7]=t,e[8]=n):n=e[8];let r;return e[9]!==u||e[10]!==n?(r={queryKey:u,queryFn:n,staleTime:1e4},e[9]=u,e[10]=n,e[11]=r):r=e[11],x(r)}function ot(t){const e=q.c(13),{org:s}=U();let o;e[0]!==s.id||e[1]!==s.slug?(o={connectionId:D,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=o):o=e[2];const a=G(o);let u;e[3]!==t||e[4]!==s.id?(u=T.automation(s.id,t),e[3]=t,e[4]=s.id,e[5]=u):u=e[5];let n;e[6]!==a||e[7]!==t?(n=async()=>{const c=await a.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(c.structuredContent??c).automation},e[6]=a,e[7]=t,e[8]=n):n=e[8];const r=!!t;let l;return e[9]!==u||e[10]!==n||e[11]!==r?(l={queryKey:u,queryFn:n,enabled:r,staleTime:1e4},e[9]=u,e[10]=n,e[11]=r,e[12]=l):l=e[12],x(l)}function it(t,e){const s=q.c(15),{org:o}=U();let a;s[0]!==o.id||s[1]!==o.slug?(a={connectionId:D,orgId:o.id,orgSlug:o.slug},s[0]=o.id,s[1]=o.slug,s[2]=a):a=s[2];const u=G(a);let n;s[3]!==t||s[4]!==o.id||s[5]!==e?(n=T.automationRunStats(o.id,t,JSON.stringify(e??{})),s[3]=t,s[4]=o.id,s[5]=e,s[6]=n):n=s[6];let r;s[7]!==t||s[8]!==u||s[9]!==e?(r=async()=>{const d=await u.callTool({name:"AUTOMATION_RUN_STATS",arguments:{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}});return d.structuredContent??d},s[7]=t,s[8]=u,s[9]=e,s[10]=r):r=s[10];const l=!!t;let c;return s[11]!==n||s[12]!==r||s[13]!==l?(c={queryKey:n,queryFn:r,enabled:l,staleTime:3e4},s[11]=n,s[12]=r,s[13]=l,s[14]=c):c=s[14],x(c)}function at(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function rt(){const t=q.c(67),{org:e}=U();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:D,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const o=G(s),a=V();let u;t[3]!==e.id||t[4]!==a?(u=()=>a.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[3]=e.id,t[4]=a,t[5]=u):u=t[5];const n=u;let r;t[6]!==e.id||t[7]!==a?(r=m=>a.invalidateQueries({queryKey:T.automation(e.id,m)}),t[6]=e.id,t[7]=a,t[8]=r):r=t[8];const l=r;let c;t[9]!==o?(c=async m=>{const i=await o.callTool({name:"AUTOMATION_CREATE",arguments:m});return i.structuredContent??i},t[9]=o,t[10]=c):c=t[10];let d;t[11]!==n?(d=()=>{n(),g.success("Automation created successfully")},t[11]=n,t[12]=d):d=t[12];let N;t[13]!==c||t[14]!==d?(N={mutationFn:c,onSuccess:d,onError:Z},t[13]=c,t[14]=d,t[15]=N):N=t[15];const k=f(N);let y;t[16]!==o?(y=async m=>{const i=await o.callTool({name:"AUTOMATION_UPDATE",arguments:m});return i.structuredContent??i},t[16]=o,t[17]=y):y=t[17];let _;t[18]!==n||t[19]!==l?(_=(m,i)=>{n(),typeof i.id=="string"&&l(i.id),g.success("Automation updated successfully")},t[18]=n,t[19]=l,t[20]=_):_=t[20];let $;t[21]!==y||t[22]!==_?($={mutationFn:y,onSuccess:_,onError:X},t[21]=y,t[22]=_,t[23]=$):$=t[23];const Q=f($);let A;t[24]!==o?(A=async m=>{const i=await o.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return i.structuredContent??i},t[24]=o,t[25]=A):A=t[25];let p;t[26]!==n||t[27]!==e.id||t[28]!==a?(p=(m,i)=>{a.removeQueries({queryKey:T.automation(e.id,i)}),n(),g.success("Automation deleted successfully")},t[26]=n,t[27]=e.id,t[28]=a,t[29]=p):p=t[29];let K;t[30]!==p||t[31]!==A?(K={mutationFn:A,onSuccess:p,onError:W},t[30]=p,t[31]=A,t[32]=K):K=t[32];const j=f(K);let E;t[33]!==o?(E=async m=>{const i=await o.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(i.isError){const I=i.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return i.structuredContent??i},t[33]=o,t[34]=E):E=t[34];let S;t[35]!==n||t[36]!==l?(S=m=>{n(),l(m.automation_id)},t[35]=n,t[36]=l,t[37]=S):S=t[37];let w;t[38]!==E||t[39]!==S?(w={mutationFn:E,onSuccess:S},t[38]=E,t[39]=S,t[40]=w):w=t[40];const P=f(w);let O;t[41]!==o?(O=async m=>{const i=await o.callTool({name:"AUTOMATION_TRIGGER_ROTATE_TOKEN",arguments:{trigger_id:m.trigger_id}});if(i.isError){const I=i.content?.[0]?.text??"Failed to rotate token";throw new Error(I)}return i.structuredContent??i},t[41]=o,t[42]=O):O=t[42];let R;t[43]!==n||t[44]!==l?(R=(m,i)=>{n(),l(i.automation_id)},t[43]=n,t[44]=l,t[45]=R):R=t[45];let b;t[46]!==O||t[47]!==R?(b={mutationFn:O,onSuccess:R},t[46]=O,t[47]=R,t[48]=b):b=t[48];const v=f(b);let C;t[49]!==o?(C=async m=>{const i=await o.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return i.structuredContent??i},t[49]=o,t[50]=C):C=t[50];let F;t[51]!==n||t[52]!==l?(F=(m,i)=>{n(),l(i.automation_id)},t[51]=n,t[52]=l,t[53]=F):F=t[53];let L;t[54]!==C||t[55]!==F?(L={mutationFn:C,onSuccess:F},t[54]=C,t[55]=F,t[56]=L):L=t[56];const z=f(L);let M;t[57]!==o?(M={mutationFn:async m=>{const i=await o.callTool({name:"AUTOMATION_RUN",arguments:{id:m}});if(i.isError){const I=i.content?.[0]?.text??"Failed to run automation";throw new Error(I)}return i.structuredContent??i},onSuccess:H,onError:B},t[57]=o,t[58]=M):M=t[58];const J=f(M);let h;return t[59]!==k||t[60]!==j||t[61]!==J||t[62]!==P||t[63]!==z||t[64]!==v||t[65]!==Q?(h={create:k,update:Q,remove:j,triggerAdd:P,triggerRemove:z,triggerRotateToken:v,run:J},t[59]=k,t[60]=j,t[61]=J,t[62]=P,t[63]=z,t[64]=v,t[65]=Q,t[66]=h):h=t[66],h}function B(t){const e=t instanceof Error?t.message:String(t);g.error(`Failed to run automation: ${e}`)}function H(t){t.skipped?g.info(`Automation skipped: ${t.skipped}`):t.error?g.error(`Automation failed: ${t.error}`):g.success("Automation triggered")}function W(t){const e=t instanceof Error?t.message:String(t);g.error(`Failed to delete automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);g.error(`Failed to update automation: ${e}`)}function Z(t){const e=t instanceof Error?t.message:String(t);g.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,nt as c,at as d,it as e,rt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,q as m,n as g,K as p}from"./index-
|
|
1
|
+
import{e as u,q as m,n as g,K as p}from"./index-BfzqpoYd.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
|