decocms 3.89.1 → 3.89.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-ChcBH14n.js → AlertCircle-NC3dB7os.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BfxsIWO1.js → ArrowUpRight-D9dn8W9B.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cm1GnmVj.js → CheckCircle-4xU28_ze.js} +1 -1
- package/dist/client/assets/{ChevronDown-aoqAeXtt.js → ChevronDown-4vfFBrpS.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CoW1IpXE.js → ChevronLeft-CCAFk4Lh.js} +1 -1
- package/dist/client/assets/{ChevronRight-CUGhm8E7.js → ChevronRight-BSaK-g_n.js} +1 -1
- package/dist/client/assets/{ChevronUp-BDbnz61t.js → ChevronUp-CIoJSXpm.js} +1 -1
- package/dist/client/assets/{DotsVertical-BcvtEj5g.js → DotsVertical-DXhOiROl.js} +1 -1
- package/dist/client/assets/{Eye-BhqO9K0O.js → Eye-BcF7vo02.js} +1 -1
- package/dist/client/assets/{FilterLines-DTI31VpW.js → FilterLines-CyP0eiMt.js} +1 -1
- package/dist/client/assets/{Form-gFXvv2WG.js → Form-DLIz5vwr.js} +1 -1
- package/dist/client/assets/{Globe01-CTIuSSD9.js → Globe01-cpwm3ZU4.js} +1 -1
- package/dist/client/assets/{Globe04-Dy3PA2Yl.js → Globe04-DdU789Mf.js} +1 -1
- package/dist/client/assets/{HardDrive-DYVC-Zaq.js → HardDrive-8lyy5Dp-.js} +1 -1
- package/dist/client/assets/{Key01-bDEyn58I.js → Key01-C3jXuyTV.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DjTexk5_.js → LayoutLeft-BA3GeXV2.js} +1 -1
- package/dist/client/assets/{LinkExternal01-COQYOgEI.js → LinkExternal01-Dc9R-z7y.js} +1 -1
- package/dist/client/assets/{Monitor01-DV9tmVAF.js → Monitor01-4eRzNp1q.js} +1 -1
- package/dist/client/assets/{Palette-CD1fLCtB.js → Palette-DziwArEq.js} +1 -1
- package/dist/client/assets/{Play-Dl0pf4M6.js → Play-BTFQj3qh.js} +1 -1
- package/dist/client/assets/{Plus-BEdvqzrP.js → Plus-pFzKRSyH.js} +1 -1
- package/dist/client/assets/{SearchMd-DK3hZUVF.js → SearchMd-BiaNZC1b.js} +1 -1
- package/dist/client/assets/{Settings02-BIpY6Zhb.js → Settings02-Bvzlcm1U.js} +1 -1
- package/dist/client/assets/{Shield01-Dx8gqKG5.js → Shield01-CtXmxEJK.js} +1 -1
- package/dist/client/assets/{Star01-HcsxMzHs.js → Star01-B2kdQndt.js} +1 -1
- package/dist/client/assets/{Stars01-VD9js_iZ.js → Stars01-C_5LYi93.js} +1 -1
- package/dist/client/assets/{Stars02-C-addu2P.js → Stars02-i3gYlhXk.js} +1 -1
- package/dist/client/assets/{Sun-B11PPq5-.js → Sun-CoqE3qoL.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-EOva-Jpw.js → SwitchHorizontal01-CPEaTyhx.js} +1 -1
- package/dist/client/assets/{Tool01-DcPFccxt.js → Tool01-BmUpgiVH.js} +1 -1
- package/dist/client/assets/{Trash01-BfKdeD7S.js → Trash01-B2-9vQgJ.js} +1 -1
- package/dist/client/assets/{Upload01-T8pN8jBP.js → Upload01-FAxCvObz.js} +1 -1
- package/dist/client/assets/{User01-DxWsEbM9.js → User01-C1HCSK6y.js} +1 -1
- package/dist/client/assets/{Users01-C7ItyIdk.js → Users01-D0cghbTw.js} +1 -1
- package/dist/client/assets/{Users03-NRaUurHt.js → Users03-vYWz866I.js} +1 -1
- package/dist/client/assets/{X-Ciyf96Wa.js → X-DVenJxl2.js} +1 -1
- package/dist/client/assets/{XCircle-ovYWqZM6.js → XCircle-DkV5O0gt.js} +1 -1
- package/dist/client/assets/{XClose-m9X1QqKX.js → XClose-1aztqZN5.js} +1 -1
- package/dist/client/assets/{Zap-Bci_Afjv.js → Zap-CxBpS0TW.js} +1 -1
- package/dist/client/assets/{ZapSquare-BlfnVn5C.js → ZapSquare-BupPfcYG.js} +1 -1
- package/dist/client/assets/{ZoomOut-C-l0YUGT.js → ZoomOut-DXDDUqzg.js} +1 -1
- package/dist/client/assets/{access-gate-DelGJZFm.js → access-gate-DJ3w7Rqa.js} +1 -1
- package/dist/client/assets/{add-section-modal-DK89xL9T.js → add-section-modal-B_FGzKHG.js} +1 -1
- package/dist/client/assets/{agent-icon-Bk1Ofbdo.js → agent-icon-B9Rg96af.js} +1 -1
- package/dist/client/assets/agents-list-BpBQ33-8.js +1 -0
- package/dist/client/assets/ai-providers-Cr1HJb4g.js +1 -0
- package/dist/client/assets/{alert-0234XVcw.js → alert-DBActzOw.js} +1 -1
- package/dist/client/assets/{alert-dialog-CKnoCFTw.js → alert-dialog-TZS2F66y.js} +1 -1
- package/dist/client/assets/app-editor-Cu5Jn0bp.js +1 -0
- package/dist/client/assets/{auth-Ci2ZRRcb.js → auth-B2SyT5jq.js} +1 -1
- package/dist/client/assets/{auth-catchall-pBRRm1M1.js → auth-catchall-jfA3V8jK.js} +1 -1
- package/dist/client/assets/{auth-entry-C10wiLq4.js → auth-entry-CzM_DcXD.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DQUsM8Ag.js → auth-split-layout-D8jZEv56.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CjSCavkQ.js → authenticate-and-persist-oauth-ugENWEdg.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cuo6QaWy.js → automation-list-row-RaQMgsZa.js} +1 -1
- package/dist/client/assets/{automation-runs-BNON3nJA.js → automation-runs-DEnZLNcv.js} +1 -1
- package/dist/client/assets/automations-LxVvDRSf.js +1 -0
- package/dist/client/assets/{avatar-BLEdyY7-.js → avatar-Cz89OzST.js} +1 -1
- package/dist/client/assets/{badge-C9MXVg0W.js → badge-DemqTgjN.js} +1 -1
- package/dist/client/assets/{block-document-BPNTiqTb.js → block-document-DnpmRre2.js} +1 -1
- package/dist/client/assets/brand-context-44FYoRF-.js +1 -0
- package/dist/client/assets/buckets-pliF9NOx.js +1 -0
- package/dist/client/assets/{capability-load-error-sRyEFexC.js → capability-load-error-CD0k_ZBV.js} +1 -1
- package/dist/client/assets/{card-mAs4nLtf.js → card-DWocPikY.js} +1 -1
- package/dist/client/assets/category-editor-BElGS0p5.js +1 -0
- package/dist/client/assets/{chat-context-BdyPsWKn.js → chat-context-bLbsqSUE.js} +1 -1
- package/dist/client/assets/{checkbox-B9vj-Cdf.js → checkbox-DmyBqpG7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DUamUZxb.js → cli-auth-success-g1RYvQjB.js} +1 -1
- package/dist/client/assets/collection-detail-BfoXrAWD.js +1 -0
- package/dist/client/assets/{collection-display-button-j1yy59k2.js → collection-display-button-CmYy5ol1.js} +1 -1
- package/dist/client/assets/{collection-search-C1sxKyva.js → collection-search-JyQFyghK.js} +1 -1
- package/dist/client/assets/{collection-tabs-Csv5ENUX.js → collection-tabs-LMEfLwWZ.js} +1 -1
- package/dist/client/assets/command-6Xv18lx6.js +1 -0
- package/dist/client/assets/commerce-onboarding-COle5u-q.js +1 -0
- package/dist/client/assets/connect-desktop-dialog-dXosml16.js +1 -0
- package/dist/client/assets/{connection-card-gZqWtnUr.js → connection-card-DoMs787B.js} +1 -1
- package/dist/client/assets/connection-detail-Cy4adAl6.js +1 -0
- package/dist/client/assets/{connection-form-helpers-4cMYvdoC.js → connection-form-helpers-Dm__G9wh.js} +1 -1
- package/dist/client/assets/connections-x7QDuFJK.js +1 -0
- package/dist/client/assets/{context-menu-BiiNCW4n.js → context-menu-B93bMgay.js} +1 -1
- package/dist/client/assets/{decopilot-CW6d29Nv.js → decopilot-4k7KQSVX.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DhvSomLP.js → decopilot-sse-pool-BEKDdVOU.js} +1 -1
- package/dist/client/assets/{dialog-DtA5oh9D.js → dialog-BbHIKIUS.js} +1 -1
- package/dist/client/assets/{domain-settings-m1b0eyH2.js → domain-settings-PpBMgUMH.js} +1 -1
- package/dist/client/assets/{drawer-zXrFQNCR.js → drawer-kr03m1vm.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DBXGBAAP.js → dropdown-menu-vGHmo9fD.js} +1 -1
- package/dist/client/assets/{empty-state-YJ1DU6Lk.js → empty-state-B4c8fq4i.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DlaPzbl9.js → extract-connection-data-D9jcQvie.js} +1 -1
- package/dist/client/assets/file-explorer-BujxJOsE.js +2 -0
- package/dist/client/assets/{file-type-icon-3wYgaJ1f.js → file-type-icon-DO4mmgEl.js} +1 -1
- package/dist/client/assets/{files-DaCiXODL.js → files-DSkQRfS7.js} +1 -1
- package/dist/client/assets/{form-BPgAGzjC.js → form-BtzyQGYU.js} +1 -1
- package/dist/client/assets/general-BjDrCY53.js +1 -0
- package/dist/client/assets/{github-repo-picker-hOzqpBMc.js → github-repo-picker-BR4lmXmU.js} +1 -1
- package/dist/client/assets/{hooks-BdXI0ZZ7.js → hooks-DlrZPw8A.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-Sr2m6cI7.js → import-from-deco-dialog-DCkFh2H5.js} +1 -1
- package/dist/client/assets/{index-20lo5teZ.js → index-B37Lpv5S.js} +3 -3
- package/dist/client/assets/{index-BaiqhWaL.js → index-B7G40tVP.js} +1 -1
- package/dist/client/assets/{index-wuE_wZDF.js → index-BHKcN4cC.js} +1 -1
- package/dist/client/assets/{index-DsiMEgqD.js → index-BbMa6I-9.js} +2 -2
- package/dist/client/assets/{index-DXt_QCNf.js → index-BqVMogvA.js} +2 -2
- package/dist/client/assets/{index-CK4mkEbA.js → index-CAIYCRJp.js} +1 -1
- package/dist/client/assets/index-CxLZ7FWT.js +1 -0
- package/dist/client/assets/index-DGekSTiC.js +1 -0
- package/dist/client/assets/{index-DHpZNTCL.js → index-DasNl4Yd.js} +1 -1
- package/dist/client/assets/{index-BN5oIbn0.js → index-DeXSnTz7.js} +2 -2
- package/dist/client/assets/{index-BBUDuLgB.js → index-JuJHr8Il.js} +1 -1
- package/dist/client/assets/{index-BoBbtnrJ.js → index-ZjRHn464.js} +1 -1
- package/dist/client/assets/index-hl6kLhIe.js +1 -0
- package/dist/client/assets/{index-redirect-CsfNxHhm.js → index-redirect-c7PIBlRk.js} +1 -1
- package/dist/client/assets/{index-CDpdJTKU.js → index-yU2r0Gdy.js} +12 -12
- package/dist/client/assets/{input-D2VJ6ahm.js → input-D3OR9wlV.js} +1 -1
- package/dist/client/assets/{integration-icon-62cL4F-8.js → integration-icon-DtONHt_d.js} +1 -1
- package/dist/client/assets/{label-Xkc4XdLq.js → label-C3oLcOn0.js} +1 -1
- package/dist/client/assets/{login-CLUghQw8.js → login-DjI0bYya.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CsZ919dh.js → mcp-oauth-B7tRsqo-.js} +1 -1
- package/dist/client/assets/{members-CB0UM83l.js → members-DIxpLBtJ.js} +2 -2
- package/dist/client/assets/{monaco-editor-C0cKgOd8.js → monaco-editor-CI1Pa0QN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-COpSRcY-.js → monitoring-stats-row-BcIi6QZu.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bq9PHCzO.js → oauth-callback-Dgp5DdjP.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B4wHrtoi.js → oauth-callback-ai-provider-DPhQ8sI3.js} +1 -1
- package/dist/client/assets/{onboarding-ChNzFBz9.js → onboarding-DtsS5lUr.js} +1 -1
- package/dist/client/assets/{org-install-D3HGVhMw.js → org-install-7RmPSbO9.js} +1 -1
- package/dist/client/assets/{org-layout-CKL4gUDt.js → org-layout--gQCQGBA.js} +1 -1
- package/dist/client/assets/{organization-choice-CmMr-EN1.js → organization-choice-A8WzCg8t.js} +1 -1
- package/dist/client/assets/{page-seo-form-tt8IzB9t.js → page-seo-form-rxuP--YT.js} +1 -1
- package/dist/client/assets/page-seo-sheet-vEubWUB4.js +1 -0
- package/dist/client/assets/{popover-CHlLC07g.js → popover-voqJlCLR.js} +1 -1
- package/dist/client/assets/post-editor-CukRi04m.js +1 -0
- package/dist/client/assets/{preview-dialog-pnlDSJ8-.js → preview-dialog-DC1NsLKi.js} +1 -1
- package/dist/client/assets/{primitives-CDMj0aGG.js → primitives-DLRj8yUL.js} +1 -1
- package/dist/client/assets/profile-Cuy0XRiQ.js +1 -0
- package/dist/client/assets/project-app-view-DCl-CWYr.js +1 -0
- package/dist/client/assets/record-editor-DOI2gIfd.js +1 -0
- package/dist/client/assets/registry-EBdkezYg.js +2 -0
- package/dist/client/assets/{registry-layout-BdK58T7U.js → registry-layout-Bsm16ESy.js} +2 -2
- package/dist/client/assets/{require-capability-BMiu3VbE.js → require-capability-WHfqcRqc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-hnMHneNT.js → required-auth-layout-CcH9lzeU.js} +1 -1
- package/dist/client/assets/{reset-password-DTJmY0M7.js → reset-password-o6QeBSLY.js} +1 -1
- package/dist/client/assets/roles-D_-_h1c8.js +1 -0
- package/dist/client/assets/{save-status-D-Y-u7Wx.js → save-status-D4ISIXoj.js} +1 -1
- package/dist/client/assets/{scroll-area-BlJNYaPT.js → scroll-area-CLfWXW0D.js} +1 -1
- package/dist/client/assets/{search-input-DucmHYf0.js → search-input-DPBtlWUD.js} +1 -1
- package/dist/client/assets/secrets-cvbnrgVx.js +1 -0
- package/dist/client/assets/{sections-editor-jzkZQ3Ec.js → sections-editor-DdPJUwmv.js} +2 -2
- package/dist/client/assets/{select-C0AEr1SL.js → select-Dm5gSFeK.js} +1 -1
- package/dist/client/assets/select-model-DdKq7y8l.js +1 -0
- package/dist/client/assets/seo-editor-D12GD7FT.js +1 -0
- package/dist/client/assets/settings-layout-Bf0CD3Ha.js +1 -0
- package/dist/client/assets/{settings-section-CP7jibDA.js → settings-section-BOPxWg6D.js} +1 -1
- package/dist/client/assets/{sheet-BBGbheOC.js → sheet-BCI6wljB.js} +1 -1
- package/dist/client/assets/{shell-controls-BPsjYlm1.js → shell-controls-CUcC0uoE.js} +1 -1
- package/dist/client/assets/{shell-layout-xhRX4rsB.js → shell-layout-BpdvdxRY.js} +1 -1
- package/dist/client/assets/{shell-route-loading-C4SUOonb.js → shell-route-loading-CrU5yzKP.js} +1 -1
- package/dist/client/assets/sidebar-DLjbCYfe.js +1 -0
- package/dist/client/assets/{skeleton-CVRpN7O3.js → skeleton-vuq3rnUi.js} +1 -1
- package/dist/client/assets/{sortable.esm-DMoaSsem.js → sortable.esm-aG8KzwUt.js} +2 -2
- package/dist/client/assets/sso-V1O3oG0I.js +1 -0
- package/dist/client/assets/store-ChzWT5-N.js +1 -0
- package/dist/client/assets/store-registry-DwmY0RAT.js +2 -0
- package/dist/client/assets/{studio-tools-DqPhjgPW.js → studio-tools-QGvUs6qu.js} +1 -1
- package/dist/client/assets/{switch-BOUA2FBT.js → switch-BwnzJhUB.js} +1 -1
- package/dist/client/assets/{table-hboPJhBa.js → table-DyiI6lY1.js} +1 -1
- package/dist/client/assets/{tabs-BqGLbeO9.js → tabs-2cKRgONn.js} +1 -1
- package/dist/client/assets/{task-status-DbMlzbTm.js → task-status-1cY6Pf8x.js} +1 -1
- package/dist/client/assets/{textarea-BqMqcZIm.js → textarea-DqRxFP0T.js} +1 -1
- package/dist/client/assets/{toggle-group-Db5bABta.js → toggle-group-CvE2Rn7y.js} +1 -1
- package/dist/client/assets/{toolbar-DDUCJSbz.js → toolbar-Dsvneu3f.js} +1 -1
- package/dist/client/assets/{tools-list-DkXVWS7e.js → tools-list-Dk1OdhLO.js} +1 -1
- package/dist/client/assets/tooltip-Bjh8CXdQ.js +1 -0
- package/dist/client/assets/{types-Cms0eXYe.js → types-CXT3eJPp.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BFPg4Nao.js → use-ai-providers-Cm6bJu4O.js} +1 -1
- package/dist/client/assets/{use-automations-C_LX8Dvr.js → use-automations-hkjYbjXY.js} +1 -1
- package/dist/client/assets/{use-capability-C1-FHW22.js → use-capability-qIjsd8HD.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DvWNr9a0.js → use-clock-tick-Doyl2hlk.js} +1 -1
- package/dist/client/assets/{use-collections-74mCujh3.js → use-collections-OMXnywUO.js} +1 -1
- package/dist/client/assets/{use-connection-D-7QpVUJ.js → use-connection-CQmB3ngS.js} +1 -1
- package/dist/client/assets/{use-copy-D6L-AQL_.js → use-copy-CjrJL2o4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-kRix1VSu.js → use-create-virtual-mcp-BbhHiNda.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B3nrE_1Y.js → use-debounced-autosave-BStxRiyA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-VpHPQbnh.js → use-delete-connection-CcoavCzH.js} +1 -1
- package/dist/client/assets/{use-file-configs-DNAtFvn4.js → use-file-configs-DwaAJaA6.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-hOEUoZD8.js → use-infinite-scroll-BLyYnILN.js} +1 -1
- package/dist/client/assets/{use-join-requests-BvPzSuPP.js → use-join-requests-DzaX5jxt.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CxXf5rsq.js → use-mcp-client-CX47WlCL.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CqbI2uxQ.js → use-mcp-prompts-CbrvbR3P.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CLWDDSx5.js → use-mcp-tools-C37oT0bu.js} +1 -1
- package/dist/client/assets/{use-members-Cd4dRzb0.js → use-members-CtUanB1S.js} +1 -1
- package/dist/client/assets/use-mobile-BsQGJSz8.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-D8CoEyF3.js → use-navigate-to-agent-C_B7rQZ3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CSAS1fgX.js → use-org-auth-client-BWt-3T2p.js} +1 -1
- package/dist/client/assets/{use-org-sso-D9H6UI9E.js → use-org-sso-DKfKkOYy.js} +1 -1
- package/dist/client/assets/{use-organization-roles-rL51pKiY.js → use-organization-roles-LSjQh-hO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CTH2EptF.js → use-organization-settings-Cw-0oyZX.js} +1 -1
- package/dist/client/assets/{use-registry-connections-jcbA10JV.js → use-registry-connections-sALt7ACC.js} +1 -1
- package/dist/client/assets/{use-secrets-CfUCGkTu.js → use-secrets-DyPgSICV.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CfsHQQ72.js → use-status-sounds-YKEkF-4T.js} +1 -1
- package/dist/client/assets/use-view-mode-BMTZD0uv.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-CwSMwdwq.js → use-virtual-mcp-ByWPjIzd.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-V0rLmF2w.js +1 -0
- package/dist/client/assets/{useQueries-BdyCFKnV.js → useQueries-Do45fFi7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Zpghw-jA.js +1 -0
- package/dist/client/assets/variant-calendar-bDr2uwc7.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BZ52Zalr.js → view-mode-toggle-yOXFqeV7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DGJQ5tbU.js +0 -1
- package/dist/client/assets/ai-providers-1Fg66YS1.js +0 -1
- package/dist/client/assets/app-editor-Dee1jydx.js +0 -1
- package/dist/client/assets/automations-CFj3iBHN.js +0 -1
- package/dist/client/assets/brand-context-5jDalvDO.js +0 -1
- package/dist/client/assets/buckets-BzZ5RUjr.js +0 -1
- package/dist/client/assets/category-editor-wDaIJOJ7.js +0 -1
- package/dist/client/assets/collection-detail-ClxlZsnZ.js +0 -1
- package/dist/client/assets/command-vbsMaAT6.js +0 -1
- package/dist/client/assets/commerce-onboarding-DoN5YJbZ.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-CkD3zyKJ.js +0 -1
- package/dist/client/assets/connection-detail-rDE247RN.js +0 -1
- package/dist/client/assets/connections-DnwHKMbX.js +0 -1
- package/dist/client/assets/file-explorer-W1D9pH49.js +0 -2
- package/dist/client/assets/general-23V2Ho1C.js +0 -1
- package/dist/client/assets/index-BWkPiGuC.js +0 -1
- package/dist/client/assets/index-DgqWlUUI.js +0 -1
- package/dist/client/assets/index-KwJaTLZk.js +0 -1
- package/dist/client/assets/page-seo-sheet-DuUcGG-6.js +0 -1
- package/dist/client/assets/post-editor-D55m7k1S.js +0 -1
- package/dist/client/assets/profile-wDwUx_Mw.js +0 -1
- package/dist/client/assets/project-app-view-3zlWIcJu.js +0 -1
- package/dist/client/assets/record-editor-BNDljN0d.js +0 -1
- package/dist/client/assets/registry-52H0YdSD.js +0 -2
- package/dist/client/assets/roles-CzG0s_Ib.js +0 -1
- package/dist/client/assets/secrets-Cr6YxiSX.js +0 -1
- package/dist/client/assets/select-model-C78uu1xA.js +0 -1
- package/dist/client/assets/seo-editor-CHrrRJBI.js +0 -1
- package/dist/client/assets/settings-layout-DzHXF3Dv.js +0 -1
- package/dist/client/assets/sidebar-Cx68CPJi.js +0 -1
- package/dist/client/assets/sso-vWr0RkSo.js +0 -1
- package/dist/client/assets/store-BXcc72mi.js +0 -1
- package/dist/client/assets/store-registry-CzJeBBUG.js +0 -2
- package/dist/client/assets/tooltip-B_mKOQvv.js +0 -1
- package/dist/client/assets/use-view-mode-DdtTz0AS.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CWme5rGZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DVa_SnfJ.js +0 -1
- package/dist/client/assets/variant-calendar-D2hiqv-k.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{c as le,r as K,b as yt,w as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,a7 as rs,u as ls,s as xt,E as os}from"./index-
|
|
1
|
+
import{c as le,r as K,b as yt,w as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,a7 as rs,u as ls,s as xt,E as os}from"./index-B37Lpv5S.js";import{S as as}from"./search-input-DPBtlWUD.js";import{P as De}from"./index-ZjRHn464.js";import{E as St}from"./empty-state-B4c8fq4i.js";import{R as ns}from"./require-capability-WHfqcRqc.js";import{J as Tt,S as is}from"./scroll-area-CLfWXW0D.js";import{u as vt}from"./use-connection-CQmB3ngS.js";import{g as Pt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-DemqTgjN.js";import{P as ct,a as dt,b as mt}from"./popover-voqJlCLR.js";import{T as Ze,a as et,b as tt}from"./tooltip-Bjh8CXdQ.js";import{i as ft,n as cs}from"./ChevronUp-CIoJSXpm.js";import{a as Xe}from"./Eye-BcF7vo02.js";import{n as Mt}from"./Globe01-cpwm3ZU4.js";import{i as At}from"./FilterLines-CyP0eiMt.js";import{i as ds}from"./Key01-C3jXuyTV.js";import{i as ms}from"./Play-BTFQj3qh.js";import{ak as us,T as xs,M as fs}from"./agent-icon-B9Rg96af.js";import{M as _t}from"./monaco-editor-CI1Pa0QN.js";import{u as ps}from"./use-members-CtUanB1S.js";import{S as hs,u as gs,W as js}from"./use-mcp-client-CX47WlCL.js";import{u as vs}from"./use-virtual-mcp-ByWPjIzd.js";import{n as Qe}from"./XCircle-DkV5O0gt.js";import{c as Ns}from"./SwitchHorizontal01-CPEaTyhx.js";import{s as bs}from"./Plus-pFzKRSyH.js";import{s as ys}from"./Trash01-B2-9vQgJ.js";import{I as Ge}from"./input-D3OR9wlV.js";import{C as ws,g as Ss,b as Dt,f as st,a as Vt,c as pt,d as Is,e as Lt,h as Ut,A as Cs,T as ks,i as Ts,M as ht}from"./automation-runs-DEnZLNcv.js";import{b as lt,c as ot,S as at,a as $e,d as nt}from"./select-Dm5gSFeK.js";import{t as Kt}from"./ChevronDown-4vfFBrpS.js";import{s as Ms}from"./Stars02-i3gYlhXk.js";import{T as _s}from"./textarea-DqRxFP0T.js";import{C as qt}from"./collection-tabs-LMEfLwWZ.js";import{S as Ds}from"./switch-BwnzJhUB.js";import{L as Ls}from"./label-C3oLcOn0.js";import{I as qe}from"./integration-icon-DtONHt_d.js";import{A as Bt}from"./avatar-Cz89OzST.js";import{A as Fs,a as Rs,b as $s}from"./alert-DBActzOw.js";import{C as Ht}from"./card-DWocPikY.js";import{K as Me}from"./monitoring-stats-row-BcIi6QZu.js";import{u as Jt}from"./studio-tools-QGvUs6qu.js";import{u as zs}from"./useSuspenseInfiniteQuery-Zpghw-jA.js";import{b as Os,S as Es,c as Ps,d as As}from"./sheet-BCI6wljB.js";import{T as Fe,a as ut,b as Gt,c as Qt,d as Wt,e as ae}from"./table-DyiI6lY1.js";import{u as Vs}from"./use-infinite-scroll-BLyYnILN.js";import{c as Us,b as Ks}from"./use-automations-hkjYbjXY.js";import"./SearchMd-BiaNZC1b.js";import"./sidebar-DLjbCYfe.js";import"./LayoutLeft-BA3GeXV2.js";import"./use-mobile-BsQGJSz8.js";import"./use-capability-qIjsd8HD.js";import"./access-gate-DJ3w7Rqa.js";import"./capability-load-error-CD0k_ZBV.js";import"./Stars01-C_5LYi93.js";import"./ChevronRight-BSaK-g_n.js";import"./use-clock-tick-Doyl2hlk.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CjrJL2o4.js";import"./file-type-icon-DO4mmgEl.js";import"./dialog-BbHIKIUS.js";import"./X-DVenJxl2.js";import"./ZoomOut-DXDDUqzg.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-CXT3eJPp.js";import"./chat-context-bLbsqSUE.js";import"./hooks-DlrZPw8A.js";import"./decopilot-sse-pool-BEKDdVOU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-Cm6bJu4O.js";import"./use-organization-settings-Cw-0oyZX.js";import"./AlertCircle-NC3dB7os.js";import"./Star01-B2kdQndt.js";import"./XClose-1aztqZN5.js";import"./ZapSquare-BupPfcYG.js";import"./Tool01-BmUpgiVH.js";import"./Monitor01-4eRzNp1q.js";import"./Upload01-FAxCvObz.js";import"./shell-layout-BpdvdxRY.js";import"./Users03-vYWz866I.js";import"./CheckCircle-4xU28_ze.js";import"./Zap-CxBpS0TW.js";import"./required-auth-layout-CcH9lzeU.js";import"./use-org-sso-DKfKkOYy.js";import"./LinkExternal01-Dc9R-z7y.js";import"./ArrowUpRight-D9dn8W9B.js";import"./Palette-DziwArEq.js";import"./use-navigate-to-agent-C_B7rQZ3.js";import"./use-mcp-prompts-CbrvbR3P.js";import"./form-BtzyQGYU.js";import"./index-BdQq_4o_.js";import"./use-collections-OMXnywUO.js";import"./Settings02-Bvzlcm1U.js";import"./ChevronLeft-CCAFk4Lh.js";import"./DotsVertical-DXhOiROl.js";import"./Globe04-DdU789Mf.js";import"./HardDrive-8lyy5Dp-.js";import"./Sun-CoqE3qoL.js";import"./Shield01-CtXmxEJK.js";import"./User01-C1HCSK6y.js";import"./Users01-D0cghbTw.js";import"./index-JuJHr8Il.js";import"./use-org-auth-client-BWt-3T2p.js";import"./auth-B2SyT5jq.js";import"./useInfiniteQuery-V0rLmF2w.js";import"./task-status-1cY6Pf8x.js";import"./checkbox-DmyBqpG7.js";import"./command-6Xv18lx6.js";import"./index-BHKcN4cC.js";import"./index-CAIYCRJp.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Ft(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
5
5
|
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function Hs(s){const e=le.c(117),{log:r}=s,[l,a]=K.useState(!1),[o,c]=K.useState(!1),i=yt(),{org:n}=Be(),d=vt(),f=Rt(r.input),p=Rt(r.output),v=Js;let b;e[0]!==r.input||e[1]!==r.output?(b=async se=>{const ee=v(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(ee),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Se.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=b):b=e[2];const u=b;let R;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(R=se=>{const ee=v(se==="input"?r.input:r.output),oe=new Blob([ee],{type:"application/json"}),he=URL.createObjectURL(oe),be=document.createElement("a");be.href=he,be.download=`${r.toolName}-${se}-${r.id}.json`,be.click(),URL.revokeObjectURL(he)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=R):R=e[7];const h=R;let j;e[8]!==d||e[9]!==r.connectionId||e[10]!==r.input||e[11]!==r.toolName||e[12]!==i||e[13]!==n?(j=()=>{const se=d.find(oe=>oe.id===r.connectionId);if(!se){Se.error("Could not find the connection for this tool call");return}const ee=crypto.randomUUID();sessionStorage.setItem(`replay-${ee}`,JSON.stringify(r.input)),i({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:n.slug,appSlug:Pt(se),collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:ee}})},e[8]=d,e[9]=r.connectionId,e[10]=r.input,e[11]=r.toolName,e[12]=i,e[13]=n,e[14]=j):j=e[14];const m=j,[C,S]=K.useState(!1);let g;e[15]!==r.requestId?(g=async()=>{try{await navigator.clipboard.writeText(r.requestId),S(!0),setTimeout(()=>S(!1),2e3)}catch{Se.error("Failed to copy to clipboard")}},e[15]=r.requestId,e[16]=g):g=e[16];const _=g;let I;e[17]!==r.timestamp?(I=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[17]=r.timestamp,e[18]=I):I=e[18];const x=I,F="text-sm px-5 md:px-6 py-5 space-y-5";let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[19]=w):w=e[19];let D;e[20]!==x?(D=t.jsxs("div",{children:[w,t.jsx("div",{className:"text-sm text-foreground",children:x})]}),e[20]=x,e[21]=D):D=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[22]=k):k=e[22];let O;e[23]!==r.durationMs?(O=t.jsxs("div",{children:[k,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[23]=r.durationMs,e[24]=O):O=e[24];let $;e[25]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[25]=$):$=e[25];let J;e[26]!==r.userName?(J=t.jsxs("div",{children:[$,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[26]=r.userName,e[27]=J):J=e[27];let P;e[28]!==r.virtualMcpName?(P=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[28]=r.virtualMcpName,e[29]=P):P=e[29];let X;e[30]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[30]=X):X=e[30];let y;e[31]!==r.requestId?(y=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[31]=r.requestId,e[32]=y):y=e[32];let T;e[33]!==C?(T=C?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[33]=C,e[34]=T):T=e[34];let L;e[35]!==_||e[36]!==T?(L=t.jsx(Z,{size:"icon",variant:"ghost",onClick:_,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:T}),e[35]=_,e[36]=T,e[37]=L):L=e[37];let z;e[38]!==y||e[39]!==L?(z=t.jsxs("div",{children:[X,t.jsxs("div",{className:"flex items-center gap-1",children:[y,L]})]}),e[38]=y,e[39]=L,e[40]=z):z=e[40];let E;e[41]!==r.userAgent?(E=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[41]=r.userAgent,e[42]=E):E=e[42];let U;e[43]!==r.properties||e[44]!==i||e[45]!==n?(U=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[ee,oe]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[ee,"=",oe]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const he={key:ee,operator:"eq",value:oe};i({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Re([he])}})},children:[t.jsx(At,{size:14,className:"mr-2"}),"Filter by this property"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${ee}=${oe}`),Se.success("Copied filter to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ee),Se.success("Copied key to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(ds,{size:14,className:"mr-2"}),"Copy key"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(oe),Se.success("Copied value to clipboard")}catch{Se.error("Failed to copy to clipboard")}},children:[t.jsx(us,{size:14,className:"mr-2"}),"Copy value"]})]})})]},ee)})})]}),e[43]=r.properties,e[44]=i,e[45]=n,e[46]=U):U=e[46];let q;e[47]!==O||e[48]!==J||e[49]!==P||e[50]!==z||e[51]!==E||e[52]!==U||e[53]!==D?(q=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[D,O,J,P,z,E,U]}),e[47]=O,e[48]=J,e[49]=P,e[50]=z,e[51]=E,e[52]=U,e[53]=D,e[54]=q):q=e[54];let V;e[55]!==r.errorMessage?(V=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[55]=r.errorMessage,e[56]=V):V=e[56];const Y="space-y-4";let B;e[57]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[57]=B):B=e[57];const G=f.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Tt(f.originalSize)," - truncated)"]});let A;e[58]!==G?(A=t.jsxs("div",{className:"flex items-center gap-2",children:[B,G]}),e[58]=G,e[59]=A):A=e[59];let N;e[60]!==m||e[61]!==r.input?(N=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:m,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(ms,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[60]=m,e[61]=r.input,e[62]=N):N=e[62];let M;e[63]!==h||e[64]!==f?(M=f.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>h("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[63]=h,e[64]=f,e[65]=M):M=e[65];let H;e[66]!==u?(H=()=>u("input"),e[66]=u,e[67]=H):H=e[67];let te;e[68]!==l?(te=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[68]=l,e[69]=te):te=e[69];let Q;e[70]!==H||e[71]!==te?(Q=t.jsx(Z,{size:"icon",variant:"ghost",onClick:H,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:te}),e[70]=H,e[71]=te,e[72]=Q):Q=e[72];let re;e[73]!==N||e[74]!==M||e[75]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-1",children:[N,M,Q]}),e[73]=N,e[74]=M,e[75]=Q,e[76]=re):re=e[76];let W;e[77]!==A||e[78]!==re?(W=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[A,re]}),e[77]=A,e[78]=re,e[79]=W):W=e[79];let ne;e[80]!==f?(ne=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[80]=f,e[81]=ne):ne=e[81];let ce;e[82]!==W||e[83]!==ne?(ce=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[W,ne]})}),e[82]=W,e[83]=ne,e[84]=ce):ce=e[84];const ze="rounded-lg overflow-hidden border border-border",Ie="flex items-center justify-between p-1 pl-4 border-b border-border",Ce="flex items-center gap-2";let ie;e[85]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[85]=ie):ie=e[85];const Le=p.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Tt(p.originalSize)," - truncated)"]});let ge;e[86]!==ie||e[87]!==Le?(ge=t.jsxs("div",{className:Ce,children:[ie,Le]}),e[86]=ie,e[87]=Le,e[88]=ge):ge=e[88];let je;e[89]!==h||e[90]!==p.isTruncated?(je=p.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>h("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[89]=h,e[90]=p.isTruncated,e[91]=je):je=e[91];let ve;e[92]!==u?(ve=()=>u("output"),e[92]=u,e[93]=ve):ve=e[93];let me;e[94]!==o?(me=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[94]=o,e[95]=me):me=e[95];let Ne;e[96]!==ve||e[97]!==me?(Ne=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:me}),e[96]=ve,e[97]=me,e[98]=Ne):Ne=e[98];let ue;e[99]!==je||e[100]!==Ne?(ue=t.jsxs("div",{className:"flex items-center gap-1",children:[je,Ne]}),e[99]=je,e[100]=Ne,e[101]=ue):ue=e[101];let xe;e[102]!==ge||e[103]!==ue?(xe=t.jsxs("div",{className:Ie,children:[ge,ue]}),e[102]=ge,e[103]=ue,e[104]=xe):xe=e[104];let fe;e[105]!==p.content?(fe=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:p.content,language:"json",height:"100%",readOnly:!0})}),e[105]=p.content,e[106]=fe):fe=e[106];let pe;e[107]!==xe||e[108]!==fe?(pe=t.jsx("div",{children:t.jsxs("div",{className:ze,children:[xe,fe]})}),e[107]=xe,e[108]=fe,e[109]=pe):pe=e[109];let ke;e[110]!==ce||e[111]!==pe?(ke=t.jsxs("div",{className:Y,children:[ce,pe]}),e[110]=ce,e[111]=pe,e[112]=ke):ke=e[112];let we;return e[113]!==q||e[114]!==V||e[115]!==ke?(we=t.jsxs("div",{className:F,children:[q,V,ke]}),e[113]=q,e[114]=V,e[115]=ke,e[116]=we):we=e[116],we}function Js(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Gs={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Yt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const r=e.match(Xt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function ye(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Yt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Qs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function $t(s){const e=s.trim();if(e==="now")return"Now";const r=Yt(e);if(!r||!r.unit){const o=ye(e);return o.valid&&o.date?Qs(o.date):e}const l=Gs[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const es=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Ws(s,e){const r=es.find(l=>l.from===s&&l.to===e);return r?r.label:`${$t(s)} to ${$t(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${c}`}function Xs(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,c,i]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(c),Number(i));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=ye(s);return e.valid&&e.date?Je(e.date):s}function zt({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[c,i]=K.useState(!1),[n,d]=K.useState(()=>gt(s)),[f,p]=K.useState(),[v,b]=K.useState(!1),u=K.useRef(s);u.current!==s&&(u.current=s,v||d(gt(s)));const R=x=>{const F=x.target.value;d(F),p(void 0)},h=()=>{b(!0)},j=()=>{b(!1);const x=n.trim();if(Zt(x)){p(void 0),e(x);return}const F=Xs(x);if(F){p(void 0),e(F.toISOString()),d(Je(F));return}const w=ye(x);if(w.valid&&w.date){p(void 0),e(x),d(Je(w.date));return}d(gt(s)),p(void 0)},m=x=>{if(x){const w=ye(s).date||new Date;x.setHours(w.getHours()),x.setMinutes(w.getMinutes()),x.setSeconds(0),x.setMilliseconds(0);const D=x.toISOString();d(Je(x)),e(D),p(void 0)}i(!1)},C=x=>{const[F,w]=x.target.value.split(":").map(Number),k=ye(s).date||new Date;k.setHours(F||0),k.setMinutes(w||0),k.setSeconds(0),k.setMilliseconds(0);const O=k.toISOString();d(Je(k)),e(O)},S=ye(s),g=S.valid?S.date:new Date,_=g?`${String(g.getHours()).padStart(2,"0")}:${String(g.getMinutes()).padStart(2,"0")}`:"",I=o||f;return t.jsxs("div",{className:de("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ge,{value:n,onChange:R,onFocus:h,onBlur:j,placeholder:r,disabled:a,className:de("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:c,onOpenChange:i,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(xs,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(ws,{mode:"single",selected:g||void 0,onSelect:m,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ge,{type:"time",value:_,onChange:C,className:"text-sm h-8"})]})]})]})]})}function Ys({value:s,onChange:e,className:r,disabled:l,quickRanges:a=es}){const[o,c]=K.useState(!1),[i,n]=K.useState(s.from),[d,f]=K.useState(s.to),[p,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),f(s.to));const u=m=>{b.current={from:m.from,to:m.to},n(m.from),f(m.to),c(!1),e({from:m.from,to:m.to})},R=()=>{const m=ye(i),C=ye(d);if(!m.valid||!m.date){v("Invalid 'From' date");return}if(!C.valid||!C.date){v("Invalid 'To' date");return}if(m.date>=C.date){v("'From' must be before 'To'");return}v(null),e({from:i,to:d}),c(!1)},h=m=>s.from===m.from&&s.to===m.to,j=Ws(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:c,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:de("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Ms,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:j})]}),t.jsx(Kt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:m=>m.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(zt,{value:i,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(zt,{value:d,onChange:f,placeholder:"now"})]}),p&&t.jsx("p",{className:"text-xs text-destructive",children:p}),t.jsx(Z,{onClick:R,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(is,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:a.map(m=>{const C=h(m);return t.jsx("button",{type:"button",onClick:()=>u(m),className:de("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",C&&"bg-accent text-accent-foreground font-medium"),children:m.label},m.value)})})})})]})})]})}const ts="decopilot";async function ss(s,e){return await s.call("MONITORING_STATS",e)}function Zs(s,e){const r=le.c(12),{org:l}=Be(),a=Jt();let o,c,i;r[0]!==l.id||r[1]!==s?(i={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},c=wt,o=it.monitoringStatsToolCalls(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=c,r[4]=i):(o=r[2],c=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ss(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let d;return r[8]!==e||r[9]!==o||r[10]!==n?(d={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=d):d=r[11],c(d)}function er(s,e){const r=le.c(12),{org:l}=Be(),a=Jt();let o,c,i;r[0]!==l.id||r[1]!==s?(i={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},c=wt,o=it.monitoringStatsLlm(l.id,JSON.stringify(i)),r[0]=l.id,r[1]=s,r[2]=o,r[3]=c,r[4]=i):(o=r[2],c=r[3],i=r[4]);let n;r[5]!==a||r[6]!==i?(n=()=>ss(a,i),r[5]=a,r[6]=i,r[7]=n):n=r[7];let d;return r[8]!==e||r[9]!==o||r[10]!==n?(d={queryKey:o,queryFn:n,staleTime:3e4,retry:!1,...e},r[8]=e,r[9]=o,r[10]=n,r[11]=d):d=r[11],c(d)}function _e(s){const e=le.c(20),{title:r,value:l,action:a,children:o,className:c}=s;let i;e[0]!==c?(i=de("pt-4 px-4 pb-6 gap-8",c),e[0]=c,e[1]=i):i=e[1];let n;e[2]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let d;e[4]!==l?(d=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==d?(f=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,d]}),e[6]=n,e[7]=d,e[8]=f):f=e[8];let p;e[9]!==a?(p=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=p):p=e[10];let v;e[11]!==f||e[12]!==p?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[f,p]}),e[11]=f,e[12]=p,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let u;return e[16]!==i||e[17]!==v||e[18]!==b?(u=t.jsxs(Ht,{className:i,children:[v,b]}),e[16]=i,e[17]=v,e[18]=b,e[19]=u):u=e[19],u}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:c}=Be(),i=yt();let n,d,f;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==i||e[4]!==c||e[5]!==o){f=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(sr));let u;e[9]!==a?(u=(h,j)=>{const m=Lt(h.metric,a);return Lt(j.metric,a)-m},e[9]=a,e[10]=u):u=e[10];const R=v.map(h=>({connection:h,metric:b.get(h.id)})).filter(tr).sort(u).slice(0,4);if(R.length===0){f=null;break e}n="flex flex-col",d=R.map((h,j)=>{const{connection:m,metric:C}=h,S=o>0?(C.calls/o*100).toFixed(1):"0.0",g=a==="errors"?`${C.errorRate.toFixed(1)}%`:`${S}%`,_=j===R.length-1;return t.jsxs("div",{className:de("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!_&&"border-b border-border/50"),onClick:()=>i({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:Pt(m)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:m.icon,name:m.title,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:m.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:g}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:Is(C,a)})]})]},m.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=i,e[4]=c,e[5]=o,e[6]=n,e[7]=d,e[8]=f}else n=e[6],d=e[7],f=e[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;return e[11]!==n||e[12]!==d?(p=t.jsx("div",{className:n,children:d}),e[11]=n,e[12]=d,e[13]=p):p=e[13],p}function tr(s){return s.metric}function sr(s){return[s.connectionId,s]}const Ot=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Et(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return Ot[e%Ot.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=u=>a==="tokens"?(u.inputTokens??0)+(u.outputTokens??0):a==="cost"?u.costUsd??0:u.calls,e[0]=a,e[1]=o):o=e[1];const c=o;let i;e[2]!==a?(i=u=>a==="cost"?Vt(u):a==="tokens"?st(u):u.toLocaleString(),e[2]=a,e[3]=i):i=e[3];const n=i;let d;e[4]!==c?(d=(u,R)=>u+c(R),e[4]=c,e[5]=d):d=e[5];const f=r.reduce(d,0);let p,v;if(e[6]!==n||e[7]!==r||e[8]!==f||e[9]!==c){let u;e[12]!==c?(u=(j,m)=>c(m)-c(j),e[12]=c,e[13]=u):u=e[13];const R=[...r].sort(u).slice(0,4);p="flex flex-col";let h;e[14]!==n||e[15]!==f||e[16]!==c?(h=(j,m,C)=>{const S=c(j),g=f>0?(S/f*100).toFixed(1):"0.0",_=m===C.length-1;return t.jsxs("div",{className:de("flex items-center h-10 px-3",!_&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Et(j.toolName)} 18%, transparent)`},children:t.jsx(Qe,{size:14,style:{color:Et(j.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:j.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[g,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},j.toolName)},e[14]=n,e[15]=f,e[16]=c,e[17]=h):h=e[17],v=R.map(h),e[6]=n,e[7]=r,e[8]=f,e[9]=c,e[10]=p,e[11]=v}else p=e[10],v=e[11];let b;return e[18]!==p||e[19]!==v?(b=t.jsx("div",{className:p,children:v}),e[18]=p,e[19]=v,e[20]=b):b=e[20],b}function rr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:c,connections:i,isStreaming:n,streamingRefetchInterval:d,llmUserIds:f}=s,p=Ss(r),v=n?d:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:u,isError:R}=Zs({interval:p,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:c},b);let h;e[2]!==v?(h={refetchInterval:v},e[2]=v,e[3]=h):h=e[3];const{data:j,isError:m}=er({interval:p,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:f?.length?f:void 0},h),C=R||m,S=u?{totalCalls:u.totalCalls,totalErrors:u.totalErrors,avgDurationMs:u.avgDurationMs,p95DurationMs:u.p95DurationMs,data:Dt(u.timeseries,r,p)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},g=j?{totalCalls:j.totalCalls,totalErrors:j.totalErrors,avgDurationMs:j.avgDurationMs,p95DurationMs:j.p95DurationMs,data:Dt(j.timeseries,r,p)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let _;e[4]!==j?.topTools?(_=j?.topTools??[],e[4]=j?.topTools,e[5]=_):_=e[5];const I=_,x=j?.totalInputTokens??0,F=j?.totalOutputTokens??0,w=j?.totalTokens??0,D=j?.totalCostUsd??0;let k;e[6]!==u?.connectionBreakdown?(k=u?.connectionBreakdown??[],e[6]=u?.connectionBreakdown,e[7]=k):k=e[7];const O=k,[$,J]=K.useState("avg");let P;e[8]!==C?(P=C&&t.jsxs(Fs,{variant:"destructive",children:[t.jsx(rs,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Rs,{children:"Failed to load monitoring data"}),t.jsx($s,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=C,e[9]=P):P=e[9];let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=ce=>J(ce),e[10]=X):X=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=y):y=e[11];let T;e[12]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsxs(at,{children:[t.jsx($e,{value:"avg",children:"Avg"}),t.jsx($e,{value:"p95",children:"P95"})]}),e[12]=T):T=e[12];let L;e[13]!==$?(L=t.jsxs(nt,{value:$,onValueChange:X,children:[y,T]}),e[13]=$,e[14]=L):L=e[14];let z;e[15]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Usage"}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),e[15]=z):z=e[15];let E;e[16]!==I?(E=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=E):E=e[17];let U;e[18]!==w?(U=st(w),e[18]=w,e[19]=U):U=e[19];let q;e[20]!==x?(q=st(x),e[20]=x,e[21]=q):q=e[21];let V;e[22]!==F?(V=st(F),e[22]=F,e[23]=V):V=e[23];let Y;e[24]!==q||e[25]!==V?(Y=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",V," out"]}),e[24]=q,e[25]=V,e[26]=Y):Y=e[26];let B;e[27]!==I?(B=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=B):B=e[28];let G;e[29]!==D?(G=D>0?Vt(D):"—",e[29]=D,e[30]=G):G=e[30];let A;e[31]!==D?(A=D===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=D,e[32]=A):A=e[32];let N;e[33]!==I||e[34]!==D?(N=D>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=D,e[35]=N):N=e[35];let M;e[36]!==I?(M=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=M):M=e[37];const H=_e,te="AI Errors",Q=g.totalErrors.toLocaleString();let re;e[38]!==g.data?(re=t.jsx(Me,{data:g.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=g.data,e[39]=re):re=e[39];let W;e[40]!==I||e[41]!==g.totalErrors?(W=g.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=g.totalErrors,e[42]=W):W=e[42];let ne;return e[43]!==H||e[44]!==Q||e[45]!==re||e[46]!==W?(ne=t.jsxs(H,{title:te,value:Q,children:[re,W]}),e[43]=H,e[44]=Q,e[45]=re,e[46]=W,e[47]=ne):ne=e[47],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[P,t.jsxs(_e,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:O,connections:i,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(_e,{title:"Latency",value:pt($==="avg"?S.avgDurationMs:S.p95DurationMs),action:L,children:[t.jsx(Me,{data:S.data,dataKey:$,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:O,connections:i,mode:"latency",total:S.totalCalls})]}),t.jsxs(_e,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(Me,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:O,connections:i,mode:"errors",total:S.totalErrors})]})]}),z,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(_e,{title:"AI Calls",value:g.totalCalls.toLocaleString(),children:[t.jsx(Me,{data:g.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),E]}),t.jsxs(_e,{title:"Tokens",value:U,action:Y,children:[t.jsx(Me,{data:g.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),B]}),t.jsxs(_e,{title:"Cost",value:G,action:A,children:[t.jsx(Me,{data:g.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(_e,{title:"AI Latency",value:pt(g.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(g.p95DurationMs)]}),children:[t.jsx(Me,{data:g.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),M]}),ne]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=de("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(lr),e[4]=c):c=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[c,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=i):i=e[5];let n;return e[6]!==l?(n=t.jsxs(Ht,{className:l,children:[a,i]}),e[6]=l,e[7]=n):n=e[7],n}function lr(s,e){return t.jsxs("div",{className:de("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function or(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function ar(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:c,lastLogRef:i}=s;let n,d;if(e[0]!==r.timestamp){const $=new Date(r.timestamp);n=$.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=$.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=d}else n=e[1],d=e[2];const f=d,p=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==p||e[4]!==v?(b=t.jsx(Fe,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:p,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=p,e[4]=v,e[5]=b):b=e[5];let u;e[6]!==r.toolName?(u=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=u):u=e[7];const R=l?.title??r.connectionId;let h;e[8]!==R?(h=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:R}),e[8]=R,e[9]=h):h=e[9];let j;e[10]!==u||e[11]!==h?(j=t.jsxs(Fe,{className:"min-w-0 pr-2 md:pr-4",children:[u,h]}),e[10]=u,e[11]=h,e[12]=j):j=e[12];let m;e[13]!==o||e[14]!==a?(m=t.jsx(Fe,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=m):m=e[15];let C;e[16]!==r.userImage||e[17]!==r.userName?(C=t.jsx(Bt,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=C):C=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let g;e[21]!==C||e[22]!==S?(g=t.jsx(Fe,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[C,S]})}),e[21]=C,e[22]=S,e[23]=g):g=e[23];let _;e[24]!==n?(_=t.jsx("div",{children:n}),e[24]=n,e[25]=_):_=e[25];let I;e[26]!==f?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:f}),e[26]=f,e[27]=I):I=e[27];let x;e[28]!==_||e[29]!==I?(x=t.jsxs(Fe,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[_,I]}),e[28]=_,e[29]=I,e[30]=x):x=e[30];let F;e[31]!==r.durationMs?(F=t.jsxs(Fe,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=F):F=e[32];const w=r.isError?"destructive":"success",D=r.isError?"Error":"OK";let k;e[33]!==w||e[34]!==D?(k=t.jsx(Fe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:w,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:D})})}),e[33]=w,e[34]=D,e[35]=k):k=e[35];let O;return e[36]!==i||e[37]!==c||e[38]!==g||e[39]!==x||e[40]!==F||e[41]!==k||e[42]!==b||e[43]!==j||e[44]!==m?(O=t.jsxs(ut,{ref:i,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[b,j,m,g,x,F,k]}),e[36]=i,e[37]=c,e[38]=g,e[39]=x,e[40]=F,e[41]=k,e[42]=b,e[43]=j,e[44]=m,e[45]=O):O=e[45],O}function nr(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:c,logs:i,hasMore:n,onLoadMore:d,isLoadingMore:f,connections:p,virtualMcps:v,membersData:b,client:u}=s,R=p??[],h=v??[],[j,m]=K.useState(null),C=Vs(d,n,f),S=Ut(b),g=new Map(S.map(mr)),_=new Map(h.map(dr));let x=i.map(N=>{const M=g.get(N.userId??""),H=N.virtualMcpId?_.get(N.virtualMcpId):null;return{...N,userName:M?.name??N.userId??"Unknown",userImage:M?.image??void 0,virtualMcpName:H?.title??null,virtualMcpIcon:H?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=M=>r.includes(M.connectionId),e[0]=r,e[1]=N):N=e[1],x=x.filter(N)}if(l.length>1){let N;e[2]!==l?(N=M=>M.virtualMcpId&&l.includes(M.virtualMcpId),e[2]=l,e[3]=N):N=e[3],x=x.filter(N)}const F=new Map(R.map(cr));if(c){const N=c.toLowerCase();x=x.filter(M=>M.toolName.toLowerCase().includes(N)||(F.get(M.connectionId)?.title??M.connectionId).toLowerCase().includes(N)||M.errorMessage?.toLowerCase().includes(N))}const w=j!==null?x[j]??null:null,D=wt({queryKey:it.monitoringLogDetail(w?.id??""),queryFn:async()=>{if(!u)throw new Error("MCP client is not available");const N=await u.callTool({name:"MONITORING_LOG_GET",arguments:{id:w.id}});return N.structuredContent??N},enabled:w!==null}),k=D.data?.log,O=w&&k?{...w,input:k.input,output:k.output}:w;if(x.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const M=c||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let H;return e[5]!==M?(H=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(St,{image:N,title:"No logs found",description:M})}),e[5]=M,e[6]=H):H=e[6],H}const $="flex-1 flex flex-col min-w-0",J="flex-1 min-w-0 pt-1",P="min-w-[600px] md:min-w-0",X=Qt,y="w-full border-collapse";let T;e[7]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(ae,{className:"w-5"}),t.jsx(ae,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(ae,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(ae,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(ae,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),t.jsx(ae,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Latency"}),t.jsx(ae,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[7]=T):T=e[7];const L=Gt,z=x.map((N,M)=>t.jsx(ar,{log:N,connection:F.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>m(M),lastLogRef:M===x.length-1?C:void 0},N.id));let E;e[8]!==L||e[9]!==z?(E=t.jsx(L,{children:z}),e[8]=L,e[9]=z,e[10]=E):E=e[10];let U;e[11]!==X||e[12]!==T||e[13]!==E?(U=t.jsx("div",{className:J,children:t.jsx("div",{className:P,children:t.jsxs(X,{className:y,children:[T,E]})})}),e[11]=X,e[12]=T,e[13]=E,e[14]=U):U=e[14];const q=j!==null;let V;e[15]!==m?(V=N=>{N||m(null)},e[15]=m,e[16]=V):V=e[16];const Y=w&&j!==null&&t.jsxs(t.Fragment,{children:[t.jsx(Os,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:F.get(w.connectionId)?.icon||null,name:F.get(w.connectionId)?.title??w.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Es,{className:"text-sm leading-snug truncate",children:w.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:F.get(w.connectionId)?.title??w.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(ir),disabled:j===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(cs,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>m(N=>N!==null&&N<x.length-1?N+1:N),disabled:j===x.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(Kt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:D.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"size-5 border-2 border-muted-foreground/30 border-t-muted-foreground rounded-full animate-spin"})}):D.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:"Failed to load log details"}),t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>D.refetch(),children:"Retry"})]}):t.jsx(Hs,{log:O})})]});let B;e[17]!==Y?(B=t.jsx(Ps,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:Y}),e[17]=Y,e[18]=B):B=e[18];let G;e[19]!==V||e[20]!==B||e[21]!==q?(G=t.jsx(As,{open:q,onOpenChange:V,children:B}),e[19]=V,e[20]=B,e[21]=q,e[22]=G):G=e[22];let A;return e[23]!==G||e[24]!==U?(A=t.jsxs("div",{className:$,children:[U,G]}),e[23]=G,e[24]=U,e[25]=A):A=e[25],A}function ir(s){return s!==null&&s>0?s-1:s}function cr(s){return[s.id,s]}function dr(s){return[s.id,s]}function mr(s){return[s.userId,s.user]}function ur(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ae,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ae,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ae,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(ae,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ae,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ae,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=c):c=s[5];let i;s[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,c,t.jsx(ae,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=i):i=s[6];let n;return s[7]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(Qt,{className:"w-full border-collapse",children:[i,t.jsx(Gt,{children:Array.from({length:8}).map(xr)})]})})}),s[7]=n):n=s[7],n}function xr(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const bt=Object.assign(nr,{Skeleton:ur});function fr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:c,streamingRefetchInterval:i,connectionIds:n,virtualMcpIds:d,tool:f,status:p,searchQuery:v,allConnections:b,allVirtualMcps:u,membersData:R}=s;let h;e[0]!==a||e[1]!==l?(h=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=h):h=e[2];let j;e[3]!==a||e[4]!==r||e[5]!==o?(j=async J=>{const{pageParam:P}=J,X=P===void 0?0:P;if(!r)throw new Error("MCP client is not available");const y=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:X}});return y.structuredContent??y},e[3]=a,e[4]=r,e[5]=o,e[6]=j):j=e[6];let m;e[7]!==o?(m=(J,P)=>{if(!((J?.logs?.length??0)<o))return P.length*o},e[7]=o,e[8]=m):m=e[8];const C=c?i:!1;let S;e[9]!==h||e[10]!==j||e[11]!==m||e[12]!==C?(S={queryKey:h,queryFn:j,initialPageParam:0,getNextPageParam:m,staleTime:0,refetchInterval:C},e[9]=h,e[10]=j,e[11]=m,e[12]=C,e[13]=S):S=e[13];const{data:g,fetchNextPage:_,hasNextPage:I,isFetchingNextPage:x}=zs(S);let F;e[14]!==g.pages?(F=g.pages.flatMap(pr),e[14]=g.pages,e[15]=F):F=e[15];const w=F;let D;e[16]!==_||e[17]!==I||e[18]!==x?(D=()=>{I&&!x&&_()},e[16]=_,e[17]=I,e[18]=x,e[19]=D):D=e[19];const k=D,O=I??!1;let $;return e[20]!==b||e[21]!==u||e[22]!==r||e[23]!==n||e[24]!==k||e[25]!==x||e[26]!==R||e[27]!==w||e[28]!==v||e[29]!==p||e[30]!==O||e[31]!==f||e[32]!==d?($=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(bt,{connectionIds:n,virtualMcpIds:d,tool:f,status:p,search:v,logs:w,hasMore:O,onLoadMore:k,isLoadingMore:x,connections:b,virtualMcps:u,membersData:R,client:r})})})}),e[20]=b,e[21]=u,e[22]=r,e[23]=n,e[24]=k,e[25]=x,e[26]=R,e[27]=w,e[28]=v,e[29]=p,e[30]=O,e[31]=f,e[32]=d,e[33]=$):$=e[33],$}function pr(s){return s.logs??[]}function hr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Us(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const c=o,[i,n]=K.useState(null),d=i??c[0]?.id??null,{data:f}=Ks(d??"");let p;e[2]!==r.startDate?(p=r.startDate.toISOString(),e[2]=r.startDate,e[3]=p):p=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==p||e[7]!==v?(b={startDate:p,endDate:v},e[6]=p,e[7]=v,e[8]=b):b=e[8];const u=b;let R;return e[9]!==f||e[10]!==c||e[11]!==d||e[12]!==a||e[13]!==u?(R=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):c.length===0?t.jsx("div",{className:"py-16",children:t.jsx(St,{title:"No automations",description:"Create an automation to see its runs and usage here."})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(nt,{value:d??"",onValueChange:h=>n(h),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:c.map(jr)})]})}),f?t.jsx(Cs,{automationId:f.id,triggerIds:f.triggers.map(gr),range:u}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=f,e[10]=c,e[11]=d,e[12]=a,e[13]=u,e[14]=R):R=e[14],R}function gr(s){return s.id}function jr(s){return t.jsx($e,{value:s.id,children:s.name},s.id)}const vr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Nr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:c,virtualMcpOptions:i,activeFiltersCount:n,onUpdateFilters:d,onConnectionSearchChange:f,memberOptions:p,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:u}){const[R,h]=K.useState(!1),[j,m]=K.useState("form"),[C,S]=K.useState(r),[g,_]=K.useState(o),[I,x]=K.useState(Ye(o)),F=K.useRef(r),w=K.useRef(Re(o));F.current!==r&&(F.current=r,C!==r&&S(r));const D=Re(o);w.current!==D&&(w.current=D,_(o),x(Ye(o)));const k=(y,T)=>{const L=[...g],z=L[y];z&&(L[y]={key:T.key??z.key,operator:T.operator??z.operator,value:T.value??z.value},_(L))},O=()=>{_([...g,{key:"",operator:"eq",value:""}])},$=y=>{const T=g.filter((L,z)=>z!==y);_(T),x(Ye(T)),d({propertyFilters:Re(T)})},J=()=>{d({propertyFilters:Re(g)})},P=()=>{const y=Ft(I);_(y),d({propertyFilters:Re(y)})},X=()=>{if(j==="raw"){const y=Ft(I);_(y),m("form")}else x(Ye(g)),m("raw")};return t.jsxs(ct,{open:R,onOpenChange:h,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(At,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(Ls,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ds,{id:"hide-system-calls",checked:a,onCheckedChange:y=>d({hideSystem:!!y})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:c,defaultValue:s,onValueChange:y=>d({connectionId:y}),onSearchChange:f,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:i,defaultValue:e,onValueChange:y=>d({virtualMcpId:y}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),u&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(ht,{options:p??[],defaultValue:v,onValueChange:y=>b?.(y),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Ge,{id:"filter-tool",placeholder:"Filter by tool...",value:C,onChange:y=>S(y.target.value),onBlur:()=>{C!==r&&d({tool:C})},onKeyDown:y=>{y.key==="Enter"&&C!==r&&d({tool:C})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),t.jsxs(nt,{value:l,onValueChange:y=>d({status:y}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx($e,{value:"all",children:"All Status"}),t.jsx($e,{value:"success",children:"Success Only"}),t.jsx($e,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:X,children:j==="raw"?t.jsx(Ns,{size:14}):t.jsx(fs,{size:14})})}),t.jsx(tt,{children:j==="raw"?"Switch to form view":"Switch to raw text"})]})]}),j==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(_s,{placeholder:`Paste property filters here:
|
|
6
6
|
thread_id=abc123
|
|
7
7
|
user~test
|
|
8
|
-
debug?`,value:I,onChange:y=>x(y.target.value),onBlur:P,onKeyDown:y=>{y.key==="Enter"&&y.metaKey&&P()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[g.map((y,T)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",T+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>$(T),children:t.jsx(ys,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:y.key,onChange:L=>k(T,{key:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:y.operator,onValueChange:L=>{const z=[...g],E=z[T];E&&(z[T]={...E,operator:L,value:L==="exists"?"":E.value},_(z),d({propertyFilters:Re(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map(L=>t.jsx($e,{value:L.value,children:L.label},L.value))})]})]}),y.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:y.value,onChange:L=>k(T,{value:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"w-full font-mono text-sm"})]},T)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[t.jsx(bs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),_([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:i,status:n,search:d,streaming:f,hideSystem:p,activeFiltersCount:v,from:b,to:u,propertyFilters:R,onUpdateFilters:h,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,S=vt(),g=vs(),{data:_}=ps(),[I,x]=K.useState(""),F=I||void 0;let w;e[0]!==F?(w={searchTerm:F},e[0]=F,e[1]=w):w=e[1];const D=vt(w);let k;e[2]!==D?(k=D??[],e[2]=D,e[3]=k):k=e[3];let O;e[4]!==k?(O=k.map(Sr),e[4]=k,e[5]=O):O=e[5];const $=O;let J;e[6]!==g?(J=g.map(wr),e[6]=g,e[7]=J):J=e[7];const P=J,{pageSize:X,streamingRefetchInterval:y}=Nt,{org:T,locator:L}=Be();let z;e[8]!==T.id||e[9]!==T.slug?(z={connectionId:hs,orgId:T.id,orgSlug:T.slug},e[8]=T.id,e[9]=T.slug,e[10]=z):z=e[10];const E=gs(z);let U;e[11]!==R?(U=Bs(R),e[11]=R,e[12]=U):U=e[12];const q=U;let V;e[13]!==p||e[14]!==T.id?(V=p?[js.SELF(T.id)]:void 0,e[13]=p,e[14]=T.id,e[15]=V):V=e[15];const Y=V;let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=[],e[16]=B):B=e[16];const[G,A]=K.useState(B);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[M,H]=K.useState(N);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,re]=K.useState(te),[W,ne]=K.useState("all"),ce=(M.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let ze;e[19]!==_?(ze=Ut(_).map(yr),e[19]=_,e[20]=ze):ze=e[20];const Ie=ze;let Ce;e[21]!==l.startDate?(Ce=l.startDate.toISOString(),e[21]=l.startDate,e[22]=Ce):Ce=e[22];let ie;e[23]!==l.endDate?(ie=l.endDate.toISOString(),e[23]=l.endDate,e[24]=ie):ie=e[24];const Le=o.length===1?o[0]:void 0,ge=c.length===1?c[0]:void 0,je=i||void 0,ve=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==q||e[27]!==Ce||e[28]!==ie||e[29]!==Le||e[30]!==ge||e[31]!==je||e[32]!==ve?(me={startDate:Ce,endDate:ie,connectionId:Le,excludeConnectionIds:Y,virtualMcpId:ge,toolName:je,isError:ve,...q},e[25]=Y,e[26]=q,e[27]=Ce,e[28]=ie,e[29]=Le,e[30]=ge,e[31]=je,e[32]=ve,e[33]=me):me=e[33];const Ne=me;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"overview",label:"Overview"},e[34]=ue):ue=e[34];let xe;e[35]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"audit",label:"Audit"},e[35]=xe):xe=e[35];let fe;e[36]===Symbol.for("react.memo_cache_sentinel")?(fe={id:"threads",label:"Threads"},e[36]=fe):fe=e[36];let pe;e[37]===Symbol.for("react.memo_cache_sentinel")?(pe=[ue,xe,fe,{id:"automations",label:"Automations"}],e[37]=pe):pe=e[37];const ke=pe;let we;e[38]===Symbol.for("react.memo_cache_sentinel")?(we=t.jsx(De.Title,{children:"Monitoring"}),e[38]=we):we=e[38];let se;e[39]!==C?(se=Te=>C(Te),e[39]=C,e[40]=se):se=e[40];let ee;e[41]!==se||e[42]!==r?(ee=t.jsx(qt,{tabs:ke,activeTab:r,onTabChange:se}),e[41]=se,e[42]=r,e[43]=ee):ee=e[43];let oe;e[44]!==v||e[45]!==o||e[46]!==$||e[47]!==I||e[48]!==p||e[49]!==f||e[50]!==G||e[51]!==Ie||e[52]!==m||e[53]!==h||e[54]!==R||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==c||e[59]!==P?(oe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:f?"secondary":"outline",className:"gap-1.5",onClick:m,children:[f&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),f&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:c,tool:i,status:n,hideSystem:p,propertyFilters:R,connectionOptions:$,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:h,connectionSearchTerm:I,onConnectionSearchChange:x,memberOptions:Ie,llmUserIds:G,onLlmUserIdsChange:A,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=$,e[47]=I,e[48]=p,e[49]=f,e[50]=G,e[51]=Ie,e[52]=m,e[53]=h,e[54]=R,e[55]=n,e[56]=r,e[57]=i,e[58]=c,e[59]=P,e[60]=oe):oe=e[60];let he;e[61]!==Ie||e[62]!==r||e[63]!==ce||e[64]!==M||e[65]!==W||e[66]!==Q||e[67]!==P?(he=r==="threads"&&t.jsx(ks,{filterAgentIds:M,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ie,activeFiltersCount:ce,onUpdateFilters:Te=>{const{filterAgentIds:It,filterUserIds:Ct,filterStatus:kt}=Te;It!==void 0&&H(It),Ct!==void 0&&re(Ct),kt!==void 0&&ne(kt)}}),e[61]=Ie,e[62]=r,e[63]=ce,e[64]=M,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let be;e[69]!==b||e[70]!==u?(be={from:b,to:u},e[69]=b,e[70]=u,e[71]=be):be=e[71];let Oe;e[72]!==j||e[73]!==be?(Oe=t.jsx(Ys,{value:be,onChange:j}),e[72]=j,e[73]=be,e[74]=Oe):Oe=e[74];let Ee;e[75]!==oe||e[76]!==he||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[oe,he,Oe]}),e[75]=oe,e[76]=he,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ee||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ee]}),e[79]=ee,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==h||e[83]!==d||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(as,{value:d,onChange:Te=>h({search:Te}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Te=>{Te.key==="Escape"&&(h({search:""}),Te.target.blur())},className:"w-full md:w-[375px]"}),e[82]=h,e[83]=d,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(De.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[we,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==g||e[91]!==Ne||e[92]!==E||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==Y||e[97]!==f||e[98]!==G||e[99]!==L||e[100]!==_||e[101]!==d||e[102]!==n||e[103]!==r||e[104]!==M||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Ts,{client:E,locator:L,membersData:_,allConnections:S,allVirtualMcps:g,dateRange:l,searchQuery:d,filterAgentIds:M,filterUserIds:Q,filterStatus:W}):r==="audit"?t.jsx(fr,{client:E,locator:L,baseParams:Ne,pageSize:X,isStreaming:f,streamingRefetchInterval:y,connectionIds:o,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:S,allVirtualMcps:g,membersData:_}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:f,streamingRefetchInterval:y,llmUserIds:G})}),e[89]=S,e[90]=g,e[91]=Ne,e[92]=E,e[93]=o,e[94]=l,e[95]=a,e[96]=Y,e[97]=f,e[98]=G,e[99]=L,e[100]=_,e[101]=d,e[102]=n,e[103]=r,e[104]=M,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Bt,{url:r,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Mo(){const s=le.c(83),{org:e}=Be(),r=yt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:i,connectionId:n,virtualMcpId:d,tool:f,search:p,status:v,streaming:b,propertyFilters:u,hideSystem:R}=a,h=o===void 0?"overview":o;let j;s[1]!==n?(j=n===void 0?[]:n,s[1]=n,s[2]=j):j=s[2];const m=j;let C;s[3]!==d?(C=d===void 0?[]:d,s[3]=d,s[4]=C):C=s[4];const S=C,g=b===void 0?!0:b,_=u===void 0?"":u,I=R===void 0?!1:R;let x,F,w,D,k,O,$;if(s[5]!==m.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==_||s[11]!==a||s[12]!==v||s[13]!==g||s[14]!==i||s[15]!==f||s[16]!==S.length){k=qs(_);let A;s[24]!==r||s[25]!==e.slug||s[26]!==a?(A=Q=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...Q}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=A):A=s[27],$=A;let N;s[28]!==$?(N=Q=>{$({from:Q.from,to:Q.to})},s[28]=$,s[29]=N):N=s[29],D=N;let M,H;if(s[30]!==c||s[31]!==g||s[32]!==i){const Q=ye(c),re=ye(i);H=Q.date||new Date(Date.now()-18e5);const W=re.date||new Date;w={startDate:H,endDate:W},M=W,g&&i==="now"&&(M=new Date(W),M.setHours(M.getHours()+1)),s[30]=c,s[31]=g,s[32]=i,s[33]=w,s[34]=M,s[35]=H}else w=s[33],M=s[34],H=s[35];let te;s[36]!==M||s[37]!==H?(te={startDate:H,endDate:M},s[36]=M,s[37]=H,s[38]=te):te=s[38],F=te,x=0,m.length>0&&x++,S.length>0&&x++,f&&x++,v!=="all"&&x++,I&&x++,O=k.filter(Ir),s[5]=m.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=_,s[11]=a,s[12]=v,s[13]=g,s[14]=i,s[15]=f,s[16]=S.length,s[17]=x,s[18]=F,s[19]=w,s[20]=D,s[21]=k,s[22]=O,s[23]=$}else x=s[17],F=s[18],w=s[19],D=s[20],k=s[21],O=s[22],$=s[23];const J=O;J.length>0&&(x=x+J.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(De.Body,{className:"!pb-3",children:t.jsx(De.Title,{children:"Monitoring"})}),s[39]=P):P=s[39];let X;s[40]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsxs(t.Fragment,{children:[P,t.jsx(De.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(St,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=X):X=s[40];let y;s[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De.Title,{children:"Monitoring"}),s[41]=y):y=s[41];let T;s[42]===Symbol.for("react.memo_cache_sentinel")?(T=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=T):T=s[42];let L;s[43]!==$?(L=A=>$({tab:A}),s[43]=$,s[44]=L):L=s[44];let z;s[45]!==L||s[46]!==h?(z=t.jsx(De.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[y,t.jsx(qt,{tabs:T,activeTab:h,onTabChange:L})]})}),s[45]=L,s[46]=h,s[47]=z):z=s[47];let E;s[48]!==h?(E=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):h==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(or,{})}),s[48]=h,s[49]=E):E=s[49];let U;s[50]!==z||s[51]!==E?(U=t.jsxs(t.Fragment,{children:[z,E]}),s[50]=z,s[51]=E,s[52]=U):U=s[52];let q;s[53]!==D?(q=A=>{xt("monitoring_time_range_changed",{from:A.from,to:A.to}),D(A)},s[53]=D,s[54]=q):q=s[54];let V;s[55]!==g||s[56]!==$?(V=()=>{xt("monitoring_live_toggled",{enabled:!g}),$({streaming:!g})},s[55]=g,s[56]=$,s[57]=V):V=s[57];let Y;s[58]!==h||s[59]!==$?(Y=A=>{A!==h&&xt("monitoring_tab_changed",{from_tab:h,to_tab:A}),$({tab:A})},s[58]=h,s[59]=$,s[60]=Y):Y=s[60];let B;s[61]!==x||s[62]!==m||s[63]!==F||s[64]!==w||s[65]!==c||s[66]!==I||s[67]!==k||s[68]!==p||s[69]!==v||s[70]!==g||s[71]!==q||s[72]!==V||s[73]!==Y||s[74]!==h||s[75]!==i||s[76]!==f||s[77]!==$||s[78]!==S?(B=t.jsx(br,{tab:h,dateRange:F,displayDateRange:w,connectionIds:m,virtualMcpIds:S,tool:f,status:v,search:p,streaming:g,hideSystem:I,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:$,onTimeRangeChange:q,onStreamingToggle:V,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=F,s[64]=w,s[65]=c,s[66]=I,s[67]=k,s[68]=p,s[69]=v,s[70]=g,s[71]=q,s[72]=V,s[73]=Y,s[74]=h,s[75]=i,s[76]=f,s[77]=$,s[78]=S,s[79]=B):B=s[79];let G;return s[80]!==U||s[81]!==B?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(De,{children:t.jsx(os,{fallback:X,children:t.jsx(K.Suspense,{fallback:U,children:B})})})}),s[80]=U,s[81]=B,s[82]=G):G=s[82],G}function Ir(s){return s.key.trim()}export{Mo as default};
|
|
8
|
+
debug?`,value:I,onChange:y=>x(y.target.value),onBlur:P,onKeyDown:y=>{y.key==="Enter"&&y.metaKey&&P()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[g.map((y,T)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",T+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>$(T),children:t.jsx(ys,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:y.key,onChange:L=>k(T,{key:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:y.operator,onValueChange:L=>{const z=[...g],E=z[T];E&&(z[T]={...E,operator:L,value:L==="exists"?"":E.value},_(z),d({propertyFilters:Re(z)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:vr.map(L=>t.jsx($e,{value:L.value,children:L.label},L.value))})]})]}),y.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:y.value,onChange:L=>k(T,{value:L.target.value}),onBlur:J,onKeyDown:L=>{L.key==="Enter"&&J()},className:"w-full font-mono text-sm"})]},T)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[t.jsx(bs,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),_([]),x(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!1)},children:"Clear all filters"})]})})]})}function br(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:i,status:n,search:d,streaming:f,hideSystem:p,activeFiltersCount:v,from:b,to:u,propertyFilters:R,onUpdateFilters:h,onTimeRangeChange:j,onStreamingToggle:m,onTabChange:C}=s,S=vt(),g=vs(),{data:_}=ps(),[I,x]=K.useState(""),F=I||void 0;let w;e[0]!==F?(w={searchTerm:F},e[0]=F,e[1]=w):w=e[1];const D=vt(w);let k;e[2]!==D?(k=D??[],e[2]=D,e[3]=k):k=e[3];let O;e[4]!==k?(O=k.map(Sr),e[4]=k,e[5]=O):O=e[5];const $=O;let J;e[6]!==g?(J=g.map(wr),e[6]=g,e[7]=J):J=e[7];const P=J,{pageSize:X,streamingRefetchInterval:y}=Nt,{org:T,locator:L}=Be();let z;e[8]!==T.id||e[9]!==T.slug?(z={connectionId:hs,orgId:T.id,orgSlug:T.slug},e[8]=T.id,e[9]=T.slug,e[10]=z):z=e[10];const E=gs(z);let U;e[11]!==R?(U=Bs(R),e[11]=R,e[12]=U):U=e[12];const q=U;let V;e[13]!==p||e[14]!==T.id?(V=p?[js.SELF(T.id)]:void 0,e[13]=p,e[14]=T.id,e[15]=V):V=e[15];const Y=V;let B;e[16]===Symbol.for("react.memo_cache_sentinel")?(B=[],e[16]=B):B=e[16];const[G,A]=K.useState(B);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[M,H]=K.useState(N);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,re]=K.useState(te),[W,ne]=K.useState("all"),ce=(M.length>0?1:0)+(Q.length>0?1:0)+(W!=="all"?1:0);let ze;e[19]!==_?(ze=Ut(_).map(yr),e[19]=_,e[20]=ze):ze=e[20];const Ie=ze;let Ce;e[21]!==l.startDate?(Ce=l.startDate.toISOString(),e[21]=l.startDate,e[22]=Ce):Ce=e[22];let ie;e[23]!==l.endDate?(ie=l.endDate.toISOString(),e[23]=l.endDate,e[24]=ie):ie=e[24];const Le=o.length===1?o[0]:void 0,ge=c.length===1?c[0]:void 0,je=i||void 0,ve=n==="errors"?!0:n==="success"?!1:void 0;let me;e[25]!==Y||e[26]!==q||e[27]!==Ce||e[28]!==ie||e[29]!==Le||e[30]!==ge||e[31]!==je||e[32]!==ve?(me={startDate:Ce,endDate:ie,connectionId:Le,excludeConnectionIds:Y,virtualMcpId:ge,toolName:je,isError:ve,...q},e[25]=Y,e[26]=q,e[27]=Ce,e[28]=ie,e[29]=Le,e[30]=ge,e[31]=je,e[32]=ve,e[33]=me):me=e[33];const Ne=me;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"overview",label:"Overview"},e[34]=ue):ue=e[34];let xe;e[35]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"audit",label:"Audit"},e[35]=xe):xe=e[35];let fe;e[36]===Symbol.for("react.memo_cache_sentinel")?(fe={id:"threads",label:"Threads"},e[36]=fe):fe=e[36];let pe;e[37]===Symbol.for("react.memo_cache_sentinel")?(pe=[ue,xe,fe,{id:"automations",label:"Automations"}],e[37]=pe):pe=e[37];const ke=pe;let we;e[38]===Symbol.for("react.memo_cache_sentinel")?(we=t.jsx(De.Title,{children:"Monitoring"}),e[38]=we):we=e[38];let se;e[39]!==C?(se=Te=>C(Te),e[39]=C,e[40]=se):se=e[40];let ee;e[41]!==se||e[42]!==r?(ee=t.jsx(qt,{tabs:ke,activeTab:r,onTabChange:se}),e[41]=se,e[42]=r,e[43]=ee):ee=e[43];let oe;e[44]!==v||e[45]!==o||e[46]!==$||e[47]!==I||e[48]!==p||e[49]!==f||e[50]!==G||e[51]!==Ie||e[52]!==m||e[53]!==h||e[54]!==R||e[55]!==n||e[56]!==r||e[57]!==i||e[58]!==c||e[59]!==P?(oe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:f?"secondary":"outline",className:"gap-1.5",onClick:m,children:[f&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),f&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Nr,{connectionIds:o,virtualMcpIds:c,tool:i,status:n,hideSystem:p,propertyFilters:R,connectionOptions:$,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:h,connectionSearchTerm:I,onConnectionSearchChange:x,memberOptions:Ie,llmUserIds:G,onLlmUserIdsChange:A,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=$,e[47]=I,e[48]=p,e[49]=f,e[50]=G,e[51]=Ie,e[52]=m,e[53]=h,e[54]=R,e[55]=n,e[56]=r,e[57]=i,e[58]=c,e[59]=P,e[60]=oe):oe=e[60];let he;e[61]!==Ie||e[62]!==r||e[63]!==ce||e[64]!==M||e[65]!==W||e[66]!==Q||e[67]!==P?(he=r==="threads"&&t.jsx(ks,{filterAgentIds:M,filterUserIds:Q,filterStatus:W,virtualMcpOptions:P,memberOptions:Ie,activeFiltersCount:ce,onUpdateFilters:Te=>{const{filterAgentIds:It,filterUserIds:Ct,filterStatus:kt}=Te;It!==void 0&&H(It),Ct!==void 0&&re(Ct),kt!==void 0&&ne(kt)}}),e[61]=Ie,e[62]=r,e[63]=ce,e[64]=M,e[65]=W,e[66]=Q,e[67]=P,e[68]=he):he=e[68];let be;e[69]!==b||e[70]!==u?(be={from:b,to:u},e[69]=b,e[70]=u,e[71]=be):be=e[71];let Oe;e[72]!==j||e[73]!==be?(Oe=t.jsx(Ys,{value:be,onChange:j}),e[72]=j,e[73]=be,e[74]=Oe):Oe=e[74];let Ee;e[75]!==oe||e[76]!==he||e[77]!==Oe?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[oe,he,Oe]}),e[75]=oe,e[76]=he,e[77]=Oe,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ee||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ee,Ee]}),e[79]=ee,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==h||e[83]!==d||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(as,{value:d,onChange:Te=>h({search:Te}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Te=>{Te.key==="Escape"&&(h({search:""}),Te.target.blur())},className:"w-full md:w-[375px]"}),e[82]=h,e[83]=d,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(De.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[we,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==g||e[91]!==Ne||e[92]!==E||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==Y||e[97]!==f||e[98]!==G||e[99]!==L||e[100]!==_||e[101]!==d||e[102]!==n||e[103]!==r||e[104]!==M||e[105]!==W||e[106]!==Q||e[107]!==i||e[108]!==c?(Ue=r==="automations"?t.jsx(hr,{dateRange:l}):r==="threads"?t.jsx(Ts,{client:E,locator:L,membersData:_,allConnections:S,allVirtualMcps:g,dateRange:l,searchQuery:d,filterAgentIds:M,filterUserIds:Q,filterStatus:W}):r==="audit"?t.jsx(fr,{client:E,locator:L,baseParams:Ne,pageSize:X,isStreaming:f,streamingRefetchInterval:y,connectionIds:o,virtualMcpIds:c,tool:i,status:n,searchQuery:d,allConnections:S,allVirtualMcps:g,membersData:_}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(rr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:Y,toolName:i||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:f,streamingRefetchInterval:y,llmUserIds:G})}),e[89]=S,e[90]=g,e[91]=Ne,e[92]=E,e[93]=o,e[94]=l,e[95]=a,e[96]=Y,e[97]=f,e[98]=G,e[99]=L,e[100]=_,e[101]=d,e[102]=n,e[103]=r,e[104]=M,e[105]=W,e[106]=Q,e[107]=i,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function yr(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Bt,{url:r,fallback:e,shape:"circle",size:"2xs",className:de("shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function Sr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:de("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function _o(){const s=le.c(83),{org:e}=Be(),r=yt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:i,connectionId:n,virtualMcpId:d,tool:f,search:p,status:v,streaming:b,propertyFilters:u,hideSystem:R}=a,h=o===void 0?"overview":o;let j;s[1]!==n?(j=n===void 0?[]:n,s[1]=n,s[2]=j):j=s[2];const m=j;let C;s[3]!==d?(C=d===void 0?[]:d,s[3]=d,s[4]=C):C=s[4];const S=C,g=b===void 0?!0:b,_=u===void 0?"":u,I=R===void 0?!1:R;let x,F,w,D,k,O,$;if(s[5]!==m.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==_||s[11]!==a||s[12]!==v||s[13]!==g||s[14]!==i||s[15]!==f||s[16]!==S.length){k=qs(_);let A;s[24]!==r||s[25]!==e.slug||s[26]!==a?(A=Q=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...Q}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=A):A=s[27],$=A;let N;s[28]!==$?(N=Q=>{$({from:Q.from,to:Q.to})},s[28]=$,s[29]=N):N=s[29],D=N;let M,H;if(s[30]!==c||s[31]!==g||s[32]!==i){const Q=ye(c),re=ye(i);H=Q.date||new Date(Date.now()-18e5);const W=re.date||new Date;w={startDate:H,endDate:W},M=W,g&&i==="now"&&(M=new Date(W),M.setHours(M.getHours()+1)),s[30]=c,s[31]=g,s[32]=i,s[33]=w,s[34]=M,s[35]=H}else w=s[33],M=s[34],H=s[35];let te;s[36]!==M||s[37]!==H?(te={startDate:H,endDate:M},s[36]=M,s[37]=H,s[38]=te):te=s[38],F=te,x=0,m.length>0&&x++,S.length>0&&x++,f&&x++,v!=="all"&&x++,I&&x++,O=k.filter(Ir),s[5]=m.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=_,s[11]=a,s[12]=v,s[13]=g,s[14]=i,s[15]=f,s[16]=S.length,s[17]=x,s[18]=F,s[19]=w,s[20]=D,s[21]=k,s[22]=O,s[23]=$}else x=s[17],F=s[18],w=s[19],D=s[20],k=s[21],O=s[22],$=s[23];const J=O;J.length>0&&(x=x+J.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(De.Body,{className:"!pb-3",children:t.jsx(De.Title,{children:"Monitoring"})}),s[39]=P):P=s[39];let X;s[40]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsxs(t.Fragment,{children:[P,t.jsx(De.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(St,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=X):X=s[40];let y;s[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De.Title,{children:"Monitoring"}),s[41]=y):y=s[41];let T;s[42]===Symbol.for("react.memo_cache_sentinel")?(T=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=T):T=s[42];let L;s[43]!==$?(L=A=>$({tab:A}),s[43]=$,s[44]=L):L=s[44];let z;s[45]!==L||s[46]!==h?(z=t.jsx(De.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[y,t.jsx(qt,{tabs:T,activeTab:h,onTabChange:L})]})}),s[45]=L,s[46]=h,s[47]=z):z=s[47];let E;s[48]!==h?(E=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):h==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(bt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(or,{})}),s[48]=h,s[49]=E):E=s[49];let U;s[50]!==z||s[51]!==E?(U=t.jsxs(t.Fragment,{children:[z,E]}),s[50]=z,s[51]=E,s[52]=U):U=s[52];let q;s[53]!==D?(q=A=>{xt("monitoring_time_range_changed",{from:A.from,to:A.to}),D(A)},s[53]=D,s[54]=q):q=s[54];let V;s[55]!==g||s[56]!==$?(V=()=>{xt("monitoring_live_toggled",{enabled:!g}),$({streaming:!g})},s[55]=g,s[56]=$,s[57]=V):V=s[57];let Y;s[58]!==h||s[59]!==$?(Y=A=>{A!==h&&xt("monitoring_tab_changed",{from_tab:h,to_tab:A}),$({tab:A})},s[58]=h,s[59]=$,s[60]=Y):Y=s[60];let B;s[61]!==x||s[62]!==m||s[63]!==F||s[64]!==w||s[65]!==c||s[66]!==I||s[67]!==k||s[68]!==p||s[69]!==v||s[70]!==g||s[71]!==q||s[72]!==V||s[73]!==Y||s[74]!==h||s[75]!==i||s[76]!==f||s[77]!==$||s[78]!==S?(B=t.jsx(br,{tab:h,dateRange:F,displayDateRange:w,connectionIds:m,virtualMcpIds:S,tool:f,status:v,search:p,streaming:g,hideSystem:I,activeFiltersCount:x,from:c,to:i,propertyFilters:k,onUpdateFilters:$,onTimeRangeChange:q,onStreamingToggle:V,onTabChange:Y}),s[61]=x,s[62]=m,s[63]=F,s[64]=w,s[65]=c,s[66]=I,s[67]=k,s[68]=p,s[69]=v,s[70]=g,s[71]=q,s[72]=V,s[73]=Y,s[74]=h,s[75]=i,s[76]=f,s[77]=$,s[78]=S,s[79]=B):B=s[79];let G;return s[80]!==U||s[81]!==B?(G=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(De,{children:t.jsx(os,{fallback:X,children:t.jsx(K.Suspense,{fallback:U,children:B})})})}),s[80]=U,s[81]=B,s[82]=G):G=s[82],G}function Ir(s){return s.key.trim()}export{_o as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,ag as R}from"./index-
|
|
1
|
+
import{r as a,ag as R}from"./index-B37Lpv5S.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-B37Lpv5S.js";import{m as w}from"./sidebar-DLjbCYfe.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bg as st,bh as q,bi as De,C as c,ak as A,aF as Y,bj as Le,aC as _,bk as pe,bl as G,aD as ee,bm as le,z as p,bn as He,bo as Ve,bp as nt,bq as it,br as Ke,bs as ot,bt as at,bu as lt,bv as Ye,bw as ct,b6 as Z,bx as ut,aE as K,by as dt,c as U,r as F,l as _e,j as o,aP as Qe,w as Ue,a as ft,t as xe,B as Ce,i as $e,b as mt,E as ht,aa as pt}from"./index-B37Lpv5S.js";import{P as ce}from"./index-ZjRHn464.js";import{E as Xe}from"./empty-state-B4c8fq4i.js";import{A as gt,f as bt,h as yt,n as xt,j as vt,k as wt,i as St,u as jt}from"./use-mcp-client-CX47WlCL.js";import{c as _t}from"./use-mcp-tools-C37oT0bu.js";import{c as Ct}from"./ZoomOut-DXDDUqzg.js";import{i as Et}from"./Key01-C3jXuyTV.js";import{b as Nt,u as Ot,a as Tt}from"./use-connection-CQmB3ngS.js";import{U as ue,a as Ne,e as We}from"./auth-B2SyT5jq.js";import{i as kt,c as It,d as Pt,e as Mt}from"./extract-connection-data-D9jcQvie.js";import{u as At}from"./use-registry-connections-sALt7ACC.js";import{b as Rt}from"./use-organization-settings-Cw-0oyZX.js";import{s as Lt}from"./Plus-pFzKRSyH.js";import{d as Ht,b as Ut,c as $t,S as Ft,a as Bt}from"./select-Dm5gSFeK.js";import{F as Dt,v as Vt}from"./Form-DLIz5vwr.js";import"./index-CAIYCRJp.js";import{A as et}from"./agent-icon-B9Rg96af.js";import{I as Wt}from"./input-D3OR9wlV.js";import{a as qt,b as zt,P as Gt}from"./popover-voqJlCLR.js";import{b as Jt,a as Zt,c as Kt,T as Yt}from"./tooltip-Bjh8CXdQ.js";import{u as Qt}from"./use-virtual-mcp-ByWPjIzd.js";import{i as Xt}from"./ChevronUp-CIoJSXpm.js";import{i as er}from"./SearchMd-BiaNZC1b.js";import{a as tr}from"./Users03-vYWz866I.js";import{u as rr}from"./use-mobile-BsQGJSz8.js";import{u as sr}from"./use-create-virtual-mcp-BbhHiNda.js";function nr(){const t=new gt({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return st(t),t}class ir{#e=nr();#t=new Map;#r=new WeakMap;getValidator(e){const r=this.#r.get(e);if(r)return r;let s;const n=i=>{if(!s){const a=or(e);let l=this.#t.get(a);l||(l=this.#e.compile(e),this.#t.set(a,l)),s=l}return s(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(s.errors)}};return this.#r.set(e,n),n}}function or(t){return JSON.stringify(t,(e,r)=>r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.keys(r).sort().map(s=>[s,r[s]])):r)}const ar=new ir;var lr=class{apply(t,e){if(!e.type)return;const r=Array.isArray(e.type)?e.type:[e.type],s=new Set(r);if(s.has("string")||(t.string=!1),!s.has("number")&&!s.has("integer")&&(t.number=!1),s.has("boolean")||(t.boolean=!1),s.has("null")||(t.null=!1),s.has("array")||(t.array=!1),s.has("object")||(t.object=!1),s.has("integer")&&t.number!==!1){const n=t.number||A();n instanceof le&&(t.number=n.int())}}},cr=class{apply(t,e){if(e.const===void 0)return;const r=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof r=="string"?t.string=G(r):typeof r=="number"?t.number=G(r):typeof r=="boolean"?t.boolean=G(r):r===null?t.null=Le():Array.isArray(r)?t.array=void 0:typeof r=="object"&&(t.object=void 0)}},ur=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const r={string:e.enum.filter(s=>typeof s=="string"),number:e.enum.filter(s=>typeof s=="number"),boolean:e.enum.filter(s=>typeof s=="boolean"),null:e.enum.filter(s=>s===null),array:e.enum.filter(s=>Array.isArray(s)),object:e.enum.filter(s=>typeof s=="object"&&s!==null&&!Array.isArray(s))};t.string=this.createTypeSchema(r.string,"string"),t.number=this.createTypeSchema(r.number,"number"),t.boolean=this.createTypeSchema(r.boolean,"boolean"),t.null=r.null.length>0?Le():!1,t.array=r.array.length>0?void 0:!1,t.object=r.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return G(t[0]);if(e==="string")return ee(t);if(e==="number"){const[r,s,...n]=t;return pe([G(r),G(s),...n.map(i=>G(i))])}return e==="boolean"?pe([G(!0),G(!1)]):!1}},dr=class{apply(t,e){const r=e;if(r.type==="string"&&r.format==="binary"&&r.contentEncoding==="binary"){let s=lt();r.minLength!==void 0&&(s=s.min(r.minLength)),r.maxLength!==void 0&&(s=s.max(r.maxLength)),r.contentMediaType!==void 0&&(s=s.mime(r.contentMediaType)),t.file=s,t.string=!1}}},fr=class{apply(t,e){const r=e;e.type===void 0&&(r.minLength!==void 0||r.maxLength!==void 0||r.pattern!==void 0)&&t.string===void 0&&(t.string=c())}},mr=class{apply(t,e){const r=e;if(r.minLength!==void 0&&t.string!==!1){const s=t.string||c();s instanceof He&&(t.string=s.refine(n=>Array.from(n).length>=r.minLength,{message:`String must be at least ${r.minLength} characters long`}))}}},hr=class{apply(t,e){const r=e;if(r.maxLength!==void 0&&t.string!==!1){const s=t.string||c();s instanceof He&&(t.string=s.refine(n=>Array.from(n).length<=r.maxLength,{message:`String must be at most ${r.maxLength} characters long`}))}}},pr=class{apply(t,e){const r=e;if(r.pattern&&t.string!==!1){const s=t.string||c();if(s instanceof He){const n=new RegExp(r.pattern);t.string=s.regex(n)}}}},gr=class{apply(t,e){const r=e;if(r.minimum!==void 0&&t.number!==!1){const s=t.number||A();s instanceof le&&(t.number=s.min(r.minimum))}}},br=class{apply(t,e){const r=e;if(r.maximum!==void 0&&t.number!==!1){const s=t.number||A();s instanceof le&&(t.number=s.max(r.maximum))}}},yr=class{apply(t,e){const r=e;if(r.exclusiveMinimum!==void 0&&t.number!==!1){const s=t.number||A();s instanceof le&&(typeof r.exclusiveMinimum=="number"?t.number=s.gt(r.exclusiveMinimum):t.number=!1)}}},xr=class{apply(t,e){const r=e;if(r.exclusiveMaximum!==void 0&&t.number!==!1){const s=t.number||A();s instanceof le&&(typeof r.exclusiveMaximum=="number"?t.number=s.lt(r.exclusiveMaximum):t.number=!1)}}},vr=class{apply(t,e){const r=e;if(r.multipleOf!==void 0&&t.number!==!1){const s=t.number||A();s instanceof le&&(t.number=s.refine(n=>{if(r.multipleOf===0)return!1;const i=n/r.multipleOf,a=Math.round(i),l=Math.min(Math.abs(n)*Number.EPSILON*10,Math.abs(r.multipleOf)*Number.EPSILON*10);return Math.abs(i-a)<=l/Math.abs(r.multipleOf)},{message:`Must be a multiple of ${r.multipleOf}`}))}}},wr=class{apply(t,e){const r=e;e.type===void 0&&(r.minItems!==void 0||r.maxItems!==void 0||r.items!==void 0||r.prefixItems!==void 0)&&t.array===void 0&&(t.array=_(q()))}},Sr=class{apply(t,e){const r=e;r.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||_(q())).min(r.minItems))}},jr=class{apply(t,e){const r=e;r.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||_(q())).max(r.maxItems))}},_r=class{apply(t,e){const r=e;if(t.array!==!1)if(Array.isArray(r.items))t.array=t.array||_(q());else if(r.items&&typeof r.items!="boolean"&&!r.prefixItems){const s=$(r.items);let n=_(s);if(t.array&&t.array instanceof nt){const i=t.array._def;i.checks&&i.checks.forEach(a=>{if(a._zod&&a._zod.def){const l=a._zod.def;l.check==="min_length"&&l.minimum!==void 0?n=n.min(l.minimum):l.check==="max_length"&&l.maximum!==void 0&&(n=n.max(l.maximum))}})}t.array=n}else typeof r.items=="boolean"&&r.items===!1?r.prefixItems?t.array=t.array||_(q()):t.array=_(q()).max(0):typeof r.items=="boolean"&&r.items===!0?t.array=t.array||_(q()):r.prefixItems&&(t.array=t.array||_(q()))}},Cr=class{apply(t,e){if(e.type!=="array")return;const r=e;if(!Array.isArray(r.items)||t.array===!1)return;const s=r.items.map(i=>$(i));let n;s.length===0?n=Ve([]):n=Ve(s),r.minItems!==void 0&&r.minItems>s.length&&(n=!1),r.maxItems!==void 0&&r.maxItems<s.length&&(n=!1),t.tuple=n,t.array=!1}},Er=class{apply(t,e){const r=e;t.object!==!1&&(r.properties||r.required||r.additionalProperties!==void 0)&&(t.object=t.object||p({}).passthrough())}},Nr=class{apply(t,e){const r=e;e.type===void 0&&(r.maxProperties!==void 0||r.minProperties!==void 0)&&t.object===void 0&&(t.object=p({}).passthrough())}},Or=class{apply(t,e){const r=e;if(r.maxProperties!==void 0&&t.object!==!1){const s=t.object||p({}).passthrough();t.object=s.refine(n=>Object.keys(n).length<=r.maxProperties,{message:`Object must have at most ${r.maxProperties} properties`})}}},Tr=class{apply(t,e){const r=e;if(r.minProperties!==void 0&&t.object!==!1){const s=t.object||p({}).passthrough();t.object=s.refine(n=>Object.keys(n).length>=r.minProperties,{message:`Object must have at least ${r.minProperties} properties`})}}};function ge(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,s)=>ge(r,e[s]));if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),s=Object.keys(e);return r.length!==s.length?!1:r.every(n=>s.includes(n)&&ge(t[n],e[n]))}return!1}function kr(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(r=>e.some(n=>ge(r,n))?!1:(e.push(r),!0))}}function Se(t,e){return t.safeParse(e).success}var Ir=class{apply(t,e){if(!e.not)return t;const r=$(e.not);return t.refine(s=>!Se(r,s),{message:"Value must not match the 'not' schema"})}},Pr=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(kr(),{message:"Array items must be unique"})}},Mr=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(s=>$(s)).reduce((s,n)=>Ke(s,n),t)}},Ar=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const r=e.anyOf.length===1?$(e.anyOf[0]):pe([$(e.anyOf[0]),$(e.anyOf[1]),...e.anyOf.slice(2).map(s=>$(s))]);return Ke(t,r)}},Rr=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const r=e.oneOf.map(s=>$(s));return t.refine(s=>{let n=0;for(const i of r)if(i.safeParse(s).success&&(n++,n>1))return!1;return n===1},{message:"Value must match exactly one of the oneOf schemas"})}},Lr=class{apply(t,e){const r=e;if(r.prefixItems&&Array.isArray(r.prefixItems)){const n=r.prefixItems.map(i=>$(i));return t.refine(i=>{if(!Array.isArray(i))return!0;for(let a=0;a<Math.min(i.length,n.length);a++)if(!Se(n[a],i[a]))return!1;if(i.length>n.length){if(typeof r.items=="boolean"&&r.items===!1)return!1;if(r.items&&typeof r.items=="object"&&!Array.isArray(r.items)){const a=$(r.items);for(let l=n.length;l<i.length;l++)if(!Se(a,i[l]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},Hr=class{apply(t,e){const r=e;if(!r.properties&&!r.required&&r.additionalProperties!==!1)return t;if(t instanceof ot||t instanceof at){const s={};if(r.properties)for(const[n,i]of Object.entries(r.properties))i!==void 0&&(s[n]=$(i));if(r.required&&Array.isArray(r.required)){const n=new Set(r.required);for(const i of Object.keys(s))n.has(i)||(s[i]=s[i].optional())}else for(const n of Object.keys(s))s[n]=s[n].optional();return r.additionalProperties===!1?p(s):p(s).passthrough()}return t.refine(s=>{if(typeof s!="object"||s===null||Array.isArray(s))return!0;if(r.properties){for(const[n,i]of Object.entries(r.properties))if(i!==void 0&&Object.getOwnPropertyDescriptor(s,n)!==void 0&&!$(i).safeParse(s[n]).success)return!1}if(r.required&&Array.isArray(r.required)){for(const n of r.required)if(!(Object.getOwnPropertyDescriptor(s,n)!==void 0))return!1}if(r.additionalProperties===!1&&r.properties){const n=new Set(Object.keys(r.properties));for(const i in s)if(!n.has(i))return!1}return!0},{message:"Object constraints validation failed"})}},Ur=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const r=e.enum.filter(s=>Array.isArray(s)||typeof s=="object"&&s!==null);return r.length===0?t:t.refine(s=>typeof s!="object"||s===null?!0:r.some(n=>ge(s,n)),{message:"Value must match one of the enum values"})}},$r=class{apply(t,e){if(e.const===void 0)return t;const r=e.const;return typeof r!="object"||r===null?t:t.refine(s=>ge(s,r),{message:"Value must equal the const value"})}},Fr=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Br=class{apply(t,e){var r;const s=e;return!((r=s.required)!=null&&r.includes("__proto__"))||e.type!==void 0?t:q().refine(n=>this.validateRequired(n,s.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(r=>Object.prototype.hasOwnProperty.call(t,r))}},Dr=class{apply(t,e){var r;const s=e;if(s.contains===void 0)return t;const n=$(s.contains),i=(r=s.minContains)!=null?r:1,a=s.maxContains;return t.refine(l=>{if(!Array.isArray(l))return!0;let d=0;for(const u of l)Se(n,u)&&d++;return!(d<i||a!==void 0&&d>a)},{message:"Array must contain required items matching the schema"})}},Vr=class{apply(t,e){const{default:r}=e;return r===void 0||!t.safeParse(r).success?t:t.default(r)}},Wr=[new cr,new ur,new lr,new dr,new fr,new wr,new Nr,new mr,new hr,new pr,new gr,new br,new yr,new xr,new vr,new Cr,new Sr,new jr,new _r,new Or,new Tr,new Er],qr=[new Br,new Ur,new $r,new Mr,new Ar,new Rr,new Lr,new Hr,new Dr,new Ir,new Pr,new Vr,new Fr];function $(t){if(typeof t=="boolean")return t?q():De();const e={};for(const n of Wr)n.apply(e,t);const r=[];if(e.string!==!1&&r.push(e.string||c()),e.number!==!1&&r.push(e.number||A()),e.boolean!==!1&&r.push(e.boolean||Y()),e.null!==!1&&r.push(e.null||Le()),e.array!==!1&&r.push(e.array||_(q())),e.tuple!==!1&&e.tuple!==void 0&&r.push(e.tuple),e.object!==!1)if(e.object)r.push(e.object);else{const n=it(i=>typeof i=="object"&&i!==null&&!Array.isArray(i),"Must be an object, not an array");r.push(n)}e.file!==!1&&e.file!==void 0&&r.push(e.file);let s;r.length===0?s=De():r.length===1?s=r[0]:Object.keys(t).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?s=pe(r):s=q();for(const n of qr)s=n.apply(s,t);return s}class qe extends Event{constructor(e,r){var s,n;super(e),this.code=(s=r?.code)!=null?s:void 0,this.message=(n=r?.message)!=null?n:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,r,s){return s(ze(this),r)}[Symbol.for("Deno.customInspect")](e,r){return e(ze(this),r)}}function zr(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Oe(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Oe).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Oe(t.cause)}`:t.message:`${t}`}function ze(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var tt=t=>{throw TypeError(t)},Fe=(t,e,r)=>e.has(t)||tt("Cannot "+r),v=(t,e,r)=>(Fe(t,e,"read from private field"),r?r.call(t):e.get(t)),H=(t,e,r)=>e.has(t)?tt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),T=(t,e,r,s)=>(Fe(t,e,"write to private field"),e.set(t,r),r),J=(t,e,r)=>(Fe(t,e,"access private method"),r),D,X,se,ve,je,me,oe,he,Q,ne,ae,ie,de,z,Te,ke,Ie,Ge,Pe,Me,fe,Ae,Re;class we extends EventTarget{constructor(e,r){var s,n;super(),H(this,z),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,H(this,D),H(this,X),H(this,se),H(this,ve),H(this,je),H(this,me),H(this,oe),H(this,he,null),H(this,Q),H(this,ne),H(this,ae,null),H(this,ie,null),H(this,de,null),H(this,ke,async i=>{var a;v(this,ne).reset();const{body:l,redirected:d,status:u,headers:m}=i;if(u===204){J(this,z,fe).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?T(this,se,new URL(i.url)):T(this,se,void 0),u!==200){J(this,z,fe).call(this,`Non-200 status code (${u})`,u);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){J(this,z,fe).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(v(this,D)===this.CLOSED)return;T(this,D,this.OPEN);const f=new Event("open");if((a=v(this,de))==null||a.call(this,f),this.dispatchEvent(f),typeof l!="object"||!l||!("getReader"in l)){J(this,z,fe).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,x=l.getReader();let y=!0;do{const{done:b,value:w}=await x.read();w&&v(this,ne).feed(h.decode(w,{stream:!b})),b&&(y=!1,v(this,ne).reset(),J(this,z,Ae).call(this))}while(y)}),H(this,Ie,i=>{T(this,Q,void 0),!(i.name==="AbortError"||i.type==="aborted")&&J(this,z,Ae).call(this,Oe(i))}),H(this,Pe,i=>{typeof i.id=="string"&&T(this,he,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:v(this,se)?v(this,se).origin:v(this,X).origin,lastEventId:i.id||""});v(this,ie)&&(!i.event||i.event==="message")&&v(this,ie).call(this,a),this.dispatchEvent(a)}),H(this,Me,i=>{T(this,me,i)}),H(this,Re,()=>{T(this,oe,void 0),v(this,D)===this.CONNECTING&&J(this,z,Te).call(this)});try{if(e instanceof URL)T(this,X,e);else if(typeof e=="string")T(this,X,new URL(e,Gr()));else throw new Error("Invalid URL")}catch{throw zr("An invalid or illegal string was specified")}T(this,ne,bt({onEvent:v(this,Pe),onRetry:v(this,Me)})),T(this,D,this.CONNECTING),T(this,me,3e3),T(this,je,(s=r?.fetch)!=null?s:globalThis.fetch),T(this,ve,(n=r?.withCredentials)!=null?n:!1),J(this,z,Te).call(this)}get readyState(){return v(this,D)}get url(){return v(this,X).href}get withCredentials(){return v(this,ve)}get onerror(){return v(this,ae)}set onerror(e){T(this,ae,e)}get onmessage(){return v(this,ie)}set onmessage(e){T(this,ie,e)}get onopen(){return v(this,de)}set onopen(e){T(this,de,e)}addEventListener(e,r,s){const n=r;super.addEventListener(e,n,s)}removeEventListener(e,r,s){const n=r;super.removeEventListener(e,n,s)}close(){v(this,oe)&&clearTimeout(v(this,oe)),v(this,D)!==this.CLOSED&&(v(this,Q)&&v(this,Q).abort(),T(this,D,this.CLOSED),T(this,Q,void 0))}}D=new WeakMap,X=new WeakMap,se=new WeakMap,ve=new WeakMap,je=new WeakMap,me=new WeakMap,oe=new WeakMap,he=new WeakMap,Q=new WeakMap,ne=new WeakMap,ae=new WeakMap,ie=new WeakMap,de=new WeakMap,z=new WeakSet,Te=function(){T(this,D,this.CONNECTING),T(this,Q,new AbortController),v(this,je)(v(this,X),J(this,z,Ge).call(this)).then(v(this,ke)).catch(v(this,Ie))},ke=new WeakMap,Ie=new WeakMap,Ge=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...v(this,he)?{"Last-Event-ID":v(this,he)}:void 0},cache:"no-store",signal:(t=v(this,Q))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Pe=new WeakMap,Me=new WeakMap,fe=function(t,e){var r;v(this,D)!==this.CLOSED&&T(this,D,this.CLOSED);const s=new qe("error",{code:e,message:t});(r=v(this,ae))==null||r.call(this,s),this.dispatchEvent(s)},Ae=function(t,e){var r;if(v(this,D)===this.CLOSED)return;T(this,D,this.CONNECTING);const s=new qe("error",{code:e,message:t});(r=v(this,ae))==null||r.call(this,s),this.dispatchEvent(s),T(this,oe,setTimeout(v(this,Re),v(this,me)))},Re=new WeakMap,we.CONNECTING=0,we.OPEN=1,we.CLOSED=2;function Gr(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class Jr extends Error{constructor(e,r,s){super(`SSE error: ${r}`),this.code=e,this.event=s}}class Zr{constructor(e,r){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=r?.eventSourceInit,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=yt(r?.fetch,r?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new ue("No auth provider");let e;try{e=await Ne(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new ue;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const s=await this._authProvider.tokens();s&&(e.Authorization=`Bearer ${s.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const r=xt(this._requestInit?.headers);return new Headers({...e,...r})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((r,s)=>{this._eventSource=new we(this._url.href,{...this._eventSourceInit,fetch:async(n,i)=>{const a=await this._commonHeaders();a.set("Accept","text/event-stream");const l=await e(n,{...i,headers:a});if(l.status===401&&l.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:u}=We(l);this._resourceMetadataUrl=d,this._scope=u}return l}}),this._abortController=new AbortController,this._eventSource.onerror=n=>{if(n.code===401&&this._authProvider){this._authThenStart().then(r,s);return}const i=new Jr(n.code,n.message,n);s(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",n=>{const i=n;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(a){s(a),this.onerror?.(a),this.close();return}r()}),this._eventSource.onmessage=n=>{const i=n;let a;try{a=Ye.parse(JSON.parse(i.data))}catch(l){this.onerror?.(l);return}this.onmessage?.(a)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new ue("No auth provider");if(await Ne(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ue("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{const r=await this._commonHeaders();r.set("content-type","application/json");const s={...this._requestInit,method:"POST",headers:r,body:JSON.stringify(e),signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._endpoint,s);if(!n.ok){const i=await n.text().catch(()=>null);if(n.status===401&&this._authProvider){const{resourceMetadataUrl:a,scope:l}=We(n);if(this._resourceMetadataUrl=a,this._scope=l,await Ne(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ue;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${n.status}): ${i}`)}await n.body?.cancel()}catch(r){throw this.onerror?.(r),r}}setProtocolVersion(e){this._protocolVersion=e}}const Kr="mcp";class Yr{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._socket=new WebSocket(this._url,Kr),this._socket.onerror=s=>{const n="error"in s?s.error:new Error(`WebSocket error: ${JSON.stringify(s)}`);r(n),this.onerror?.(n)},this._socket.onopen=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=s=>{let n;try{n=Ye.parse(JSON.parse(s.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(n)}})}async close(){this._socket?.close()}send(e){return new Promise((r,s)=>{if(!this._socket){s(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),r()})}}class Qr extends vt{constructor(e,r){super(e,r)}send(e,r){const s=Xr(e);return s?.type==="emit"?(this.onmessage?.(s.message),Promise.resolve()):s?.type==="suppress"?Promise.resolve():super.send(e,r)}}function Xr(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const r=e?.params?.protocolVersion;return r?{type:"emit",message:{result:{protocolVersion:r,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class es extends wt{constructor(e,r){super(e,{jsonSchemaValidator:ar,...r})}async listTools(e,r){return await this.request({method:"tools/list",params:e},ct,r)}}const ts=async(t,e,r)=>{const s=rs(t.connection,e,r);if(!s)throw new Error("Unknown MCP connection type");const n=new es({name:t?.name??"MCP Client",version:"1.0.0"});return await n.connect(s),{client:n}},rs=(t,e,r)=>{if(t.type==="Websocket")return new Yr(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const n={...t.token?{authorization:`Bearer ${t.token}`}:{},...r??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const i={requestInit:{headers:n,signal:e}};return t.token&&(i.eventSourceInit={fetch:(a,l)=>fetch(a,{...l,headers:{...n,Accept:"text/event-stream"},signal:e})}),new Zr(new URL(t.url),i)}return new Qr(new URL(t.url),{requestInit:{headers:n,signal:e,credentials:"include"}})},Je=t=>{try{return JSON.parse(t)}catch{return t}},ye=new Map,Ze=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?$(t.inputSchema):void 0,outputSchema:t.outputSchema?$(t.outputSchema):void 0,execute:r=>e(r.context,t.name)});function ss(t){const e=r=>"connection"in t?ts({connection:t.connection},void 0,r):t.client;return new Proxy({},{get(r,s){if(s==="toJSON")return null;if(typeof s!="string")throw new Error("Name must be a string");if(s==="listTools")return l;async function n(d,u=s){const m=t?.debugId?.(),f=m?{"x-trace-debug-id":m}:void 0,{client:h}=await e(f),{structuredContent:x,isError:y,content:b}=await h.callTool({name:String(u),arguments:d});if(y){const S=b?.[0]?.text,g=typeof S=="string"?Je(S):null,O=g?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(g.code,g.message,g.traceId):null;throw O||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(x??b)}`)}if(x!==void 0)return x;const w=b?.[0]?.text;return typeof w=="string"?Je(w):void 0}async function i(){const{client:d}=await e(),{tools:u}=await d.listTools();return u}async function a(){if(!("connection"in t))return i();const d=t.connection,u=JSON.stringify(d);try{return ye.has(u)||ye.set(u,i()),await ye.get(u)}catch(m){console.error("Failed to list tools",m),ye.delete(u);return}}async function l(){return(await a()??[]).map(u=>Ze(u,n))}return n.asTool=async()=>{const u=(await a()??[]).find(m=>m.name===s);if(!u)throw new Error(`Tool ${s} not found`);return Ze(u,n)},n}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?r=>ns({connection:r}):global[e]}});function ns(t){return ss(t)}function is(t){return{isImplementedBy:e=>{for(const r of t){const s=typeof r.name=="string"?new RegExp(`^${r.name}$`):r.name,n=e.find(i=>s.test(i.name));if(!(!n&&r.opt)&&!n)return!1}return!0}}}const os=p({id:c().describe("Unique identifier for the entity"),title:c().describe("Human-readable title for the entity"),description:c().nullish().describe("Description of the entity"),created_at:c().datetime(),updated_at:c().datetime(),created_by:c().optional(),updated_by:c().optional()}),as=p({field:_(c()),operator:ee(["eq","gt","gte","lt","lte","in","like","contains"]),value:Z()}),rt=ut(()=>pe([as,p({operator:ee(["and","or","not"]),conditions:_(rt)})])),ls=p({field:_(c()),direction:ee(["asc","desc"]),nulls:ee(["first","last"]).optional()}),cs=p({where:rt.optional().describe("Filter expression"),orderBy:_(ls).optional().describe("Sort expressions"),limit:A().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:A().int().min(0).optional().describe("Number of items to skip")});function us(t){return p({items:_(t).describe("Array of collection items"),totalCount:A().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:Y().optional().describe("Whether there are more items available")})}const ds=p({id:c().describe("ID of the entity to retrieve")});function fs(t){return p({item:t.nullable().describe("The retrieved item, or null if not found")})}p({id:c().describe("ID of the entity to delete")});function ms(t,e,r){const s=t.toUpperCase();return[{name:`COLLECTION_${s}_LIST`,inputSchema:cs,outputSchema:us(e)},{name:`COLLECTION_${s}_GET`,inputSchema:ds,outputSchema:fs(e)}]}const hs=p({id:c(),name:c(),description:c().optional(),inputSchema:K(c(),Z()),outputSchema:K(c(),Z()).optional()}),ps=os.extend({_meta:p({"io.decocms":p({id:c(),verified:Y(),scopeName:c(),appName:c(),friendlyName:c().nullable().optional(),metadata:K(c(),Z()).nullable().optional(),publishedAt:c().datetime().optional(),updatedAt:c().datetime().optional(),tools:_(hs).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:p({$schema:c().optional(),_meta:K(c(),Z()).optional(),name:c().describe("The server name (scope/app)"),title:c().optional().describe("User-friendly title"),description:c().optional().describe("Server description"),icons:_(p({src:c(),mimeType:c().optional(),sizes:_(c()).optional(),theme:ee(["light","dark"]).optional()})).optional(),remotes:_(p({type:ee(["http","stdio","sse"]),url:c().optional(),headers:_(Z()).optional()})).optional(),packages:_(Z()).optional(),repository:p({url:c(),source:c().optional(),subfolder:c().optional()}).optional(),version:c().optional(),websiteUrl:c().optional()})});ms("registry_app",ps);const gs=p({specversion:G("1.0").describe("CloudEvents specification version"),id:c().describe("Unique identifier for this event (UUID recommended)"),source:c().describe("Connection ID of the event publisher"),type:c().describe("Event type (e.g., 'order.created', 'user.signup')"),time:c().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:c().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:c().optional().default("application/json").describe("Content type of the data attribute"),dataschema:c().url().optional().describe("URI to the schema for the data attribute"),data:Z().optional().describe("Event payload (any JSON value)")});p({events:_(gs).min(1).describe("Batch of CloudEvents to process")});const bs=p({success:Y().optional().describe("Whether this event was processed successfully"),error:c().optional().describe("Error message for this event"),retryAfter:A().int().positive().optional().describe("Re-deliver this event after this many ms")});p({success:Y().optional().describe("Batch success - applies to events not in results"),error:c().optional().describe("Batch error message - applies to events not in results"),processedCount:A().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:A().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:K(c(),bs).optional().describe("Per-event results keyed by event ID")});const ys=p({type:G("string"),enum:_(c()).optional(),description:c().optional()}),xs=p({type:c(),description:c(),paramsSchema:K(c(),ys)});p({});p({triggers:_(xs)});p({type:c(),params:K(c(),c()),enabled:Y(),callbackUrl:dt().optional(),callbackToken:c().min(1).optional()});p({success:Y()});p({prefix:c().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:A().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:c().optional().describe("Token for pagination from previous response"),delimiter:c().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});p({objects:_(p({key:c().describe("Object key/path"),size:A().describe("Object size in bytes"),lastModified:c().describe("Last modified timestamp"),etag:c().describe("Entity tag for the object")})),nextContinuationToken:c().optional().describe("Token for fetching next page of results"),isTruncated:Y().describe("Whether there are more results available"),commonPrefixes:_(c()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});p({key:c().describe("Object key/path to get metadata for")});p({contentType:c().optional().describe("MIME type of the object"),contentLength:A().describe("Size of the object in bytes"),lastModified:c().describe("Last modified timestamp"),etag:c().describe("Entity tag for the object"),metadata:K(c(),c()).optional().describe("Custom metadata key-value pairs")});p({key:c().describe("Object key/path to generate URL for"),expiresIn:A().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});p({url:c().describe("Presigned URL for downloading the object"),expiresIn:A().describe("Expiration time in seconds that was used")});p({key:c().describe("Object key/path for the upload"),expiresIn:A().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:c().optional().describe("MIME type for the object being uploaded")});p({url:c().describe("Presigned URL for uploading the object"),expiresIn:A().describe("Expiration time in seconds that was used")});p({key:c().describe("Object key/path to delete")});p({success:Y().describe("Whether the deletion was successful"),key:c().describe("The key that was deleted")});p({keys:_(c()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});p({deleted:_(c()).describe("Array of successfully deleted keys"),errors:_(p({key:c(),message:c()})).describe("Array of errors for failed deletions")});const vs=p({primary:c().optional().describe("Primary brand color (hex)"),secondary:c().optional().describe("Secondary brand color (hex)"),accent:c().optional().describe("Accent / highlight color (hex)"),background:c().optional().describe("Background color (hex)"),foreground:c().optional().describe("Foreground / text color (hex)")}),ws=p({heading:c().optional().describe("Font family for headings"),body:c().optional().describe("Font family for body text"),code:c().optional().describe("Font family for code / monospace")}),Ss=p({logo:c().optional().describe("Logo URL"),favicon:c().optional().describe("Favicon URL"),ogImage:c().optional().describe("Open Graph image URL")}),js=p({id:c(),name:c().describe("Brand / company name"),domain:c().optional().describe("Company domain (e.g. example.com)"),colors:vs.optional().describe("Semantic color palette"),fonts:ws.optional().describe("Font families by role"),assets:Ss.optional().describe("Visual identity assets"),overview:c().optional().describe("Company overview / description"),tagline:c().optional().describe("Brand tagline"),tone:c().optional().describe("Tone of voice description"),metadata:K(c(),Z()).optional().describe("Extra design tokens and metadata")});p({id:c().optional().describe("Brand ID. Omit to get the default brand.")});p({});p({items:_(js)});const _s={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Cs(t){if(t)return _s[t]}function En(t,e){const r=t.tools;if(!r||r.length===0)return!1;const s=r.map(a=>({name:a.name,inputSchema:a.inputSchema})),n=e.map(a=>({name:a.name,inputSchema:a.inputSchema,opt:a.opt}));return is(n).isImplementedBy(s)}const Be=F.createContext(null);function Nn(t){const e=U.c(3),{children:r}=t,s=F.useContext(Be);if(!s?.tabsEl)return null;let n;return e[0]!==r||e[1]!==s.tabsEl?(n=Qe.createPortal(r,s.tabsEl),e[0]=r,e[1]=s.tabsEl,e[2]=n):n=e[2],n}function Es(t){const e=U.c(3),{children:r}=t,s=F.useContext(Be);if(!s?.actionsEl)return null;let n;return e[0]!==r||e[1]!==s.actionsEl?(n=Qe.createPortal(r,s.actionsEl),e[0]=r,e[1]=s.actionsEl,e[2]=n):n=e[2],n}const On=Es;function Tn(t){const e=U.c(21),{children:r,breadcrumb:s,hideHeader:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={leftEl:null,tabsEl:null,actionsEl:null},e[0]=i):i=e[0];const[a,l]=F.useState(i),d=F.useRef(null),u=F.useRef(null),m=F.useRef(null);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=j=>{d.current=j,j&&l(C=>C.leftEl===j?C:{...C,leftEl:j})},e[1]=f):f=e[1];const h=f;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=j=>{u.current=j,j&&l(C=>C.tabsEl===j?C:{...C,tabsEl:j})},e[2]=x):x=e[2];const y=x;let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=j=>{m.current=j,j&&l(C=>C.actionsEl===j?C:{...C,actionsEl:j})},e[3]=b):b=e[3];const w=b,S=n&&"hidden";let g;e[4]!==S?(g=_e(S),e[4]=S,e[5]=g):g=e[5];let O;e[6]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=O):O=e[6];let R;e[7]!==s?(R=o.jsxs(ce.Header.Left,{children:[s,O]}),e[7]=s,e[8]=R):R=e[8];let L;e[9]===Symbol.for("react.memo_cache_sentinel")?(L=o.jsxs(ce.Header.Right,{children:[o.jsx("div",{ref:y,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),o.jsx("div",{ref:w,className:"flex items-center gap-2 shrink-0"})]}),e[9]=L):L=e[9];let k;e[10]!==g||e[11]!==R?(k=o.jsxs(ce.Header,{className:g,children:[R,L]}),e[10]=g,e[11]=R,e[12]=k):k=e[12];let I;e[13]!==r?(I=o.jsx(ce.Content,{children:r}),e[13]=r,e[14]=I):I=e[14];let P;e[15]!==k||e[16]!==I?(P=o.jsxs(ce,{children:[k,I]}),e[15]=k,e[16]=I,e[17]=P):P=e[17];let N;return e[18]!==a||e[19]!==P?(N=o.jsx(Be,{value:a,children:P}),e[18]=a,e[19]=P,e[20]=N):N=e[20],N}function Ns(t){return t.startsWith("@")?t:`@${t}`}function Os(){const{org:t}=Ue(),{data:e}=ft.useSession(),r=Nt(),s=At(),n=Rt(),i=s.filter(l=>n(l.id));return{installByBinding:async l=>{if(!t||!e?.user?.id){xe.error("Not authenticated");return}const d=Ns(l),m=(await Promise.all(i.map(async b=>{const w=kt(b.id,t.id);try{const S=await It(b.id,t.id,t.slug,w,{where:{appName:d}});return Pt(S??[])[0]??null}catch{return null}}))).find(b=>b!==null);if(!m){xe.error(`MCP Server not found in registry: ${l}`);return}const f=Mt(m,t.id,e.user.id),h=f.connection_type==="STDIO",x=!!f.connection_url,y=h&&f.connection_headers&&typeof f.connection_headers=="object"&&"command"in f.connection_headers;if(!x&&!y){xe.error("This MCP Server cannot be connected: no connection method available");return}return await r.create.mutateAsync(f),{id:f.id,connection:f}},isInstalling:r.create.isPending}}function Ts(t){const e=U.c(21),{virtualMcp:r,isSelected:s}=t,n=s&&"bg-accent";let i;e[0]!==n?(i=_e("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",n),e[0]=n,e[1]=i):i=e[1];let a;e[2]!==r.icon||e[3]!==r.title?(a=o.jsx(et,{icon:r.icon,name:r.title,size:"sm"}),e[2]=r.icon,e[3]=r.title,e[4]=a):a=e[4];let l;e[5]!==r.title?(l=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:r.title}),e[5]=r.title,e[6]=l):l=e[6];let d;e[7]!==s?(d=s&&o.jsx(Xt,{size:16,className:"text-foreground shrink-0"}),e[7]=s,e[8]=d):d=e[8];let u;e[9]!==l||e[10]!==d?(u=o.jsxs("div",{className:"flex items-center justify-between",children:[l,d]}),e[9]=l,e[10]=d,e[11]=u):u=e[11];let m;e[12]!==r.description?(m=r.description&&o.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:r.description}),e[12]=r.description,e[13]=m):m=e[13];let f;e[14]!==u||e[15]!==m?(f=o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[u,m]}),e[14]=u,e[15]=m,e[16]=f):f=e[16];let h;return e[17]!==i||e[18]!==a||e[19]!==f?(h=o.jsxs("div",{className:i,children:[a,f]}),e[17]=i,e[18]=a,e[19]=f,e[20]=h):h=e[20],h}function ks(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx($e,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function Is(t){const e=U.c(33),{selectedVirtualMcpId:r,onVirtualMcpChange:s,searchInputRef:n}=t,i=Qt(),[a,l]=F.useState(""),d=F.useRef(null),u=n??d;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={navigateOnCreate:!0},e[0]=m):m=e[0];const{createVirtualMCP:f,isCreating:h}=sr(m);let x,y,b,w;if(e[1]!==f||e[2]!==u||e[3]!==h||e[4]!==s||e[5]!==a||e[6]!==r||e[7]!==i){let O;e:{const E=i.filter(Ps);if(!a.trim()){O=E;break e}const M=a.toLowerCase();O=E.filter(B=>B.title.toLowerCase().includes(M)||B.description?.toLowerCase().includes(M))}const R=O;let L;e[12]!==s?(L=E=>{s(E),l("")},e[12]=s,e[13]=L):L=e[13];const k=L;b="flex flex-col max-h-[min(400px,60dvh)]";let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(er,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=I):I=e[14];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=E=>l(E.target.value),e[15]=P):P=e[15];let N;e[16]!==u||e[17]!==a?(N=o.jsx(Wt,{ref:u,type:"text",placeholder:"Search for an agent...",value:a,onChange:P,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=u,e[17]=a,e[18]=N):N=e[18];const j=h?"Creating...":"Create Agent";let C;e[19]!==f||e[20]!==h||e[21]!==j?(C=o.jsx(Ce,{onClick:f,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:h,children:j}),e[19]=f,e[20]=h,e[21]=j,e[22]=C):C=e[22],e[23]!==N||e[24]!==C?(w=o.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:o.jsxs("div",{className:"relative flex items-center gap-2",children:[I,N,C]})}),e[23]=N,e[24]=C,e[25]=w):w=e[25],x="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",y=R.length>0?o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:R.map(E=>o.jsx("div",{role:"button",tabIndex:0,onClick:()=>k(E.id),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),k(E.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:o.jsx(Ts,{virtualMcp:E,isSelected:E.id===r})},E.id))}):o.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=f,e[2]=u,e[3]=h,e[4]=s,e[5]=a,e[6]=r,e[7]=i,e[8]=x,e[9]=y,e[10]=b,e[11]=w}else x=e[8],y=e[9],b=e[10],w=e[11];let S;e[26]!==x||e[27]!==y?(S=o.jsx("div",{className:x,children:y}),e[26]=x,e[27]=y,e[28]=S):S=e[28];let g;return e[29]!==b||e[30]!==w||e[31]!==S?(g=o.jsxs("div",{className:b,children:[w,S]}),e[29]=b,e[30]=w,e[31]=S,e[32]=g):g=e[32],g}function Ps(t){return!t.id||!St(t.id)}function Ms(t){const e=U.c(3);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(ks,{}),e[0]=r):r=e[0];let s;return e[1]!==t?(s=o.jsx(F.Suspense,{fallback:r,children:o.jsx(Is,{...t})}),e[1]=t,e[2]=s):s=e[2],s}function As(t){const e=U.c(32),{selectedVirtualMcpId:r,selectedVirtualMcp:s,onVirtualMcpChange:n,className:i,placeholder:a,showTooltip:l,disabled:d}=t,u=a===void 0?"Select Agent":a,m=l===void 0?!0:l,f=d===void 0?!1:d,[h,x]=F.useState(!1),y=F.useRef(null);let b;e[0]!==n?(b=W=>{n(W),x(!1)},e[0]=n,e[1]=b):b=e[1];const w=b,S=rr();let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=W=>{x(W)},e[2]=g):g=e[2];const O=g;let R,L;e[3]!==S||e[4]!==h?(R=()=>{h&&!S&&setTimeout(()=>{y.current?.focus()},0)},L=[h,S],e[3]=S,e[4]=h,e[5]=R,e[6]=L):(R=e[5],L=e[6]),F.useEffect(R,L);const k=f?!1:h,I=f?void 0:O,P=f?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let N;e[7]!==i||e[8]!==P?(N=_e("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",P,i),e[7]=i,e[8]=P,e[9]=N):N=e[9];let j;e[10]!==s?(j=s?o.jsx(et,{icon:s.icon,name:s.title,size:"sm",className:"absolute inset-0 size-full"}):o.jsxs(o.Fragment,{children:[o.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[o.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),o.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),o.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),o.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),o.jsx(tr,{size:16})]}),e[10]=s,e[11]=j):j=e[11];let C;e[12]!==f||e[13]!==u||e[14]!==N||e[15]!==j?(C=o.jsx(Zt,{asChild:!0,children:o.jsx(qt,{asChild:!0,children:o.jsx("button",{type:"button",disabled:f,className:N,"aria-label":u,children:j})})}),e[12]=f,e[13]=u,e[14]=N,e[15]=j,e[16]=C):C=e[16];let E;e[17]!==h||e[18]!==s?.title||e[19]!==m?(E=m&&!h&&o.jsx(Jt,{side:"top",className:"text-xs",children:s?.title??"Choose an agent to chat with"}),e[17]=h,e[18]=s?.title,e[19]=m,e[20]=E):E=e[20];let M;e[21]!==C||e[22]!==E?(M=o.jsx(Kt,{children:o.jsxs(Yt,{children:[C,E]})}),e[21]=C,e[22]=E,e[23]=M):M=e[23];let B;e[24]!==w||e[25]!==r?(B=o.jsx(zt,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:o.jsx(Ms,{selectedVirtualMcpId:r,onVirtualMcpChange:w,searchInputRef:y})}),e[24]=w,e[25]=r,e[26]=B):B=e[26];let V;return e[27]!==M||e[28]!==B||e[29]!==k||e[30]!==I?(V=o.jsxs(Gt,{open:k,onOpenChange:I,children:[M,B]}),e[27]=M,e[28]=B,e[29]=k,e[30]=I,e[31]=V):V=e[31],V}function Rs(t){const e=t.properties;if(!e)return!1;const r=e.__type,s=e.__binding;return!!(r?.const||s?.const)}function Ls(t){const e=t.properties;if(!e)return{};const r=e.__type,s=e.__binding;return{bindingType:r?.const,bindingSchema:s?.const}}function Hs(t){const e=U.c(10),{bindingSchema:r,bindingType:s,currentValue:n,onValueChange:i,placeholder:a,onAddNew:l,className:d}=t;let u;e[0]!==s?(u=Cs(s),e[0]=s,e[1]=u):u=e[1];const f=u??(typeof r=="string"?r:r??void 0);let h;return e[2]!==s||e[3]!==d||e[4]!==n||e[5]!==l||e[6]!==i||e[7]!==a||e[8]!==f?(h=o.jsx(Us,{value:n,onValueChange:i,placeholder:a,binding:f,bindingType:s,onAddNew:l,className:d}),e[2]=s,e[3]=d,e[4]=n,e[5]=l,e[6]=i,e[7]=a,e[8]=f,e[9]=h):h=e[9],h}function Us({value:t,onValueChange:e,placeholder:r="Select a connection...",binding:s,bindingType:n,onAddNew:i,className:a}){const[l,d]=F.useState(!1),{installByBinding:u,isInstalling:m}=Os(),f=l||m,h=s?void 0:n||void 0,x=Ot(s?{binding:s}:h?{filters:[{column:"app_name",value:h}]}:{}),y=Tt(t&&!x.some(g=>g.id===t)?t:void 0),b=y?[y,...x]:x,w=n?.startsWith("@"),S=async()=>{if(w&&n){d(!0);try{const g=await u(n);g&&e(g.id)}catch(g){const O=g instanceof Error?g.message:String(g);xe.error(`Failed to connect MCP: ${O}`)}finally{d(!1)}return}i?.()};return o.jsxs(Ht,{value:t,onValueChange:e,children:[o.jsx(Ut,{size:"sm",className:_e("w-[200px]",a),children:o.jsx($t,{placeholder:r})}),o.jsxs(Ft,{children:[b.length===0?o.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):b.map(g=>o.jsx(Bt,{value:g.id,children:o.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?o.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded"}):o.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:g.title.slice(0,1).toUpperCase()}),o.jsx("span",{children:g.title})]})},g.id)),(i||w)&&o.jsx("div",{className:"border-t border-border",children:o.jsx(Ce,{onClick:g=>{g.preventDefault(),g.stopPropagation(),S()},disabled:f,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:f?o.jsxs(o.Fragment,{children:[o.jsx($e,{size:16,className:"animate-spin"}),o.jsx("span",{children:"Connecting..."})]}):o.jsxs(o.Fragment,{children:[o.jsx(Lt,{size:16}),o.jsx("span",{children:"Custom Connection"})]})})})]})]})}function $s(t){const e=U.c(49),{schema:r,formData:s,title:n,description:i,registry:a}=t,l=a.formContext,d=n||"",u=n||"";if(Rs(r)){const h=r;let x;e[0]!==h?(x=Ls(h),e[0]=h,e[1]=x):x=e[1];const{bindingType:y,bindingSchema:b}=x,S=(l?.formData?.[d]?.value??s?.value)||"";let g;e[2]!==y||e[3]!==d||e[4]!==l||e[5]!==s?(g=V=>{const W={...s,value:V??"",...y&&{__type:y}};l?.onFieldChange(d,W)},e[2]=y,e[3]=d,e[4]=l,e[5]=s,e[6]=g):g=e[6];const O=g,R=Bs;let L;e[7]!==u||e[8]!==d||e[9]!==n?(L=R(n||u||d),e[7]=u,e[8]=d,e[9]=n,e[10]=L):L=e[10];const k=L;if(y==="@deco/agent"){let V;e[11]!==k?(V=o.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[11]=k,e[12]=V):V=e[12];let W;e[13]!==i?(W=i&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[13]=i,e[14]=W):W=e[14];let te;e[15]!==V||e[16]!==W?(te=o.jsxs("div",{className:"flex-1 min-w-0",children:[V,W]}),e[15]=V,e[16]=W,e[17]=te):te=e[17];const Ee=S||void 0;let re;e[18]!==O||e[19]!==Ee?(re=o.jsx(As,{selectedVirtualMcpId:Ee,onVirtualMcpChange:O,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=O,e[19]=Ee,e[20]=re):re=e[20];let be;return e[21]!==te||e[22]!==re?(be=o.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[te,re]}),e[21]=te,e[22]=re,e[23]=be):be=e[23],be}let I;e[24]!==k?(I=o.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[24]=k,e[25]=I):I=e[25];let P;e[26]!==i?(P=i&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[26]=i,e[27]=P):P=e[27];let N;e[28]!==I||e[29]!==P?(N=o.jsxs("div",{className:"flex-1 min-w-0",children:[I,P]}),e[28]=I,e[29]=P,e[30]=N):N=e[30];let j;e[31]!==k?(j=k.toLowerCase(),e[31]=k,e[32]=j):j=e[32];const C=`Select ${j}...`;let E;e[33]!==l?(E=()=>l?.onAddNew(),e[33]=l,e[34]=E):E=e[34];let M;e[35]!==b||e[36]!==y||e[37]!==S||e[38]!==O||e[39]!==C||e[40]!==E?(M=o.jsx(Hs,{bindingSchema:b,bindingType:y,currentValue:S,onValueChange:O,placeholder:C,onAddNew:E,className:"w-[200px] shrink-0"}),e[35]=b,e[36]=y,e[37]=S,e[38]=O,e[39]=C,e[40]=E,e[41]=M):M=e[41];let B;return e[42]!==M||e[43]!==N?(B=o.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[N,M]}),e[42]=M,e[43]=N,e[44]=B):B=e[44],B}let m;e[45]!==t.properties?(m=t.properties.map(Fs),e[45]=t.properties,e[46]=m):m=e[46];let f;return e[47]!==m?(f=o.jsx("div",{className:"flex flex-col gap-4",children:m}),e[47]=m,e[48]=f):f=e[48],f}function Fs(t){return t.content}function Bs(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,Ds)}function Ds(t){return t.toUpperCase()}function Vs(t){const e=U.c(13),{label:r,children:s,description:n,id:i,schema:a}=t;if(i.includes("__type")||i.includes("__binding"))return null;if(a.type==="object")return s;let l;e[0]!==i||e[1]!==r?(l=r&&o.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:i,children:r}),e[0]=i,e[1]=r,e[2]=l):l=e[2];let d;e[3]!==n?(d=n&&o.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n}),e[3]=n,e[4]=d):d=e[4];let u;e[5]!==l||e[6]!==d?(u=o.jsxs("div",{className:"flex-1 min-w-0",children:[l,d]}),e[5]=l,e[6]=d,e[7]=u):u=e[7];let m;e[8]!==s?(m=o.jsx("div",{className:"w-[200px] shrink-0",children:s}),e[8]=s,e[9]=m):m=e[9];let f;return e[10]!==u||e[11]!==m?(f=o.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[u,m]}),e[10]=u,e[11]=m,e[12]=f):f=e[12],f}const Ws={ObjectFieldTemplate:$s,FieldTemplate:Vs};function qs(t){const e=U.c(19),{formKey:r,formState:s,onFormStateChange:n,stateSchema:i}=t,{org:a}=Ue(),l=mt();let d;e[0]!==n?(d=g=>{g.formData&&n(g.formData)},e[0]=n,e[1]=d):d=e[1];const u=d;let m;e[2]!==s||e[3]!==n?(m=(g,O)=>{const R={...s,[g]:O};n(R)},e[2]=s,e[3]=n,e[4]=m):m=e[4];const f=m;let h;e[5]!==l||e[6]!==a?(h=()=>{l({to:"/$org/settings/connections",params:{org:a.slug},search:{action:"create"}})},e[5]=l,e[6]=a,e[7]=h):h=e[7];const x=h;let y;e[8]!==s||e[9]!==x||e[10]!==f?(y={onFieldChange:f,formData:s,onAddNew:x},e[8]=s,e[9]=x,e[10]=f,e[11]=y):y=e[11];const b=y;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(o.Fragment,{}),e[12]=w):w=e[12];let S;return e[13]!==b||e[14]!==r||e[15]!==s||e[16]!==u||e[17]!==i?(S=o.jsx("div",{className:"flex flex-col h-full overflow-auto",children:o.jsx(Dt,{schema:i,validator:Vt,formData:s,onChange:u,formContext:b,liveValidate:!1,showErrorList:!1,templates:Ws,children:w},r)}),e[13]=b,e[14]=r,e[15]=s,e[16]=u,e[17]=i,e[18]=S):S=e[18],S}function zs(t){const e=U.c(14),{org:r}=Ue();let s;e[0]!==t||e[1]!==r.id||e[2]!==r.slug?(s={connectionId:t,orgId:r.id,orgSlug:r.slug},e[0]=t,e[1]=r.id,e[2]=r.slug,e[3]=s):s=e[3];const n=jt(s);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={},e[4]=i):i=e[4];let a;e[5]!==n?(a={client:n,toolName:"MCP_CONFIGURATION",toolArguments:i,select:Gs},e[5]=n,e[6]=a):a=e[6];const{data:l}=_t(a);let d;e[7]!==l.stateSchema?(d=l.stateSchema??{type:"object",properties:{}},e[7]=l.stateSchema,e[8]=d):d=e[8];const u=d;let m;e[9]!==l.scopes?(m=l.scopes??[],e[9]=l.scopes,e[10]=m):m=e[10];const f=m;let h;return e[11]!==f||e[12]!==u?(h={stateSchema:u,scopes:f},e[11]=f,e[12]=u,e[13]=h):h=e[13],h}function Gs(t){return t.structuredContent??t}function Js(t){const e=U.c(4),{onAuthenticate:r,buttonText:s}=t,n=s===void 0?"Authenticate":s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h3",{className:"text-sm font-semibold",children:"Authentication Required"}),o.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=i):i=e[0];let a;return e[1]!==n||e[2]!==r?(a=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,o.jsx(Ce,{onClick:r,size:"default",children:n})]})}),e[1]=n,e[2]=r,e[3]=a):a=e[3],a}function Zs(t){const e=U.c(7),{hasReadme:r,onViewReadme:s}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Et,{size:36,className:"text-muted-foreground"}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h3",{className:"text-sm font-semibold",children:"Manual Authentication Required"}),o.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=i):i=e[1];let a;e[2]!==r||e[3]!==s?(a=r&&s&&o.jsxs(Ce,{onClick:s,variant:"outline",size:"lg",children:[o.jsx(Ct,{size:18,className:"mr-2"}),"View README"]}),e[2]=r,e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==a?(l=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[n,i,a]})}),e[5]=a,e[6]=l):l=e[6],l}function Ks(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),o.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=r):r=t[1],r}function Ys(t){const e=U.c(12),{connection:r,form:s}=t,{stateSchema:n}=zs(r.id);let i;e[0]!==s.control?(i={control:s.control,name:"configuration_state"},e[0]=s.control,e[1]=i):i=e[1];const a=pt(i);let l;e[2]!==s?(l=h=>{s.setValue("configuration_state",h,{shouldDirty:!0})},e[2]=s,e[3]=l):l=e[3];const d=l;if(!(n&&n.properties&&typeof n.properties=="object"&&Object.keys(n.properties).length>0)){let h;return e[4]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(Xe,{image:o.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[4]=h):h=e[4],h}let m;e[5]!==a?(m=a??{},e[5]=a,e[6]=m):m=e[6];let f;return e[7]!==r.id||e[8]!==d||e[9]!==n||e[10]!==m?(f=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(qs,{formKey:r.id,stateSchema:n,formState:m,onFormStateChange:d})}),e[7]=r.id,e[8]=d,e[9]=n,e[10]=m,e[11]=f):f=e[11],f}function Qs(t){const e=U.c(11),{connection:r,form:s,hasMcpBinding:n,isMCPAuthenticated:i,supportsOAuth:a,isServerError:l,onAuthenticate:d,onViewReadme:u}=t,f=!!r?.metadata?.repository?.url;if(!i){if(l){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(Ks,{}),e[0]=b):b=e[0],b}if(a){let b;return e[1]!==d?(b=o.jsx(Js,{onAuthenticate:d}),e[1]=d,e[2]=b):b=e[2],b}let y;return e[3]!==f||e[4]!==u?(y=o.jsx(Zs,{hasReadme:f,onViewReadme:u}),e[3]=f,e[4]=u,e[5]=y):y=e[5],y}if(!n){let y;return e[6]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(Xe,{image:o.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=y):y=e[6],y}let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx($e,{size:32,className:"animate-spin text-muted-foreground"})}),e[7]=h):h=e[7];let x;return e[8]!==r||e[9]!==s?(x=o.jsx(ht,{children:o.jsx(F.Suspense,{fallback:h,children:o.jsx(Ys,{connection:r,form:s})})}),e[8]=r,e[9]=s,e[10]=x):x=e[10],x}function kn(t){const e=U.c(2);let r;return e[0]!==t?(r=o.jsx("div",{className:"flex-1 flex h-full",children:o.jsx(Qs,{...t})}),e[0]=t,e[1]=r):r=e[1],r}export{Zs as M,Js as O,kn as S,Tn as V,On as a,Nn as b,En as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,e as p,j as s,i as u,N as a}from"./index-
|
|
1
|
+
import{c as g,e as p,j as s,i as u,N as a}from"./index-B37Lpv5S.js";import{a as x}from"./use-capability-qIjsd8HD.js";import{C as j}from"./capability-load-error-CD0k_ZBV.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:c,error:f}=x();if(c){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|