decocms 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Ctbek2zl.js → AlertCircle-l0Fpo8hU.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CGlPrRsR.js → ArrowUpRight-nFWH1Ez9.js} +1 -1
- package/dist/client/assets/{Check-D-2DMeXR.js → Check-c_jJpxb1.js} +1 -1
- package/dist/client/assets/{CheckCircle-CPLY3iX-.js → CheckCircle-38u06F5f.js} +1 -1
- package/dist/client/assets/{ChevronDown-DUb-OAcF.js → ChevronDown-BD_mAbO2.js} +1 -1
- package/dist/client/assets/{ChevronLeft-IUSMXc7n.js → ChevronLeft-CpIXC6Gs.js} +1 -1
- package/dist/client/assets/{ChevronRight-C6_Bb1P7.js → ChevronRight-DLrAfqVe.js} +1 -1
- package/dist/client/assets/{ChevronUp-mT0kmu5O.js → ChevronUp-CSbcB5D_.js} +1 -1
- package/dist/client/assets/{Container-V3OuMECL.js → Container-DhunwrH9.js} +1 -1
- package/dist/client/assets/{DotsVertical-CYMPhMIv.js → DotsVertical-Drb9z9hu.js} +1 -1
- package/dist/client/assets/{Eye-DLKlw-42.js → Eye-cKsI4OxT.js} +1 -1
- package/dist/client/assets/{FilterLines-B2lLGnWS.js → FilterLines-BiHh13xm.js} +1 -1
- package/dist/client/assets/{Globe01-BSqLqa8H.js → Globe01-BqxI6QZP.js} +1 -1
- package/dist/client/assets/{HardDrive-BFG0b6vP.js → HardDrive-BwbAMrUb.js} +1 -1
- package/dist/client/assets/{Key01-DeIJhm73.js → Key01-qQx1LV2o.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CAachN7j.js → LayoutLeft-CpIWBcma.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C7Ulot5I.js → LinkExternal01-CXoDDgz6.js} +1 -1
- package/dist/client/assets/{Monitor01-RdLthi4L.js → Monitor01-DdJ7wtCm.js} +1 -1
- package/dist/client/assets/{Palette-D1rjO3C7.js → Palette-B-k8xsYD.js} +1 -1
- package/dist/client/assets/{Play-CL1Mgiwf.js → Play-CjnZZCXU.js} +1 -1
- package/dist/client/assets/{Plus-DINfOuqC.js → Plus-DhX2w18y.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DSZXx3HQ.js → RefreshCcw01-COCceFoS.js} +1 -1
- package/dist/client/assets/{SearchMd-Dt4Aj6N4.js → SearchMd-DrKxcX2-.js} +1 -1
- package/dist/client/assets/{Settings02-COHAF-aj.js → Settings02-YFMXLzh7.js} +1 -1
- package/dist/client/assets/{Shield01-Ef5O0H91.js → Shield01-C0lG89zR.js} +1 -1
- package/dist/client/assets/{Star01-DWr_psxV.js → Star01-DSZcWlXz.js} +1 -1
- package/dist/client/assets/{Stars01-CTAt_kJn.js → Stars01-CJvAL1Fd.js} +1 -1
- package/dist/client/assets/{Stars02-7S-x4jsE.js → Stars02-BZvUEwJW.js} +1 -1
- package/dist/client/assets/{Sun-C0yimusT.js → Sun-Bc4Ui5gi.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CdSYnpvh.js → SwitchHorizontal01-Dh0Hb3Cs.js} +1 -1
- package/dist/client/assets/{Tool01-Co9IzxOX.js → Tool01-C6w2kT2d.js} +1 -1
- package/dist/client/assets/{Trash01-m4F91Gbm.js → Trash01-CicwXof9.js} +1 -1
- package/dist/client/assets/{Upload01-BWuva6Fs.js → Upload01-Cjsy_A0C.js} +1 -1
- package/dist/client/assets/{User01-BQ6QP8OL.js → User01-C-Fxjmsz.js} +1 -1
- package/dist/client/assets/{Users01-ByzlIQ3F.js → Users01-Bcdl2fo8.js} +1 -1
- package/dist/client/assets/{Users03-mgRYViRT.js → Users03-BQUStXwY.js} +1 -1
- package/dist/client/assets/{X-D5DAti-0.js → X-BZgcfyxc.js} +1 -1
- package/dist/client/assets/{XCircle-BjeFLJxj.js → XCircle-DZXIRf5B.js} +1 -1
- package/dist/client/assets/{XClose-s3WJPw3-.js → XClose-BJgeWVDy.js} +1 -1
- package/dist/client/assets/{Zap-Z3n8EP6c.js → Zap-DHRMF6hr.js} +1 -1
- package/dist/client/assets/{ZapSquare-By7Cv3Wp.js → ZapSquare-DHYwZGs3.js} +1 -1
- package/dist/client/assets/{ZoomOut-CIHaUyEl.js → ZoomOut-DUCp8Gob.js} +1 -1
- package/dist/client/assets/{access-gate-Duof6cnb.js → access-gate-D3K4mW0p.js} +1 -1
- package/dist/client/assets/accordion-Dczz3n4d.js +1 -0
- package/dist/client/assets/{add-section-modal-DkoTaNoJ.js → add-section-modal-UjRtSYXi.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Ckkw1MUq.js → agent-capabilities-CTp309mj.js} +2 -2
- package/dist/client/assets/{agent-icon-VIqap9Jf.js → agent-icon-BGlV6q8v.js} +1 -1
- package/dist/client/assets/{agent-icons-D05ipmZ4.js → agent-icons-D51QBNe2.js} +1 -1
- package/dist/client/assets/{agents-list-CVx5qLnY.js → agents-list-BDjAtGII.js} +1 -1
- package/dist/client/assets/{ai-providers-BuKKX642.js → ai-providers-C5FRtqVa.js} +1 -1
- package/dist/client/assets/{alert-DlT05Ylq.js → alert-C2SAdiMn.js} +1 -1
- package/dist/client/assets/{alert-dialog-Ci1rMRpl.js → alert-dialog-CfIqXXf0.js} +1 -1
- package/dist/client/assets/app-editor-BtCGiT5R.js +1 -0
- package/dist/client/assets/{auth-catchall-BUCBz8XY.js → auth-catchall-BNIV3K68.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CY6KnHSz.js → auth-split-layout-Ur7ekzLQ.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dg6SIiTL.js → automation-list-row-BI945zvy.js} +1 -1
- package/dist/client/assets/{automation-runs-BmKdgkka.js → automation-runs-BYBNQ-JJ.js} +1 -1
- package/dist/client/assets/{automations-BcxEWxp4.js → automations-BS4h-ogy.js} +1 -1
- package/dist/client/assets/{avatar-B5XGLu28.js → avatar-CV-HskE0.js} +1 -1
- package/dist/client/assets/{badge-BiVWMQaC.js → badge-BIbhtFGp.js} +1 -1
- package/dist/client/assets/{brand-context-DSuk-fkh.js → brand-context-DoHj9jxR.js} +1 -1
- package/dist/client/assets/{buckets-DNim0Oxi.js → buckets-3KyheLMz.js} +1 -1
- package/dist/client/assets/{calendar-D3ybWgKx.js → calendar-anoyFX3_.js} +1 -1
- package/dist/client/assets/{capability-load-error-BoG7ZxlR.js → capability-load-error-5fpCsl-E.js} +1 -1
- package/dist/client/assets/{card-Bs_ZETWd.js → card-clJ4_TXy.js} +1 -1
- package/dist/client/assets/{chat-context-DXMK9LpM.js → chat-context-CMCmhu0x.js} +7 -7
- package/dist/client/assets/{checkbox-CDeLVmoz.js → checkbox-D5ZsgUiL.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DUzSXn1x.js → cli-auth-success-DUs_glfQ.js} +1 -1
- package/dist/client/assets/{collection-detail-B39xBZcf.js → collection-detail-DoORbeIU.js} +1 -1
- package/dist/client/assets/{collection-display-button-LYjUKJyD.js → collection-display-button-BHU3gVjd.js} +1 -1
- package/dist/client/assets/{collection-search-CIGzMvXg.js → collection-search-XnV7IoL4.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CRZ7umIR.js → collection-table-wrapper-Def6_fTh.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cl0Sce7d.js → collection-tabs-BL5EWXFo.js} +1 -1
- package/dist/client/assets/{collections-DsvWgjkq.js → collections-CjrPw-fH.js} +1 -1
- package/dist/client/assets/{command-nIpjgY_C.js → command-xElkUveT.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-D0cwbi62.js → connect-desktop-dialog-z9_d2OMY.js} +1 -1
- package/dist/client/assets/{connection-card-Js2GKnMD.js → connection-card-CdjjPmMy.js} +1 -1
- package/dist/client/assets/connection-detail-CLkds3z5.js +1 -0
- package/dist/client/assets/connection-form-helpers-x6Qv_JQD.js +1 -0
- package/dist/client/assets/{connections-BM65SkyA.js → connections-scTFfwYa.js} +1 -1
- package/dist/client/assets/constants-_NfKPeA7.js +10 -0
- package/dist/client/assets/{decopilot-sse-pool-xYuzxJCG.js → decopilot-sse-pool-uVjHemnd.js} +1 -1
- package/dist/client/assets/{dialog-BDoa-Aig.js → dialog-DAZt_PYz.js} +1 -1
- package/dist/client/assets/{domain-settings-BHKhY4wr.js → domain-settings-BeuJal2Z.js} +1 -1
- package/dist/client/assets/{drawer-DBoqm7Ga.js → drawer-DgVqJYUv.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BuEg85yr.js → dropdown-menu-D8Jq0EXH.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DROpH4YR.js → dynamic-plugin-layout-DfSmXQDS.js} +1 -1
- package/dist/client/assets/{empty-state-Ct_D2Lzo.js → empty-state-ClDtXUcE.js} +1 -1
- package/dist/client/assets/{empty-state-BzUpYoP8.js → empty-state-D2uf8sZL.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C73XSXJg.js → extract-connection-data-CXd7xn8D.js} +1 -1
- package/dist/client/assets/features-D5HpJxEl.js +1 -0
- package/dist/client/assets/{file-explorer-DIE7TBnv.js → file-explorer-0O3gnUbG.js} +1 -1
- package/dist/client/assets/{file-type-icon-CXEAWEt3.js → file-type-icon-CM5FDHHb.js} +1 -1
- package/dist/client/assets/{files-Dk2BQIKH.js → files-CbWK6Oem.js} +1 -1
- package/dist/client/assets/{form-CEHwzUIx.js → form-Bom2oLZH.js} +1 -1
- package/dist/client/assets/{general-D0Ux1V9u.js → general-C1lfdTH5.js} +1 -1
- package/dist/client/assets/{generate-id-DwXNdT-H.js → generate-id-Bloedyht.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CFHmzbdo.js → github-repo-picker-BLseIx3l.js} +2 -2
- package/dist/client/assets/{header-tab-button-Be5qNrZz.js → header-tab-button-HHwdKYUp.js} +3 -3
- package/dist/client/assets/{hover-card-CZKyvEKV.js → hover-card-BbAh8d7J.js} +1 -1
- package/dist/client/assets/{image-field-dhimK8za.js → image-field-A74OnXkk.js} +1 -1
- package/dist/client/assets/{index-CnvExC11.js → index-BztCosFc.js} +12 -12
- package/dist/client/assets/{index-OL8Ldzfm.js → index-CRqPsUNG.js} +12 -12
- package/dist/client/assets/{index-C1oz8tZO.js → index-Cwch4eob.js} +1 -1
- package/dist/client/assets/{index-3RJ1532Y.js → index-DFAITwpu.js} +1 -1
- package/dist/client/assets/{index-DJjaDA78.js → index-DKNjAJFI.js} +1 -1
- package/dist/client/assets/{index-BTP7FdvD.js → index-DNtm0JLi.js} +1 -1
- package/dist/client/assets/{index-fhh9LjnW.js → index-DRh6u24v.js} +1 -1
- package/dist/client/assets/{index-5FdhmN0u.js → index-DV3Yfg7N.js} +1 -1
- package/dist/client/assets/{index-D2E_r2Ga.js → index-DdDGbzVq.js} +1 -1
- package/dist/client/assets/{index-CX7SvFBB.js → index-DlenCt7g.js} +1 -1
- package/dist/client/assets/{index-DhlM3QdF.js → index-DoK0XiUD.js} +1 -1
- package/dist/client/assets/{index-qEEk-G84.js → index-DtS-92Oz.js} +1 -1
- package/dist/client/assets/{index-4cje1k2I.js → index-eZWazEyz.js} +4 -4
- package/dist/client/assets/{index-8Av7_XG5.js → index-kq5yUS_7.js} +30 -30
- package/dist/client/assets/{index-redirect-Cw9_x250.js → index-redirect-BE0FdN2x.js} +1 -1
- package/dist/client/assets/{index-B3HtVn_3.js → index-u752Wts1.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BPAoXqhZ.js → infiniteQueryObserver-BMRPwu0B.js} +1 -1
- package/dist/client/assets/{input-CFgdCIf-.js → input-CwrS-iub.js} +1 -1
- package/dist/client/assets/{integration-icon-ByZrCdpe.js → integration-icon-CpXFY6_W.js} +1 -1
- package/dist/client/assets/{label-D5ze4fbW.js → label-CLJ0AedA.js} +1 -1
- package/dist/client/assets/{layout-BuMBlDfo.js → layout-CRFmyheT.js} +1 -1
- package/dist/client/assets/{login-RbDPhsFB.js → login-ZDQxXAlc.js} +1 -1
- package/dist/client/assets/{members-k2G4ARa8.js → members-CETsRg6c.js} +2 -2
- package/dist/client/assets/{monaco-editor-BAqhsJzm.js → monaco-editor-DqjxL8qC.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DSa7vGTC.js → monitoring-stats-row-BtrtxUC2.js} +1 -1
- package/dist/client/assets/{oauth-callback-CbbBKuCW.js → oauth-callback-DKUIBnJx.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BRZTOWnt.js → oauth-callback-ai-provider-CQsd2o0a.js} +1 -1
- package/dist/client/assets/{onboarding-C6E_j9z8.js → onboarding-Dp9u-AR8.js} +1 -1
- package/dist/client/assets/org-install-B0DdE2Cp.js +1 -0
- package/dist/client/assets/{org-layout-UJeeaSgp.js → org-layout-CbZhwhjC.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BKs5_fCy.js → org-plugin-layout-nvcLwDDm.js} +1 -1
- package/dist/client/assets/{page-seo-form-nusKb5Sb.js → page-seo-form-BfAIN8Sl.js} +1 -1
- package/dist/client/assets/page-seo-sheet-1M0ZQCXy.js +1 -0
- package/dist/client/assets/{pair-B10kI-gZ.js → pair-Ddwa7ge4.js} +5 -5
- package/dist/client/assets/{plugin-empty-state-j4CULS57.js → plugin-empty-state-DIWYp1SI.js} +1 -1
- package/dist/client/assets/{plugin-header-DULj-Y49.js → plugin-header-BK3X79ek.js} +1 -1
- package/dist/client/assets/{plugin-layout-BKWVYVIi.js → plugin-layout-G84GIXAW.js} +1 -1
- package/dist/client/assets/{popover-CusBDsw3.js → popover-DsfanlnP.js} +1 -1
- package/dist/client/assets/{post-editor-DEyWVqiE.js → post-editor-HYnj9aMU.js} +1 -1
- package/dist/client/assets/{primitives-K-Cou-34.js → primitives-h_5eGcD7.js} +1 -1
- package/dist/client/assets/{profile-Cbty-wCE.js → profile-C_EEhrOq.js} +1 -1
- package/dist/client/assets/project-app-view-ClBF_FE1.js +1 -0
- package/dist/client/assets/record-editor-D_XxtmM1.js +1 -0
- package/dist/client/assets/registry-DuikH1Le.js +2 -0
- package/dist/client/assets/registry-layout-ClLggzAs.js +27 -0
- package/dist/client/assets/{require-capability-B58b3LsO.js → require-capability-B9yp1djm.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CLPqu2hV.js → required-auth-layout-BsLlfTDJ.js} +1 -1
- package/dist/client/assets/{reset-password-QvfJzQLt.js → reset-password-C2JTjbtA.js} +1 -1
- package/dist/client/assets/{resizable-DtVYiBv-.js → resizable-Bos_97Hr.js} +1 -1
- package/dist/client/assets/{roles-BJzMRSbv.js → roles-CBUmzMVz.js} +1 -1
- package/dist/client/assets/{save-status-CcrdCZvz.js → save-status-BbK1RQSX.js} +1 -1
- package/dist/client/assets/{schema-form-CLs9R9OM.js → schema-form-CUO9haBq.js} +1 -1
- package/dist/client/assets/{scroll-area-GY_MqX9m.js → scroll-area-Cq2TqSe0.js} +1 -1
- package/dist/client/assets/{search-input-CaIL3--R.js → search-input-W-g6XRjC.js} +1 -1
- package/dist/client/assets/{secrets-CEQKXAz2.js → secrets-BDICEFKM.js} +1 -1
- package/dist/client/assets/{sections-editor-3wx6-GfE.js → sections-editor-BaZsoyW0.js} +1 -1
- package/dist/client/assets/select-ci3BSqp5.js +1 -0
- package/dist/client/assets/{select-model-DV1-Oh57.js → select-model-DHOmXmSc.js} +1 -1
- package/dist/client/assets/{seo-editor-CwuvVAjS.js → seo-editor-BbPcLsSR.js} +1 -1
- package/dist/client/assets/{settings-layout-lPzeLZ6G.js → settings-layout-JiHWSow4.js} +1 -1
- package/dist/client/assets/{settings-section-rywQD1H8.js → settings-section-x9o4zXy4.js} +1 -1
- package/dist/client/assets/{sheet-HD1tdtUP.js → sheet-BwdJHIyp.js} +1 -1
- package/dist/client/assets/{shell-controls-CiR1mOgQ.js → shell-controls-Bk1-5JuX.js} +1 -1
- package/dist/client/assets/shell-layout-BSanGTZR.js +1 -0
- package/dist/client/assets/shell-route-loading-Oji4SthS.js +1 -0
- package/dist/client/assets/{sidebar-BTAYcbpn.js → sidebar-CZfP1p-N.js} +1 -1
- package/dist/client/assets/{skeleton-KPs8aExG.js → skeleton-C868IqtJ.js} +1 -1
- package/dist/client/assets/{sortable.esm-k9dnaUc0.js → sortable.esm-D3VtLwMe.js} +1 -1
- package/dist/client/assets/{spinner-CWHpDgnL.js → spinner-DFgihVtE.js} +1 -1
- package/dist/client/assets/{sso-DCJOVjP-.js → sso-Dd4ntKKA.js} +1 -1
- package/dist/client/assets/{store-QHf4NvZa.js → store-WLHJZJYL.js} +1 -1
- package/dist/client/assets/store-registry-Bipqg_S3.js +2 -0
- package/dist/client/assets/{switch-CCjru8jV.js → switch-dV1jxIo5.js} +1 -1
- package/dist/client/assets/{tab-id-Cj2zAp8p.js → tab-id-DQ11sDJ5.js} +1 -1
- package/dist/client/assets/{table-Dpu-CGxg.js → table-CHKmKoKb.js} +1 -1
- package/dist/client/assets/{tabs-Bsb3WneA.js → tabs-CSjv4io2.js} +1 -1
- package/dist/client/assets/{task-status-Bq8PHYFh.js → task-status-CAwvZzfY.js} +1 -1
- package/dist/client/assets/{textarea-Bw4v_xfm.js → textarea-CSfWC_ri.js} +1 -1
- package/dist/client/assets/{toggle-group-a9DpUbSj.js → toggle-group-D1uW02Dw.js} +1 -1
- package/dist/client/assets/{toolbar-BkMHRO8B.js → toolbar-C_QNuxJc.js} +1 -1
- package/dist/client/assets/{tools-list-CmaWZYdl.js → tools-list-DSls0TxE.js} +1 -1
- package/dist/client/assets/{tooltip-B9p8ywB_.js → tooltip-DjBYlSjK.js} +1 -1
- package/dist/client/assets/{types-5S14a687.js → types-I4bGGmPg.js} +19 -19
- package/dist/client/assets/{use-ai-providers-iJF3uFpo.js → use-ai-providers-BdU26Ah1.js} +1 -1
- package/dist/client/assets/{use-automations-BTipFIOi.js → use-automations-DOs6eBSZ.js} +1 -1
- package/dist/client/assets/{use-capability-CeWdChcL.js → use-capability-Dzq6Bisq.js} +1 -1
- package/dist/client/assets/use-collections-VJ2gqsdi.js +1 -0
- package/dist/client/assets/{use-connection-C2Ef-EqP.js → use-connection-CXK4eJ8D.js} +1 -1
- package/dist/client/assets/{use-copy-DPF-R5Zs.js → use-copy-DNF_xTyk.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-7QQxHiI4.js → use-create-virtual-mcp-YcZkU7UR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Da4caii8.js → use-debounced-autosave-B3zncsM_.js} +1 -1
- package/dist/client/assets/use-delete-connection-BwHdKngt.js +1 -0
- package/dist/client/assets/{use-file-configs-DWgNRokn.js → use-file-configs-DkyMSTLH.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BaBllFvG.js → use-infinite-scroll-HH8GENKX.js} +1 -1
- package/dist/client/assets/{use-list-state-d80zzrG8.js → use-list-state-DTTdz8wm.js} +1 -1
- package/dist/client/assets/use-mcp-prompts-CVpfcaNj.js +1 -0
- package/dist/client/assets/use-mcp-tools-PoAtDkM2.js +1 -0
- package/dist/client/assets/{use-members-D2U599cF.js → use-members-BtoFg3-I.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C3AzTy7G.js → use-navigate-to-agent-C9nwjmya.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BQe59WMu.js → use-org-auth-client-q5-USMbu.js} +1 -1
- package/dist/client/assets/{use-org-sso-BB-vyF4c.js → use-org-sso-zB87Inuk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DItwUayG.js → use-organization-roles-Bye-MpK5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B6tWOwuA.js → use-organization-settings--vsQI-Ms.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DIBKm4oO.js → use-registry-connections-BYv9Ob-m.js} +1 -1
- package/dist/client/assets/{use-secrets-BhZyR2Dx.js → use-secrets-uqIdLNLc.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Wb6qMNbl.js → use-status-sounds-DrT-Tr09.js} +1 -1
- package/dist/client/assets/{use-view-mode-BwvjqQMY.js → use-view-mode-Cp1ETvgV.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-z0hFit1f.js +1 -0
- package/dist/client/assets/useInfiniteQuery-JptJrV0H.js +1 -0
- package/dist/client/assets/{useRouterState-BLC1S9ll.js → useRouterState-fo-Z74Ek.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dg59byu5.js +1 -0
- package/dist/client/assets/{user-BHKPSALf.js → user-DIXNb7DL.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BabF7Sx4.js → view-mode-toggle-BaN0GlRl.js} +1 -1
- package/dist/client/assets/{workflow-BQFoQKwV.js → workflow-CE3SA7F3.js} +1 -1
- package/dist/client/assets/workflow-detail-CL1QoJdW.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +425 -415
- package/dist/server/migrate.js +57 -57
- package/dist/server/server.js +288 -278
- package/package.json +1 -1
- package/dist/client/assets/accordion-B1qqQUiM.js +0 -1
- package/dist/client/assets/app-editor-DNNG7_rJ.js +0 -1
- package/dist/client/assets/connection-detail-Db8Rqnlx.js +0 -1
- package/dist/client/assets/connection-form-helpers-Dkeln3L-.js +0 -1
- package/dist/client/assets/constants-DeFtLUND.js +0 -10
- package/dist/client/assets/features-CG5whIKN.js +0 -1
- package/dist/client/assets/org-install-Dj9o_O_M.js +0 -1
- package/dist/client/assets/page-seo-sheet-BpOn67AY.js +0 -1
- package/dist/client/assets/project-app-view-gakpd8ie.js +0 -1
- package/dist/client/assets/record-editor-BJCIZK6H.js +0 -1
- package/dist/client/assets/registry-IJiacnxJ.js +0 -2
- package/dist/client/assets/registry-layout-1N9kmpom.js +0 -27
- package/dist/client/assets/select-Y4AHPww8.js +0 -1
- package/dist/client/assets/shell-layout-D1gXYOI4.js +0 -1
- package/dist/client/assets/shell-route-loading-BMvdQN97.js +0 -1
- package/dist/client/assets/store-registry-O5u8x-zS.js +0 -2
- package/dist/client/assets/use-collections-CMMaRmVG.js +0 -1
- package/dist/client/assets/use-delete-connection-DaFBaRNm.js +0 -1
- package/dist/client/assets/use-mcp-prompts-1dd1yGOH.js +0 -1
- package/dist/client/assets/use-mcp-tools-C8LW1vg1.js +0 -1
- package/dist/client/assets/use-virtual-mcp-C_vD2kKw.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CQ_UxVw9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-XoWOrVYw.js +0 -1
- package/dist/client/assets/workflow-detail-CUEl0-_h.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b1 as l,j as s,a6 as O,bd as W,bt as X,bc as M,af as Z,bq as ee,bb as oe,a7 as te,e as A,c as E}from"./index-8Av7_XG5.js";import{T as re,g as ne,k as ce,l as V}from"./scroll-area-GY_MqX9m.js";import{i as ae}from"./ChevronRight-C6_Bb1P7.js";var d="Accordion",se=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[S,ie,le]=X(d),[C]=Z(d,[le,V]),k=V(),$=l.forwardRef((n,e)=>{const{type:o,...t}=n,c=t,r=t;return s.jsx(S.Provider,{scope:n.__scopeAccordion,children:o==="multiple"?s.jsx(ue,{...r,ref:e}):s.jsx(fe,{...c,ref:e})})});$.displayName=d;var[H,de]=C(d),[K,pe]=C(d,{collapsible:!1}),fe=l.forwardRef((n,e)=>{const{value:o,defaultValue:t,onValueChange:c=()=>{},collapsible:r=!1,...a}=n,[i,p]=M({prop:o,defaultProp:t??"",onChange:c,caller:d});return s.jsx(H,{scope:n.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:s.jsx(K,{scope:n.__scopeAccordion,collapsible:r,children:s.jsx(z,{...a,ref:e})})})}),ue=l.forwardRef((n,e)=>{const{value:o,defaultValue:t,onValueChange:c=()=>{},...r}=n,[a,i]=M({prop:o,defaultProp:t??[],onChange:c,caller:d}),p=l.useCallback(x=>i((u=[])=>[...u,x]),[i]),m=l.useCallback(x=>i((u=[])=>u.filter(I=>I!==x)),[i]);return s.jsx(H,{scope:n.__scopeAccordion,value:a,onItemOpen:p,onItemClose:m,children:s.jsx(K,{scope:n.__scopeAccordion,collapsible:!0,children:s.jsx(z,{...r,ref:e})})})}),[me,h]=C(d),z=l.forwardRef((n,e)=>{const{__scopeAccordion:o,disabled:t,dir:c,orientation:r="vertical",...a}=n,i=l.useRef(null),p=ee(i,e),m=ie(o),u=oe(c)==="ltr",I=te(n.onKeyDown,v=>{if(!se.includes(v.key))return;const J=v.target,j=m().filter(P=>!P.ref.current?.disabled),b=j.findIndex(P=>P.ref.current===J),T=j.length;if(b===-1)return;v.preventDefault();let f=b;const _=0,w=T-1,N=()=>{f=b+1,f>w&&(f=_)},R=()=>{f=b-1,f<_&&(f=w)};switch(v.key){case"Home":f=_;break;case"End":f=w;break;case"ArrowRight":r==="horizontal"&&(u?N():R());break;case"ArrowDown":r==="vertical"&&N();break;case"ArrowLeft":r==="horizontal"&&(u?R():N());break;case"ArrowUp":r==="vertical"&&R();break}const Q=f%T;j[Q].ref.current?.focus()});return s.jsx(me,{scope:o,disabled:t,direction:c,orientation:r,children:s.jsx(S.Slot,{scope:o,children:s.jsx(O.div,{...a,"data-orientation":r,ref:p,onKeyDown:t?void 0:I})})})}),g="AccordionItem",[xe,D]=C(g),L=l.forwardRef((n,e)=>{const{__scopeAccordion:o,value:t,...c}=n,r=h(g,o),a=de(g,o),i=k(o),p=W(),m=t&&a.value.includes(t)||!1,x=r.disabled||n.disabled;return s.jsx(xe,{scope:o,open:m,disabled:x,triggerId:p,children:s.jsx(ne,{"data-orientation":r.orientation,"data-state":F(m),...i,...c,ref:e,disabled:x,open:m,onOpenChange:u=>{u?a.onItemOpen(t):a.onItemClose(t)}})})});L.displayName=g;var G="AccordionHeader",U=l.forwardRef((n,e)=>{const{__scopeAccordion:o,...t}=n,c=h(d,o),r=D(G,o);return s.jsx(O.h3,{"data-orientation":c.orientation,"data-state":F(r.open),"data-disabled":r.disabled?"":void 0,...t,ref:e})});U.displayName=G;var y="AccordionTrigger",q=l.forwardRef((n,e)=>{const{__scopeAccordion:o,...t}=n,c=h(d,o),r=D(y,o),a=pe(y,o),i=k(o);return s.jsx(S.ItemSlot,{scope:o,children:s.jsx(re,{"aria-disabled":r.open&&!a.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...i,...t,ref:e})})});q.displayName=y;var Y="AccordionContent",B=l.forwardRef((n,e)=>{const{__scopeAccordion:o,...t}=n,c=h(d,o),r=D(Y,o),a=k(o);return s.jsx(ce,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...a,...t,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...n.style}})});B.displayName=Y;function F(n){return n?"open":"closed"}var ve=$,be=L,ge=U,Ae=q,Ce=B;function _e(n){const e=A.c(4);let o;e[0]!==n?({...o}=n,e[0]=n,e[1]=o):o=e[1];let t;return e[2]!==o?(t=s.jsx(ve,{"data-slot":"accordion",...o}),e[2]=o,e[3]=t):t=e[3],t}function we(n){const e=A.c(8);let o,t;e[0]!==n?({className:o,...t}=n,e[0]=n,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let c;e[3]!==o?(c=E("border-b last:border-b-0",o),e[3]=o,e[4]=c):c=e[4];let r;return e[5]!==t||e[6]!==c?(r=s.jsx(be,{"data-slot":"accordion-item",className:c,...t}),e[5]=t,e[6]=c,e[7]=r):r=e[7],r}function Ne(n){const e=A.c(11);let o,t,c;e[0]!==n?({className:t,children:o,...c}=n,e[0]=n,e[1]=o,e[2]=t,e[3]=c):(o=e[1],t=e[2],c=e[3]);let r;e[4]!==t?(r=E("focus-visible:border-ring focus-visible:ring-ring/20 flex flex-1 items-center justify-between gap-4 py-4 text-left text-sm font-medium transition-all outline-none hover:bg-accent/50 focus-visible:ring-[2px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-90",t),e[4]=t,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ae,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 transition-transform duration-200"}),e[6]=a):a=e[6];let i;return e[7]!==o||e[8]!==c||e[9]!==r?(i=s.jsx(ge,{className:"flex",children:s.jsxs(Ae,{"data-slot":"accordion-trigger",className:r,...c,children:[o,a]})}),e[7]=o,e[8]=c,e[9]=r,e[10]=i):i=e[10],i}function Re(n){const e=A.c(12);let o,t,c;e[0]!==n?({className:t,children:o,...c}=n,e[0]=n,e[1]=o,e[2]=t,e[3]=c):(o=e[1],t=e[2],c=e[3]);let r;e[4]!==t?(r=E("pt-0 pb-4",t),e[4]=t,e[5]=r):r=e[5];let a;e[6]!==o||e[7]!==r?(a=s.jsx("div",{className:r,children:o}),e[6]=o,e[7]=r,e[8]=a):a=e[8];let i;return e[9]!==c||e[10]!==a?(i=s.jsx(Ce,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...c,children:a}),e[9]=c,e[10]=a,e[11]=i):i=e[11],i}export{Ne as A,Re as a,_e as b,we as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as M,r as S,j as o,l as q}from"./index-8Av7_XG5.js";import{S as G}from"./scroll-area-GY_MqX9m.js";import{j as H,a4 as J,d as Q}from"./index-OL8Ldzfm.js";import{S as U}from"./schema-form-CLs9R9OM.js";import{S as W}from"./save-status-CcrdCZvz.js";import"./select-Y4AHPww8.js";import"./tooltip-B9p8ywB_.js";import"./Check-D-2DMeXR.js";import"./ChevronDown-DUb-OAcF.js";import"./ChevronUp-mT0kmu5O.js";import"./agent-capabilities-Ckkw1MUq.js";import"./pair-B10kI-gZ.js";import"./agent-icon-VIqap9Jf.js";import"./AlertCircle-Ctbek2zl.js";import"./Tool01-Co9IzxOX.js";import"./SwitchHorizontal01-CdSYnpvh.js";import"./RefreshCcw01-DSZXx3HQ.js";import"./XCircle-BjeFLJxj.js";import"./ArrowUpRight-CGlPrRsR.js";import"./ZapSquare-By7Cv3Wp.js";import"./Users03-mgRYViRT.js";import"./CheckCircle-CPLY3iX-.js";import"./ChevronLeft-IUSMXc7n.js";import"./ChevronRight-C6_Bb1P7.js";import"./DotsVertical-CYMPhMIv.js";import"./Container-V3OuMECL.js";import"./Eye-DLKlw-42.js";import"./ZoomOut-CIHaUyEl.js";import"./Globe01-BSqLqa8H.js";import"./FilterLines-B2lLGnWS.js";import"./Star01-DWr_psxV.js";import"./Palette-D1rjO3C7.js";import"./HardDrive-BFG0b6vP.js";import"./Stars02-7S-x4jsE.js";import"./Key01-DeIJhm73.js";import"./LayoutLeft-CAachN7j.js";import"./LinkExternal01-C7Ulot5I.js";import"./Monitor01-RdLthi4L.js";import"./Sun-C0yimusT.js";import"./Play-CL1Mgiwf.js";import"./Plus-DINfOuqC.js";import"./SearchMd-Dt4Aj6N4.js";import"./Settings02-COHAF-aj.js";import"./Shield01-Ef5O0H91.js";import"./Stars01-CTAt_kJn.js";import"./Trash01-m4F91Gbm.js";import"./Upload01-BWuva6Fs.js";import"./User01-BQ6QP8OL.js";import"./Users01-ByzlIQ3F.js";import"./XClose-s3WJPw3-.js";import"./X-D5DAti-0.js";import"./Zap-Z3n8EP6c.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DPF-R5Zs.js";import"./file-type-icon-CXEAWEt3.js";import"./dialog-BDoa-Aig.js";import"./content-blocks-o63cs2vh.js";import"./types-5S14a687.js";import"./constants-DeFtLUND.js";import"./chat-context-DXMK9LpM.js";import"./tab-id-Cj2zAp8p.js";import"./decopilot-sse-pool-xYuzxJCG.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-C_vD2kKw.js";import"./use-collections-CMMaRmVG.js";import"./use-ai-providers-iJF3uFpo.js";import"./use-organization-settings-B6tWOwuA.js";import"./shell-layout-D1gXYOI4.js";import"./avatar-B5XGLu28.js";import"./required-auth-layout-CLPqu2hV.js";import"./useRouterState-BLC1S9ll.js";import"./use-org-sso-BB-vyF4c.js";import"./integration-icon-ByZrCdpe.js";import"./use-navigate-to-agent-C3AzTy7G.js";import"./use-connection-C2Ef-EqP.js";import"./use-mcp-prompts-1dd1yGOH.js";import"./form-CEHwzUIx.js";import"./label-D5ze4fbW.js";import"./input-CFgdCIf-.js";import"./spinner-CWHpDgnL.js";import"./drawer-DBoqm7Ga.js";import"./collection-search-CIGzMvXg.js";import"./tabs-Bsb3WneA.js";import"./toggle-group-a9DpUbSj.js";import"./connect-desktop-dialog-D0cwbi62.js";import"./agent-icons-D05ipmZ4.js";import"./checkbox-CDeLVmoz.js";import"./skeleton-KPs8aExG.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-rywQD1H8.js";import"./card-Bs_ZETWd.js";import"./popover-CusBDsw3.js";import"./command-nIpjgY_C.js";import"./index-B3HtVn_3.js";import"./useInfiniteQuery-CQ_UxVw9.js";import"./infiniteQueryObserver-BPAoXqhZ.js";import"./sortable.esm-k9dnaUc0.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Js2GKnMD.js";import"./use-registry-connections-DIBKm4oO.js";import"./extract-connection-data-C73XSXJg.js";import"./generate-id-DwXNdT-H.js";import"./collections-DsvWgjkq.js";import"./collection-tabs-Cl0Sce7d.js";import"./badge-BiVWMQaC.js";import"./textarea-Bw4v_xfm.js";import"./connection-form-helpers-Dkeln3L-.js";import"./use-infinite-scroll-BaBllFvG.js";import"./useSuspenseInfiniteQuery-XoWOrVYw.js";import"./index-DhlM3QdF.js";import"./dropdown-menu-BuEg85yr.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BMvdQN97.js";import"./sidebar-BTAYcbpn.js";import"./sheet-HD1tdtUP.js";import"./toolbar-BkMHRO8B.js";import"./use-create-virtual-mcp-7QQxHiI4.js";import"./github-repo-picker-CFHmzbdo.js";import"./use-mcp-tools-C8LW1vg1.js";import"./alert-dialog-Ci1rMRpl.js";import"./index-D2E_r2Ga.js";import"./use-org-auth-client-BQe59WMu.js";import"./hover-card-CZKyvEKV.js";import"./task-status-Bq8PHYFh.js";import"./use-status-sounds-Wb6qMNbl.js";import"./empty-state-Ct_D2Lzo.js";import"./resizable-DtVYiBv-.js";import"./use-capability-CeWdChcL.js";import"./header-tab-button-Be5qNrZz.js";import"./index-CX7SvFBB.js";import"./user-BHKPSALf.js";import"./tools-list-CmaWZYdl.js";import"./switch-CCjru8jV.js";import"./use-debounced-autosave-Da4caii8.js";import"./index-5FdhmN0u.js";import"./search-input-CaIL3--R.js";import"./use-secrets-BhZyR2Dx.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B1qqQUiM.js";import"./view-mode-toggle-BabF7Sx4.js";import"./select-model-DV1-Oh57.js";import"./use-automations-BTipFIOi.js";import"./monaco-editor-BAqhsJzm.js";import"./automation-runs-BmKdgkka.js";import"./table-Dpu-CGxg.js";import"./use-members-D2U599cF.js";import"./automation-list-row-Dg6SIiTL.js";import"./calendar-D3ybWgKx.js";import"./image-field-dhimK8za.js";import"./use-file-configs-DWgNRokn.js";function qo(g){const t=M.c(38),{orgSlug:N,virtualMcpId:_,branch:k,blockKey:r,block:i,meta:m,title:E,excludeFields:n,schemaPending:C}=g,P=C===void 0?!1:C,e=typeof i?.__resolveType=="string"?i.__resolveType:"";let d;if(t[0]!==n||t[1]!==m||t[2]!==e){const c=e?H(e,m):null;d=c&&n?.length?{...c,properties:Object.fromEntries(Object.entries(c.properties??{}).filter(y=>{const[I]=y;return!n.includes(I)}))}:c,t[0]=n,t[1]=m,t[2]=e,t[3]=d}else d=t[3];const f=d;let u;t[4]!==i||t[5]!==r||t[6]!==m||t[7]!==E?(u=E??(i?J(r,i,m):r),t[4]=i,t[5]=r,t[6]=m,t[7]=E,t[8]=u):u=t[8];const B=u;let x;t[9]!==k||t[10]!==N||t[11]!==_?(x={orgSlug:N,virtualMcpId:_,branch:k},t[9]=k,t[10]=N,t[11]=_,t[12]=x):x=t[12];const{save:K,isPending:R}=Q(x),[A,L]=S.useState(r),[z,O]=S.useState(null),[V,D]=S.useState(0);let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[13]=h):h=t[13];const[w,$]=S.useState(h);A!==r&&(L(r),O(null),D(X),$([]));let v;t[14]!==i?(v=i??{},t[14]=i,t[15]=v):v=t[15];const F=z??v;let b;t[16]!==r||t[17]!==e||t[18]!==K?(b=c=>{const y=c;O(y),K(r,{...y,__resolveType:e})},t[16]=r,t[17]=e,t[18]=K,t[19]=b):b=t[19];const T=b;let p;t[20]!==B?(p=o.jsx("span",{className:"text-sm font-medium",children:B}),t[20]=B,t[21]=p):p=t[21];let s;t[22]!==R?(s=o.jsx(W,{isPending:R,isError:!1}),t[22]=R,t[23]=s):s=t[23];let l;t[24]!==p||t[25]!==s?(l=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[p,s]}),t[24]=p,t[25]=s,t[26]=l):l=t[26];let a;t[27]!==r||t[28]!==w||t[29]!==F||t[30]!==V||t[31]!==T||t[32]!==f||t[33]!==P?(a=o.jsx(G,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:f?o.jsx(U,{schema:f,value:F,onChange:T,basePath:"",breadcrumbPath:w,onBreadcrumbChange:$},`${r}:${V}`):P?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(q,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[27]=r,t[28]=w,t[29]=F,t[30]=V,t[31]=T,t[32]=f,t[33]=P,t[34]=a):a=t[34];let j;return t[35]!==l||t[36]!==a?(j=o.jsxs("div",{className:"flex h-full flex-col",children:[l,a]}),t[35]=l,t[36]=a,t[37]=j):j=t[37],j}function X(g){return g+1}export{qo as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as ge,aI as Ie,b6 as Ae,U as ce,aG as De,e as P,j as t,l as je,B as V,r as X,c as ve,q as J,s as $e,K as ne,f as Y,w as de,u as Pe,b7 as Oe,E as Me,g as ze,F as Ee,G as Ve,H as Ue,J as Fe,o as W,b8 as Re,I as Le}from"./index-8Av7_XG5.js";import{g as He}from"./generate-id-DwXNdT-H.js";import{E as be}from"./empty-state-Ct_D2Lzo.js";import{E as Be,c as Ge,r as qe,b as We,d as Xe}from"./connection-form-helpers-Dkeln3L-.js";import{c as Ke,S as Qe}from"./index-qEEk-G84.js";import{u as Ne,T as Je}from"./tools-list-CmaWZYdl.js";import{u as Ye}from"./use-members-D2U599cF.js";import{A as Ze}from"./avatar-B5XGLu28.js";import{a as ye,b as _e,u as et}from"./use-connection-C2Ef-EqP.js";import{u as ae,S as tt}from"./constants-DeFtLUND.js";import{b as st}from"./use-mcp-tools-C8LW1vg1.js";import{g as re,M as nt,a as ot}from"./types-5S14a687.js";import{a as it}from"./use-mcp-prompts-1dd1yGOH.js";import{I as oe}from"./integration-icon-ByZrCdpe.js";import{s as at}from"./Plus-DINfOuqC.js";import{q as rt,s as lt,a5 as ct,R as dt}from"./agent-icon-VIqap9Jf.js";import{a as Se}from"./Settings02-COHAF-aj.js";import{s as le}from"./Trash01-m4F91Gbm.js";import{b as mt,a as ut,d as xt,S as pt,c as ft}from"./sheet-HD1tdtUP.js";import{F as L,b as H,c as B,d as E,f as G,e as ht,a as gt}from"./form-CEHwzUIx.js";import{I as q}from"./input-CFgdCIf-.js";import{u as jt,D as vt}from"./use-delete-connection-DaFBaRNm.js";import{V as bt}from"./layout-BuMBlDfo.js";import{c as Nt,C as yt,B as _t,a as St,b as Ct,d as wt,e as kt}from"./monitoring-stats-row-DSa7vGTC.js";import{a as Tt}from"./use-virtual-mcp-C_vD2kKw.js";import{i as Ce}from"./ChevronRight-C6_Bb1P7.js";import{a as we}from"./Users03-mgRYViRT.js";import{T as ee,a as It,b as te,c as At}from"./tabs-Bsb3WneA.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as Dt}from"./ZapSquare-By7Cv3Wp.js";import{b as $t}from"./Tool01-Co9IzxOX.js";import{C as Pt}from"./collection-search-CIGzMvXg.js";import{C as Ot}from"./card-Bs_ZETWd.js";import{B as Mt}from"./badge-BiVWMQaC.js";import{D as zt,a as Et,b as Vt,c as me}from"./dropdown-menu-BuEg85yr.js";import{d as ue,S as xe,a as pe,b as fe,c as R}from"./select-Y4AHPww8.js";import{i as Ut}from"./CheckCircle-CPLY3iX-.js";import{t as Ft}from"./ChevronDown-DUb-OAcF.js";import{n as Rt}from"./Container-V3OuMECL.js";import{s as se}from"./Star01-DWr_psxV.js";import{s as Lt}from"./RefreshCcw01-DSZXx3HQ.js";import{s as Ht}from"./XClose-s3WJPw3-.js";import"./collections-DsvWgjkq.js";import"./ZoomOut-CIHaUyEl.js";import"./Key01-DeIJhm73.js";import"./index-CnvExC11.js";import"./index-DJjaDA78.js";import"./extract-connection-data-C73XSXJg.js";import"./use-registry-connections-DIBKm4oO.js";import"./use-organization-settings-B6tWOwuA.js";import"./index-B3HtVn_3.js";import"./popover-CusBDsw3.js";import"./tooltip-B9p8ywB_.js";import"./Check-D-2DMeXR.js";import"./SearchMd-Dt4Aj6N4.js";import"./use-create-virtual-mcp-7QQxHiI4.js";import"./use-navigate-to-agent-C3AzTy7G.js";import"./Eye-DLKlw-42.js";import"./use-org-auth-client-BQe59WMu.js";import"./User01-BQ6QP8OL.js";import"./use-collections-CMMaRmVG.js";import"./AlertCircle-Ctbek2zl.js";import"./SwitchHorizontal01-CdSYnpvh.js";import"./XCircle-BjeFLJxj.js";import"./ArrowUpRight-CGlPrRsR.js";import"./ChevronLeft-IUSMXc7n.js";import"./ChevronUp-mT0kmu5O.js";import"./DotsVertical-CYMPhMIv.js";import"./Globe01-BSqLqa8H.js";import"./FilterLines-B2lLGnWS.js";import"./Palette-D1rjO3C7.js";import"./HardDrive-BFG0b6vP.js";import"./Stars02-7S-x4jsE.js";import"./LayoutLeft-CAachN7j.js";import"./LinkExternal01-C7Ulot5I.js";import"./Monitor01-RdLthi4L.js";import"./Sun-C0yimusT.js";import"./Play-CL1Mgiwf.js";import"./Shield01-Ef5O0H91.js";import"./Stars01-CTAt_kJn.js";import"./Upload01-BWuva6Fs.js";import"./Users01-ByzlIQ3F.js";import"./X-D5DAti-0.js";import"./Zap-Z3n8EP6c.js";import"./label-D5ze4fbW.js";import"./alert-dialog-Ci1rMRpl.js";import"./index-5FdhmN0u.js";import"./sidebar-BTAYcbpn.js";const Bt=ge({scopes:De(ce()).describe("List of scopes available"),stateSchema:Ie(ce(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Gt=[{name:"MCP_CONFIGURATION",inputSchema:ge({}),outputSchema:Bt}];function qt(s){const e=P.c(46),{instance:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i}=s;let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const l=Ne(d),m=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",c=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==c?(h=ve("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",c),e[2]=c,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let v;e[7]!==n.title?(v=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=v):v=e[8];let b;e[9]!==n.status||e[10]!==p||e[11]!==m?(b=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?"Disabled (error)":"Disabled"}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=b):b=e[12];let j;e[13]!==v||e[14]!==b?(j=t.jsxs("div",{className:"flex-1 min-w-0",children:[v,b]}),e[13]=v,e[14]=b,e[15]=j):j=e[15];let N;e[16]!==n||e[17]!==m||e[18]!==r?(N=m&&t.jsx(V,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[16]=n,e[17]=m,e[18]=r,e[19]=N):N=e[19];let T;e[20]!==n||e[21]!==p||e[22]!==i?(T=p?t.jsxs(V,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>i(n,"active"),children:[t.jsx(rt,{size:13}),"Enable"]}):t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>i(n,"inactive"),title:"Disable",children:t.jsx(lt,{size:13})}),e[20]=n,e[21]=p,e[22]=i,e[23]=T):T=e[23];let C;e[24]!==n||e[25]!==a?(C=()=>a(n),e[24]=n,e[25]=a,e[26]=C):C=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Se,{size:13}),e[27]=y):y=e[27];let I;e[28]!==C?(I=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:C,title:"Configure",children:y}),e[28]=C,e[29]=I):I=e[29];let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(le,{size:13}),e[33]=k):k=e[33];let S;e[34]!==_?(S=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:_,title:"Delete",children:k}),e[34]=_,e[35]=S):S=e[35];let f;e[36]!==I||e[37]!==S||e[38]!==N||e[39]!==T?(f=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[N,T,I,S]}),e[36]=I,e[37]=S,e[38]=N,e[39]=T,e[40]=f):f=e[40];let w;return e[41]!==f||e[42]!==h||e[43]!==g||e[44]!==j?(w=t.jsxs("div",{className:h,children:[g,j,f]}),e[41]=f,e[42]=h,e[43]=g,e[44]=j,e[45]=w):w=e[45],w}function Wt(s){const e=P.c(15),{instance:n,onConfigure:a}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let i;e[5]!==n||e[6]!==a?(i=()=>a(n),e[5]=n,e[6]=a,e[7]=i):i=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Se,{size:13}),e[8]=d):d=e[8];let l;e[9]!==i?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i,title:"Configure",children:d})}),e[9]=i,e[10]=l):l=e[10];let x;return e[11]!==r||e[12]!==o||e[13]!==l?(x=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,l]}),e[11]=r,e[12]=o,e[13]=l,e[14]=x):x=e[14],x}function Xt(s){const e=P.c(27),{instances:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i,onAdd:d,isAdding:l}=s;if(n.length===0)return null;const x=n.length===1?"Instance":"Instances";let m;e[0]!==x?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:x}),e[0]=x,e[1]=m):m=e[1];let p;e[2]!==l?(p=l?t.jsx(je,{size:13,className:"animate-spin"}):t.jsx(at,{size:13}),e[2]=l,e[3]=p):p=e[3];let c;e[4]!==l||e[5]!==d||e[6]!==p?(c=t.jsxs(V,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:d,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=d,e[6]=p,e[7]=c):c=e[7];let h;e[8]!==m||e[9]!==c?(h=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,c]}),e[8]=m,e[9]=c,e[10]=h):h=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==i){let j;e[17]!==r||e[18]!==a||e[19]!==o||e[20]!==i?(j=N=>t.jsx(X.Suspense,{fallback:t.jsx(Wt,{instance:N,onConfigure:a}),children:t.jsx(qt,{instance:N,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i})},N.id),e[17]=r,e[18]=a,e[19]=o,e[20]=i,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=a,e[14]=o,e[15]=i,e[16]=g}else g=e[16];let v;e[22]!==g?(v=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:g}),e[22]=g,e[23]=v):v=e[23];let b;return e[24]!==h||e[25]!==v?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[h,v]}),e[24]=h,e[25]=v,e[26]=b):b=e[26],b}const Kt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Qt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Jt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Yt(s){const e=P.c(4),{connectionId:n,orgId:a,orgSlug:r,timeframe:o}=s;let i;e[0]!==a||e[1]!==r?(i={connectionId:tt,orgId:a,orgSlug:r},e[0]=a,e[1]=r,e[2]=i):i=e[2];const d=ae(i),l=Qt(o),{data:x}=$e({queryKey:ne.connectionActivity(n,o,a),queryFn:async()=>{const g=await d.callTool({name:"MONITORING_LOGS_LIST",arguments:{startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}});return g.structuredContent??g},staleTime:3e5}),m=Nt(x?.logs??[],l),p=m.data,c=m.totalCalls>0;let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[3]=h):h=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),h]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),c?t.jsxs("div",{children:[t.jsx(yt,{config:Jt,className:"h-16 w-full",children:t.jsxs(_t,{data:p,barCategoryGap:"4%",children:[t.jsx(St,{content:t.jsx(Ct,{labelFormatter:es}),cursor:{fill:"var(--muted)"}}),t.jsx(wt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(Zt)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})})]})}function Zt(s,e){return t.jsx(kt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function es(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function ts(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ss(s){const e=P.c(14),{connectionId:n}=s,[a,r]=X.useState("14d"),{org:o}=J();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=i):i=e[0];let d;e[1]!==a?(d=Kt.map(c=>t.jsx("button",{type:"button",onClick:()=>r(c.value),className:ve("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",a===c.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value)),e[1]=a,e[2]=d):d=e[2];let l;e[3]!==d?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[i,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=l):l=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(ts,{}),e[5]=x):x=e[5];let m;e[6]!==n||e[7]!==o.id||e[8]!==o.slug||e[9]!==a?(m=t.jsx(X.Suspense,{fallback:x,children:t.jsx(Yt,{connectionId:n,orgId:o.id,orgSlug:o.slug,timeframe:a})}),e[6]=n,e[7]=o.id,e[8]=o.slug,e[9]=a,e[10]=m):m=e[10];let p;return e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13],p}function ns(s){const e=P.c(15),{virtualMcp:n,org:a}=s,r=Y();let o;e[0]!==r||e[1]!==a||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:a,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=a,e[2]=n.id,e[3]=o):o=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(we,{size:16}),e[4]=i):i=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:i}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=x):x=e[10];let m;return e[11]!==o||e[12]!==d||e[13]!==l?(m=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,l,x]}),e[11]=o,e[12]=d,e[13]=l,e[14]=m):m=e[14],m}function os(s){const e=P.c(7),{virtualMcps:n,org:a}=s;let r;if(e[0]!==a||e[1]!==n){let i;e[3]!==a?(i=d=>t.jsx(ns,{virtualMcp:d,org:a},d.id),e[3]=a,e[4]=i):i=e[4],r=n.map(i),e[0]=a,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function is(s){const e=P.c(7),{connection:n}=s,{org:a}=J();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=Tt(r);if(!(o.length>0)){let x;return e[2]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(t.Fragment,{}),e[2]=x):x=e[2],x}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let l;return e[4]!==a.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(os,{virtualMcps:o,org:a.slug})})]}),e[4]=a.slug,e[5]=o,e[6]=l):l=e[6],l}function as(s){const e=P.c(31),{tools:n,connectionId:a,org:r}=s,o=Y(),{org:i}=J();let d;e[0]!==a||e[1]!==i.id||e[2]!==i.slug?(d={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=a,e[1]=i.id,e[2]=i.slug,e[3]=d):d=e[3];const l=ae(d),x=ye(a);let m;e[4]!==x||e[5]!==a?(m=x?ke(x):a,e[4]=x,e[5]=a,e[6]=m):m=e[6];const p=m,[c,h]=X.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==n){const C=(n??[]).filter(rs),y=c.toLowerCase().trim(),I=y?C.filter(f=>f.name.toLowerCase().includes(y)||f.description&&f.description.toLowerCase().includes(y)):C;let _;e[17]!==p||e[18]!==o||e[19]!==r?(_=f=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(f.name)}})},e[17]=p,e[18]=o,e[19]=r,e[20]=_):_=e[20];const k=_;b="flex flex-col h-full overflow-hidden";let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=f=>{f.key==="Escape"&&(h(""),f.target.blur())},e[21]=S):S=e[21],e[22]!==c?(j=t.jsx(Pt,{value:c,onChange:h,placeholder:"Search apps...",onKeyDown:S}),e[22]=c,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(be,{image:null,title:c?"No apps found":"No apps available",description:c?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:I.map(f=>{const w=re(f._meta);return t.jsxs(Ot,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>k(f),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(nt,{resourceURI:w,toolInfo:{tool:f},displayMode:"inline",minHeight:200,maxHeight:200,client:l})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:f.name}),t.jsx(Je,{annotations:f.annotations,_meta:f._meta})]}),f.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:f.description})]})]},f.name)})}),e[7]=p,e[8]=l,e[9]=o,e[10]=r,e[11]=c,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let N;e[24]!==g||e[25]!==v?(N=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=N):N=e[26];let T;return e[27]!==b||e[28]!==j||e[29]!==N?(T=t.jsxs("div",{className:b,children:[j,N]}),e[27]=b,e[28]=j,e[29]=N,e[30]=T):T=e[30],T}function rs(s){return!!re(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=i=>i.charAt(0).toUpperCase()+i.slice(1),a=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&a.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let a;return e[0]!==n?(a=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=a):a=e[1],a}function ls(s){const e=P.c(50),{tools:n,prompts:a,resources:r,connectionId:o,org:i}=s;let d;e[0]!==a?(d=a===void 0?[]:a,e[0]=a,e[1]=d):d=e[1];const l=d;let x;e[2]!==r?(x=r===void 0?[]:r,e[2]=r,e[3]=x):x=e[3];const m=x,p=Y(),c=ye(o??"");let h;e[4]!==c||e[5]!==o?(h=c?ke(c):o,e[4]=c,e[5]=o,e[6]=h):h=e[6];const g=h;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==i?(v=function(D){!o||!i||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(D)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=i,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==i||e[14]!==n?(j=o&&i&&n.some(ms),e[12]=o,e[13]=i,e[14]=n,e[15]=j):j=e[15];const N=j;if(n.length+l.length+m.length===0){let u;return e[16]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=u):u=e[16],u}let C;e[17]!==n.length?(C=t.jsxs(ee,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=C):C=e[18];let y;e[19]!==N?(y=N&&t.jsx(ee,{value:"apps",variant:"underline",children:"UI"}),e[19]=N,e[20]=y):y=e[20];let I,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ee,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(ee,{value:"resources",variant:"underline",children:"Resources"}),e[21]=I,e[22]=_):(I=e[21],_=e[22]);let k;e[23]!==C||e[24]!==y?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(It,{variant:"underline",className:"gap-1",children:[C,y,I,_]})}),e[23]=C,e[24]=y,e[25]=k):k=e[25];let S;e[26]!==b||e[27]!==n?(S=n.length>0?n.map(u=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(u.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(u.name)}),u.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:u.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},u.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=S):S=e[28];let f;e[29]!==S?(f=t.jsx(te,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:S})}),e[29]=S,e[30]=f):f=e[30];let w;e[31]!==o||e[32]!==N||e[33]!==i||e[34]!==n?(w=N&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(as,{tools:n,connectionId:o,org:i})}),e[31]=o,e[32]=N,e[33]=i,e[34]=n,e[35]=w):w=e[35];let M;e[36]!==l?(M=l.length>0?l.map(ds):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let A;e[40]!==m?(A=m.length>0?m.map(cs):t.jsx(ie,{label:"resources"}),e[40]=m,e[41]=A):A=e[41];let z;e[42]!==A?(z=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=z):z=e[43];let U;return e[44]!==k||e[45]!==f||e[46]!==w||e[47]!==O||e[48]!==z?(U=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(At,{defaultValue:"tools",variant:"underline",children:[k,f,w,O,z]})}),e[44]=k,e[45]=f,e[46]=w,e[47]=O,e[48]=z,e[49]=U):U=e[49],U}function cs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ct,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function ds(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function ms(s){return re(s._meta)}function us(s){const e=P.c(13),{connection:n,displayTitle:a}=s,r=a??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(oe,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let i;e[3]!==r?(i=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=i):i=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let l;e[7]!==i||e[8]!==d?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[i,d]}),e[7]=i,e[8]=d,e[9]=l):l=e[9];let x;return e[10]!==o||e[11]!==l?(x=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,l]}),e[10]=o,e[11]=l,e[12]=x):x=e[12],x}function xs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:a,onRemoveOAuth:r}){const o=de({control:s.control,name:"ui_type"}),i=de({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Pe(),l=(()=>{if(typeof i!="string"||!i)return!1;try{const c=new URL(i);return c.hostname==="api.githubcopilot.com"&&c.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),x=d||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Oe(e.connection_url):null;return m?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(L,{control:s.control,name:"ui_type",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(ue,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsxs(xe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(pe,{})]})}),t.jsxs(fe,{children:[t.jsx(R,{value:"HTTP",children:"HTTP"}),t.jsx(R,{value:"SSE",children:"SSE"}),t.jsx(R,{value:"Websocket",children:"Websocket"}),x&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:"NPX Package"}),t.jsx(R,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(L,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(E,{children:t.jsx(q,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(ue,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsx(xe,{className:"h-10",children:t.jsx(pe,{})})}),t.jsxs(fe,{children:[t.jsx(R,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(R,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(R,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),x&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Rt,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(R,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(G,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(E,{children:t.jsx(q,{placeholder:"@perplexity-ai/mcp-server",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(L,{control:s.control,name:"stdio_command",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(E,{children:t.jsx(q,{placeholder:"node, bun, python...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(E,{children:t.jsx(q,{placeholder:"arg1 arg2 --flag value",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(G,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(E,{children:t.jsx(q,{placeholder:"/path/to/project (optional)",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(E,{children:t.jsx(Be,{value:c.value??[],onChange:c.onChange})}),t.jsx(G,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:l?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(zt,{children:[t.jsx(Et,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Mt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ut,{size:12}),"Authenticated via OAuth",t.jsx(Ft,{size:12})]})})}),t.jsxs(Vt,{align:"start",children:[t.jsxs(me,{onClick:a,children:[t.jsx(Lt,{size:16}),"Re-authenticate"]}),t.jsxs(me,{variant:"destructive",onClick:r,children:[t.jsx(le,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&c.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>c.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(E,{children:t.jsx(q,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(ht,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(G,{})]})})]})}function ps(s){return s.command==="npx"}function fs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function hs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function he(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Re(s.connection_headers)){const a=s.connection_headers,r=qe(a.envVars);if(ps(a)){const i=fs(a);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:i,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=hs(a);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function gs(s){let e,n=null,a=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",a=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...a&&{connection_token:a},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function js({connection:s,connectionId:e,org:n,isUpdating:a,tools:r,prompts:o,resources:i,siblings:d}){const l=Y({from:"/$org/settings/connections/$appSlug"}),x=Ee(),m=_e(),{org:p}=J(),c=jt({onSuccess:()=>{d.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=X.useState(null),[v,b]=X.useState(!1),j=Ne({connectionId:e}),{data:N}=Ye(),T=N?.data?.members??[],C=h??s,y=T.find(u=>u.userId===C.created_by),_=s?.connection_type==="VIRTUAL"||j.isAuthenticated,k={...s,tools:r},S=Ke(k,Gt),f=Ve({resolver:Ue(Ge),values:he(h??s)}),w=f.formState.isDirty,M=async()=>{if(!await f.trigger())return;const D=f.getValues(),$=gs(D),F=h?.id??e;await m.update.mutateAsync({id:F,data:$}),f.reset(D)},O=()=>{f.reset(he(h??s))},A=async u=>{const{token:D,tokenInfo:$,error:F}=await Le({connectionId:u,orgSlug:p.slug,scope:"offline_access"});if(F||!D){W.error(`Authentication failed: ${F}`);return}if($)try{const K=await fetch(`/api/${p.slug}/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:$.accessToken,refreshToken:$.refreshToken,expiresIn:$.expiresIn,scope:$.scope,clientId:$.clientId,clientSecret:$.clientSecret,tokenEndpoint:$.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await m.update.mutateAsync({id:u,data:{connection_token:D}});else try{await m.update.mutateAsync({id:u,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(K){console.error("Error saving OAuth token:",K),await m.update.mutateAsync({id:u,data:{connection_token:D}})}else await m.update.mutateAsync({id:u,data:{connection_token:D}});const Q=new URL(`/api/${p.slug}/mcp/${u}`,window.location.origin);await x.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await x.invalidateQueries({queryKey:ne.mcpClientPrefix()}),W.success("Authentication successful")},z=()=>A(s.id),U=async()=>{try{const u=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!u.ok){const $=await u.text();W.error(`Failed to remove OAuth: ${$}`);return}const D=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await x.invalidateQueries({queryKey:ne.isMCPAuthenticated(D.href,null)}),W.success("OAuth removed. You can now re-authenticate with a different account.")}catch(u){console.error("Error removing OAuth token:",u),W.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(vt,{...c}),t.jsx(mt,{open:h!==null,onOpenChange:u=>{u||g(null)},children:t.jsxs(ut,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(xt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(pt,{className:"text-base",children:h?.title??s.title}),t.jsx(ft,{className:"text-xs",children:"Update URL, authentication, and other settings"}),y&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ze,{url:y.user?.image??void 0,fallback:y.user?.name??y.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:y.user?.name||y.user?.email})]})]}),t.jsxs(gt,{...f,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(L,{control:f.control,name:"title",render:({field:u})=>t.jsxs(H,{children:[t.jsx(B,{children:"Name"}),t.jsx(E,{children:t.jsx(q,{...u})}),t.jsx(G,{})]})}),t.jsx(L,{control:f.control,name:"description",render:({field:u})=>t.jsxs(H,{children:[t.jsx(B,{children:"Description"}),t.jsx(E,{children:t.jsx(q,{...u,value:u.value||""})}),t.jsx(G,{})]})})]}),t.jsx(xs,{form:f,connection:h??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:U}),t.jsx(Qe,{connection:h??s,form:f,hasMcpBinding:S,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(V,{onClick:M,disabled:!w||a,className:"flex-1",children:a?"Saving…":"Save changes"}),w&&t.jsx(V,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(V,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const u=h??s;g(null),c.requestDelete(u)},children:[t.jsx(le,{size:15}),"Delete"]})]})]},h?.id??s.id)]})}),t.jsx(bt,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(us,{connection:s,displayTitle:(()=>{const u=d[0]??s;return u.app_name?u.title.replace(/\s*\(\d+\)\s*$/,""):u.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ss,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Xt,{instances:d,onConfigure:u=>g(u),onAuthenticate:u=>A(u.id),onDelete:u=>c.requestDelete(u),onToggleStatus:async(u,D)=>{try{await m.update.mutateAsync({id:u.id,data:{status:D}}),W.success(D==="active"?"Connection enabled":"Connection disabled")}catch{W.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const u=d[0]??s,D=u.title.replace(/\s*\(\d+\)\s*$/,""),$=d.length+1,F=`${D} (${$})`,Q=He("conn");await m.create.mutateAsync({id:Q,title:F,description:u.description??null,connection_type:u.connection_type,connection_url:u.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:u.created_by,organization_id:u.organization_id,icon:u.icon??null,app_name:u.app_name??null,app_id:u.app_id??null,connection_headers:u.connection_headers??null,oauth_config:null,configuration_state:u.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await Fe({url:K.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(is,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ls,{tools:r,prompts:o,resources:i,connectionId:e,org:n})})]})})]})})]})}function vs(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:r,org:o}=ze(a),{org:i}=J(),d=_e();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const x=et(l),m=x[0]??null,p=m?.id??"",c=p||null;let h;s[4]!==i.id||s[5]!==i.slug||s[6]!==c?(h={connectionId:c,orgId:i.id,orgSlug:i.slug},s[4]=i.id,s[5]=i.slug,s[6]=c,s[7]=h):h=s[7];const g=ae(h);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=st(v);let j;if(s[10]!==m?.tools||s[11]!==p||s[12]!==x||s[13]!==b){const A=b?b.tools.map(Cs):(m?.tools??[]).map(Ss);e:{if(x.length<=1){j=A;break e}const z=new Set,U=[],u=ys;for(const D of x){const $=D.id===p?A:u(D.tools);for(const F of $)z.has(F.name)||(z.add(F.name),U.push(F))}j=U.length>0?U:A}s[10]=m?.tools,s[11]=p,s[12]=x,s[13]=b,s[14]=j}else j=s[14];const N=j;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:C}=it(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=ot(y);let _;s[19]!==C?.prompts?(_=C?.prompts??[],s[19]=C?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(Ns),s[21]=_,s[22]=k):k=s[22];const S=k;let f;s[23]!==I?.resources?(f=I?.resources??[],s[23]=I?.resources,s[24]=f):f=s[24];let w;s[25]!==f?(w=f.map(bs),s[25]=f,s[26]=w):w=s[26];const M=w;if(!m){let A;return s[27]!==n||s[28]!==o?(A=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(be,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(V,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=A):A=s[29],A}let O;return s[30]!==d.update.isPending||s[31]!==N||s[32]!==m||s[33]!==p||s[34]!==o||s[35]!==S||s[36]!==M||s[37]!==x?(O=t.jsx(js,{org:o,connection:m,connectionId:p,isUpdating:d.update.isPending,tools:N,prompts:S,resources:M,siblings:x}),s[30]=d.update.isPending,s[31]=N,s[32]=m,s[33]=p,s[34]=o,s[35]=S,s[36]=M,s[37]=x,s[38]=O):O=s[38],O}function bs(s){return{name:s.name,description:s.description,uri:s.uri}}function Ns(s){return{name:s.name,description:s.description}}function ys(s){return(s??[]).map(_s)}function _s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ss(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Cs(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ws(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Me,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(je,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(vs,{})})}),s[0]=e):e=s[0],e}function lo(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ws,{}),s[0]=e):e=s[0],e}export{lo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R,aI as V,b6 as A,U as a,aG as j,aH as z,e as L,j as u,B as C}from"./index-8Av7_XG5.js";import{I as H}from"./input-CFgdCIf-.js";import{s as W}from"./Plus-DINfOuqC.js";import{s as q}from"./Trash01-m4F91Gbm.js";const K=R({key:a().min(1,"Key is required"),value:a()}),M=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:V(a(),A()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function U(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:U(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function I(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=I(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=I(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{cw as ce,cx as le,cy as ue,bX as de,cz as he,bA as p,bB as w,cA as fe,cB as pe,cC as me,cD as M,cE as _e,cF as L,cG as ge,cH as q,cI as we,cJ as U,cK as Te,cL as ye,cM as ve,cN as z,bv as ke,cO as Se,cP as Ce,bS as X,c3 as be,c9 as Re,c7 as Ie,cQ as Ee,cR as qe,cS as Pe,cT as $,cU as Ae,cV as Me,c8 as $e,c4 as He,c5 as Oe,c6 as Ne,c2 as xe,cW as De,cX as Le,cY as Ue,bZ as Fe,cZ as je,c_ as Ve,c$ as P,d0 as H,d1 as W,d2 as ze,ca as x,e as ee,s as te}from"./index-8Av7_XG5.js";const j={authConfig:()=>["authConfig"],threads:s=>["threads",s],virtualMcpThreads:(s,e)=>["threads",s,"virtual-mcp",e],thread:(s,e)=>["thread",s,e],threadMessages:(s,e)=>["thread-messages",s,e],messages:s=>["messages",s],organizations:()=>["organizations"],members:s=>[s,"members"],invitations:s=>[s,"invitations"],organizationRoles:s=>[s,"organization-roles"],connections:s=>[s,"connections"],connectionsByBinding:(s,e)=>[s,"connections",`binding:${e}`],connection:(s,e)=>[s,"connection",e],isMCPAuthenticated:(s,e)=>["is-mcp-authenticated",s,e],mcpTools:(s,e)=>["mcp","tools",s,e],mcpClient:(s,e,t,r)=>["mcp","client",s,e,t,r],mcpToolsList:s=>["mcp","client",s,"tools"],mcpResourcesList:s=>["mcp","client",s,"resources"],mcpPromptsList:s=>["mcp","client",s,"prompts"],mcpReadResource:(s,e)=>["mcp","client",s,"resource",e],mcpGetPrompt:(s,e,t)=>["mcp","client",s,"prompt",e,t],mcpToolCall:(s,e,t)=>["mcp","client",s,"tool-call",e,t],organizationSettings:s=>["organization-settings",s],activeOrganization:s=>["activeOrganization",s],modelsList:s=>["models-list",s],virtualMcpLastUsed:(s,e)=>["virtual-mcp","last-used",s,e],connectionCollections:s=>[s,"collections","discovery"],toolCall:(s,e,t)=>["tool-call",s,e,t],collectionItems:(s,e)=>["collection",s,e],collection:(s,e,t)=>[s,e,"collection",t],collectionItem:(s,e,t,r,o)=>[s,e,t,"collection",r,o],collectionList:(s,e,t,r,o)=>[s,e,t,"collection",r,"list",o],collectionListInfinite:(s,e,t,r,o)=>[s,e,t,"collection",r,"list-infinite",o],githubReadme:(s,e)=>["github-readme",s,e],githubBranches:(s,e,t,r,o)=>["github-branches",s,e,t,r,o],monitoringStats:()=>["monitoring","stats"],monitoringLogs:s=>["monitoring","logs",s],monitoringLogsInfinite:(s,e)=>["monitoring","logs-infinite",s,e],virtualMcpPrompts:s=>["virtual-mcp",s,"prompts"],connectionPrompts:s=>["connection",s,"prompts"],connectionResources:s=>["connection",s,"resources"],user:s=>["user",s],registryApp:(s,e)=>["registry-app",s,e]};function N(s){return!!s._zod}function b(s,e){return N(s)?ce(s,e):s.safeParse(e)}function se(s){if(!s)return;let e;if(N(s)?e=s._zod?.def?.shape:e=s.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function We(s){if(N(s)){const a=s._zod?.def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.values[0]}}const t=s._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const r=s.value;if(r!==void 0)return r}function R(s){return s==="completed"||s==="failed"||s==="cancelled"}function G(s){const t=se(s)?.method;if(!t)throw new Error("Schema is missing a method literal");const r=We(t);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function Q(s,e){const t=b(s,e);if(!t.success)throw t.error;return t.data}const Ge=6e4;class Qe{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(le,t=>{this._oncancel(t)}),this.setNotificationHandler(ue,t=>{this._onprogress(t)}),this.setRequestHandler(de,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(he,async(t,r)=>{const o=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!o)throw new p(w.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(fe,async(t,r)=>{const o=async()=>{const a=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(a,r.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,f=u.id,l=this._requestResolvers.get(f);if(l)if(this._requestResolvers.delete(f),i.type==="response")l(u);else{const h=u,m=new p(h.error.code,h.error.message,h.error.data);l(m)}else{const h=i.type==="response"?"Response":"Error";this._onerror(new Error(`${h} handler missing for request ${f}`))}continue}await this._transport?.send(i.message,{relatedRequestId:r.requestId})}}const n=await this._taskStore.getTask(a,r.sessionId);if(!n)throw new p(w.InvalidParams,`Task not found: ${a}`);if(!R(n.status))return await this._waitForTaskUpdate(a,r.signal),await o();if(R(n.status)){const i=await this._taskStore.getTaskResult(a,r.sessionId);return this._clearTaskQueue(a),{...i,_meta:{...i._meta,[q]:{taskId:a}}}}return await o()};return await o()}),this.setRequestHandler(pe,async(t,r)=>{try{const{tasks:o,nextCursor:a}=await this._taskStore.listTasks(t.params?.cursor,r.sessionId);return{tasks:o,nextCursor:a,_meta:{}}}catch(o){throw new p(w.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(me,async(t,r)=>{try{const o=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!o)throw new p(w.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(o.status))throw new p(w.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(t.params.taskId);const a=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!a)throw new p(w.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...a}}catch(o){throw o instanceof p?o:new p(w.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,o,a=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:a,onTimeout:o})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),p.fromError(w.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=a=>{r?.(a),this._onerror(a)};const o=this._transport?.onmessage;this._transport.onmessage=(a,n)=>{o?.(a,n),M(a)||_e(a)?this._onresponse(a):L(a)?this._onrequest(a,n):ge(a)?this._onnotification(a):this._onerror(new Error(`Unknown message type: ${JSON.stringify(a)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const r of this._timeoutInfo.values())clearTimeout(r.timeoutId);this._timeoutInfo.clear();for(const r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();const t=p.fromError(w.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of e.values())r(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,t){const r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,a=e.params?._meta?.[q]?.taskId;if(r===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:w.MethodNotFound,message:"Method not found"}};a&&this._taskMessageQueue?this._enqueueTaskMessage(a,{type:"error",message:l,timestamp:Date.now()},o?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):o?.send(l).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=we(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,f={signal:n.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const h={relatedRequestId:e.id};a&&(h.relatedTask={taskId:a}),await this.notification(l,h)},sendRequest:async(l,h,m)=>{if(n.signal.aborted)throw new p(w.ConnectionClosed,"Request was cancelled");const g={...m,relatedRequestId:e.id};a&&!g.relatedTask&&(g.relatedTask={taskId:a});const y=g.relatedTask?.taskId??a;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(l,h,g)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:a,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,f)).then(async l=>{if(n.signal.aborted)return;const h={result:l,jsonrpc:"2.0",id:e.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)},async l=>{if(n.signal.aborted)return;const h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:w.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"error",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...r}=e.params,o=Number(t),a=this._progressHandlers.get(o);if(!a){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(o),i=this._timeoutInfo.get(o);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(u){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),n(u);return}a(r)}_onresponse(e){const t=Number(e.id),r=this._requestResolvers.get(t);if(r){if(this._requestResolvers.delete(t),M(e))r(e);else{const n=new p(e.error.code,e.error.message,e.error.data);r(n)}return}const o=this._responseHandlers.get(t);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let a=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(a=!0,this._taskProgressTokens.set(i.taskId,t))}}if(a||this._progressHandlers.delete(t),M(e))o(e);else{const n=p.fromError(e.error.code,e.error.message,e.error.data);o(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,r){const{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(e,t,r)}}catch(n){yield{type:"error",error:n instanceof p?n:new p(w.InternalError,String(n))}}return}let a;try{const n=await this.request(e,U,r);if(n.task)a=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new p(w.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:a},r);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},t,r)}:i.status==="failed"?yield{type:"error",error:new p(w.InternalError,`Task ${a} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new p(w.InternalError,`Task ${a} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},t,r)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,u)),r?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof p?n:new p(w.InternalError,String(n))}}}request(e,t,r){const{relatedRequestId:o,resumptionToken:a,onresumptiontoken:n,task:i,relatedTask:u}=r??{};return new Promise((f,l)=>{const h=c=>{l(c)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){h(c);return}r?.signal?.throwIfAborted();const m=this._requestMessageId++,g={...e,jsonrpc:"2.0",id:m};r?.onprogress&&(this._progressHandlers.set(m,r.onprogress),g.params={...e.params,_meta:{...e.params?._meta||{},progressToken:m}}),i&&(g.params={...g.params,task:i}),u&&(g.params={...g.params,_meta:{...g.params?._meta||{},[q]:u}});const y=c=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(c)}},{relatedRequestId:o,resumptionToken:a,onresumptiontoken:n}).catch(k=>this._onerror(new Error(`Failed to send cancellation: ${k}`)));const _=c instanceof p?c:new p(w.RequestTimeout,String(c));l(_)};this._responseHandlers.set(m,c=>{if(!r?.signal?.aborted){if(c instanceof Error)return l(c);try{const _=b(t,c.result);_.success?f(_.data):l(_.error)}catch(_){l(_)}}}),r?.signal?.addEventListener("abort",()=>{y(r?.signal?.reason)});const T=r?.timeout??Ge,v=()=>y(p.fromError(w.RequestTimeout,"Request timed out",{timeout:T}));this._setupTimeout(m,T,r?.maxTotalTimeout,v,r?.resetTimeoutOnProgress??!1);const d=u?.taskId;if(d){const c=_=>{const k=this._responseHandlers.get(m);k?k(_):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,c),this._enqueueTaskMessage(d,{type:"request",message:g,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(m),l(_)})}else this._transport.send(g,{relatedRequestId:o,resumptionToken:a,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(m),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},Te,t)}async getTaskResult(e,t,r){return this.request({method:"tasks/result",params:e},t,r)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ye,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},ve,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const r=t?.relatedTask?.taskId;if(r){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const r=G(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,a)=>{const n=Q(e,o);return Promise.resolve(t(n,a))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const r=G(e);this._notificationHandlers.set(r,o=>{const a=Q(e,o);return Promise.resolve(t(a))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,r,o)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(e,t);for(const o of r)if(o.type==="request"&&L(o.message)){const a=o.message.id,n=this._requestResolvers.get(a);n?(n(new p(w.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let r=this._options?.defaultTaskPollInterval??1e3;try{const o=await this._taskStore?.getTask(e);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,a)=>{if(t.aborted){a(new p(w.InvalidRequest,"Request cancelled"));return}const n=setTimeout(o,r);t.addEventListener("abort",()=>{clearTimeout(n),a(new p(w.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await r.createTask(o,e.id,{method:e.method,params:e.params},t)},getTask:async o=>{const a=await r.getTask(o,t);if(!a)throw new p(w.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(o,a,n)=>{await r.storeTaskResult(o,a,n,t);const i=await r.getTask(o,t);if(i){const u=z.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,t),updateTaskStatus:async(o,a,n)=>{const i=await r.getTask(o,t);if(!i)throw new p(w.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(R(i.status))throw new p(w.InvalidParams,`Cannot update task "${o}" from terminal status "${i.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,a,n,t);const u=await r.getTask(o,t);if(u){const f=z.parse({method:"notifications/tasks/status",params:u});await this.notification(f),R(u.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,t)}}}function K(s){return s!==null&&typeof s=="object"&&!Array.isArray(s)}function Ke(s,e){const t={...s};for(const r in e){const o=r,a=e[o];if(a===void 0)continue;const n=t[o];K(n)&&K(a)?t[o]={...n,...a}:t[o]=a}return t}var Je=Se();const Be=ke(Je);function Ze(){const s=new Be({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Ce(s),s}class Ye{constructor(e){this._ajv=e??Ze()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return r=>t(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class Xe{constructor(e){this._client=e}async*callToolStream(e,t=X,r){const o=this._client,a={...r,task:r?.task??(o.isToolTask(e.name)?{}:void 0)},n=o.requestStream({method:"tools/call",params:e},t,a),i=o.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const f=u.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new p(w.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const l=i(f.structuredContent);if(!l.valid){yield{type:"error",error:new p(w.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof p){yield{type:"error",error:l};return}yield{type:"error",error:new p(w.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,r){return this._client.getTaskResult({taskId:e},t,r)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,r){return this._client.requestStream(e,t,r)}}function et(s,e,t){if(!s)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!s.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function tt(s,e,t){if(!s)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!s.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!s.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(s,e){if(!(!s||e===null||typeof e!="object")){if(s.type==="object"&&s.properties&&typeof s.properties=="object"){const t=e,r=s.properties;for(const o of Object.keys(r)){const a=r[o];t[o]===void 0&&Object.prototype.hasOwnProperty.call(a,"default")&&(t[o]=a.default),t[o]!==void 0&&O(a,t[o])}}if(Array.isArray(s.anyOf))for(const t of s.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(s.oneOf))for(const t of s.oneOf)typeof t!="boolean"&&O(t,e)}}function st(s){if(!s)return{supportsFormMode:!1,supportsUrlMode:!1};const e=s.form!==void 0,t=s.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let rt=class extends Qe{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Ye,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",be,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Re,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Ie,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Xe(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ke(this._capabilities,e)}setRequestHandler(e,t){const o=se(e)?.method;if(!o)throw new Error("Schema is missing a method literal");let a;if(N(o)){const i=o;a=i._zod?.def?.value??i.value}else{const i=o;a=i._def?.value??i.value}if(typeof a!="string")throw new Error("Schema method literal must be a string");const n=a;if(n==="elicitation/create"){const i=async(u,f)=>{const l=b(Le,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new p(w.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:h}=l.data;h.mode=h.mode??"form";const{supportsFormMode:m,supportsUrlMode:g}=st(this._capabilities.elicitation);if(h.mode==="form"&&!m)throw new p(w.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!g)throw new p(w.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(t(u,f));if(h.task){const c=b(U,y);if(!c.success){const _=c.error instanceof Error?c.error.message:String(c.error);throw new p(w.InvalidParams,`Invalid task creation result: ${_}`)}return c.data}const T=b(Ue,y);if(!T.success){const c=T.error instanceof Error?T.error.message:String(T.error);throw new p(w.InvalidParams,`Invalid elicitation result: ${c}`)}const v=T.data,d=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&v.action==="accept"&&v.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{O(d,v.content)}catch{}return v};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,f)=>{const l=b(Fe,u);if(!l.success){const v=l.error instanceof Error?l.error.message:String(l.error);throw new p(w.InvalidParams,`Invalid sampling request: ${v}`)}const{params:h}=l.data,m=await Promise.resolve(t(u,f));if(h.task){const v=b(U,m);if(!v.success){const d=v.error instanceof Error?v.error.message:String(v.error);throw new p(w.InvalidParams,`Invalid task creation result: ${d}`)}return v.data}const y=h.tools||h.toolChoice?je:Ve,T=b(y,m);if(!T.success){const v=T.error instanceof Error?T.error.message:String(T.error);throw new p(w.InvalidParams,`Invalid sampling result: ${v}`)}return T.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:Ee,capabilities:this._capabilities,clientInfo:this._clientInfo}},qe,t);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!Pe.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){et(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&tt(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},$,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},Ae,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},$,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},Me,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},$e,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},He,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Oe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},Ne,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},$,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},$,t)}async callTool(e,t=X,r){if(this.isToolTaskRequired(e.name))throw new p(w.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const o=await this.request({method:"tools/call",params:e},t,r),a=this.getToolOutputValidator(e.name);if(a){if(!o.structuredContent&&!o.isError)throw new p(w.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{const n=a(o.structuredContent);if(!n.valid)throw new p(w.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof p?n:new p(w.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return o}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const o=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,o)}const r=t.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(t.name),r==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const r=await this.request({method:"tools/list",params:e},xe,t);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(e,t,r,o){const a=De.safeParse(r);if(!a.success)throw new Error(`Invalid ${e} listChanged options: ${a.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=a.data,{onChanged:u}=r,f=async()=>{if(!n){u(null,null);return}try{const h=await o();u(null,h)}catch(h){const m=h instanceof Error?h:new Error(String(h));u(m,null)}},l=()=>{if(i){const h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);const m=setTimeout(f,i);this._listChangedDebounceTimers.set(e,m)}else f()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};function F(s){return s?s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):{...s}:{}}function ot(s=fetch,e){return e?async(t,r)=>{const o={...e,...r,headers:r?.headers?{...F(e.headers),...F(r.headers)}:e.headers};return s(t,o)}:s}class J extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const B=10,at=13,I=32;function D(s){}function nt(s){if(typeof s=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=D,onError:t=D,onRetry:r=D,onComment:o}=s,a=[];let n=!0,i,u="",f=0,l;function h(d){if(n&&(n=!1,d.charCodeAt(0)===239&&d.charCodeAt(1)===187&&d.charCodeAt(2)===191&&(d=d.slice(3))),a.length===0){const k=m(d);k!==""&&a.push(k);return}if(d.indexOf(`
|
|
2
|
-
`)===-1&&d.indexOf("\r")===-1){a.push(d);return}a.push(d);const c=a.join("");a.length=0;const _=m(c);_!==""&&a.push(_)}function m(d){let c=0;if(d.indexOf("\r")===-1){let _=d.indexOf(`
|
|
3
|
-
`,c);for(;_!==-1;){if(c===_){f>0&&e({id:i,event:l,data:u}),i=void 0,u="",f=0,l=void 0,c=_+1,_=d.indexOf(`
|
|
4
|
-
`,c);continue}const k=d.charCodeAt(c);if(Z(d,c,k)){const S=d.charCodeAt(c+5)===I?c+6:c+5,C=d.slice(S,_);if(f===0&&d.charCodeAt(_+1)===B){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=_+2,_=d.indexOf(`
|
|
5
|
-
`,c);continue}u=f===0?C:`${u}
|
|
6
|
-
${C}`,f++}else Y(d,c,k)?l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0:g(d,c,_);c=_+1,_=d.indexOf(`
|
|
7
|
-
`,c)}return d.slice(c)}for(;c<d.length;){const _=d.indexOf("\r",c),k=d.indexOf(`
|
|
8
|
-
`,c);let S=-1;if(_!==-1&&k!==-1?S=_<k?_:k:_!==-1?_===d.length-1?S=-1:S=_:k!==-1&&(S=k),S===-1)break;g(d,c,S),c=S+1,d.charCodeAt(c-1)===at&&d.charCodeAt(c)===B&&c++}return d.slice(c)}function g(d,c,_){if(c===_){T();return}const k=d.charCodeAt(c);if(Z(d,c,k)){const E=d.charCodeAt(c+5)===I?c+6:c+5,V=d.slice(E,_);u=f===0?V:`${u}
|
|
9
|
-
${V}`,f++;return}if(Y(d,c,k)){l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0;return}if(k===105&&d.charCodeAt(c+1)===100&&d.charCodeAt(c+2)===58){const E=d.slice(d.charCodeAt(c+3)===I?c+4:c+3,_);i=E.includes("\0")?void 0:E;return}if(k===58){if(o){const E=d.slice(c,_);o(E.slice(d.charCodeAt(c+1)===I?2:1))}return}const S=d.slice(c,_),C=S.indexOf(":");if(C===-1){y(S,"",S);return}const ae=S.slice(0,C),ne=S.charCodeAt(C+1)===I?2:1,ie=S.slice(C+ne);y(ae,ie,S)}function y(d,c,_){switch(d){case"event":l=c||void 0;break;case"data":u=f===0?c:`${u}
|
|
10
|
-
${c}`,f++;break;case"id":i=c.includes("\0")?void 0:c;break;case"retry":/^\d+$/.test(c)?r(parseInt(c,10)):t(new J(`Invalid \`retry\` value: "${c}"`,{type:"invalid-retry",value:c,line:_}));break;default:t(new J(`Unknown field "${d.length>20?`${d.slice(0,20)}…`:d}"`,{type:"unknown-field",field:d,value:c,line:_}));break}}function T(){f>0&&e({id:i,event:l,data:u}),i=void 0,u="",f=0,l=void 0}function v(d={}){if(d.consume&&a.length>0){const c=a.join("");g(c,0,c.length)}n=!0,i=void 0,u="",f=0,l=void 0,a.length=0}return{feed:h,reset:v}}function Z(s,e,t){return t===100&&s.charCodeAt(e+1)===97&&s.charCodeAt(e+2)===116&&s.charCodeAt(e+3)===97&&s.charCodeAt(e+4)===58}function Y(s,e,t){return t===101&&s.charCodeAt(e+1)===118&&s.charCodeAt(e+2)===101&&s.charCodeAt(e+3)===110&&s.charCodeAt(e+4)===116&&s.charCodeAt(e+5)===58}class it extends TransformStream{constructor({onError:e,onRetry:t,onComment:r}={}){let o;super({start(a){o=nt({onEvent:n=>{a.enqueue(n)},onError(n){e==="terminate"?a.error(n):typeof e=="function"&&e(n)},onRetry:t,onComment:r})},transform(a){o.feed(a)}})}}const ct={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class A extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}}let lt=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=ot(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??ct}async _authThenStart(){if(!this._authProvider)throw new P("No auth provider");let e;try{e=await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(t){throw this.onerror?.(t),t}if(e!=="AUTHORIZED")throw new P;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const t=F(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){const{resumptionToken:t}=e;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),t&&r.set("last-event-id",t);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new A(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,e,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const t=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(r,e),o)}_scheduleReconnection(e,t=0){const r=this._reconnectionOptions.maxRetries;if(t>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(a=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${a instanceof Error?a.message:String(a)}`)),this._scheduleReconnection(e,t+1)})},o)}_handleSseStream(e,t,r){if(!e)return;const{onresumptiontoken:o,replayMessageId:a}=t;let n,i=!1,u=!1;(async()=>{try{const l=e.pipeThrough(new TextDecoderStream).pipeThrough(new it({onRetry:g=>{this._serverRetryMs=g}})).getReader();for(;;){const{value:g,done:y}=await l.read();if(y)break;if(g.id&&(n=g.id,i=!0,o?.(g.id)),!!g.data&&(!g.event||g.event==="message"))try{const T=x.parse(JSON.parse(g.data));M(T)&&(u=!0,a!==void 0&&(T.id=a)),this.onmessage?.(T)}catch(T){this.onerror?.(T)}}(r||i)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:n,onresumptiontoken:o,replayMessageId:a},0)}catch(l){if(this.onerror?.(new Error(`SSE stream disconnected: ${l}`)),(r||i)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:n,onresumptiontoken:o,replayMessageId:a},0)}catch(g){this.onerror?.(new Error(`Failed to reconnect: ${g instanceof Error?g.message:String(g)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new P("No auth provider");if(await H(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{const{resumptionToken:r,onresumptiontoken:o}=t||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:L(e)?e.id:void 0}).catch(m=>this.onerror?.(m));return}const a=await this._commonHeaders();a.set("content-type","application/json"),a.set("accept","application/json, text/event-stream");const n={...this._requestInit,method:"POST",headers:a,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,n),u=i.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!i.ok){const m=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new A(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:g,scope:y}=W(i);if(this._resourceMetadataUrl=g,this._scope=y,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P;return this._hasCompletedAuthFlow=!0,this.send(e)}if(i.status===403&&this._authProvider){const{resourceMetadataUrl:g,scope:y,error:T}=W(i);if(T==="insufficient_scope"){const v=i.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===v)throw new A(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),g&&(this._resourceMetadataUrl=g),this._lastUpscopingHeader=v??void 0,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new P;return this.send(e)}}throw new A(i.status,`Error POSTing to endpoint: ${m}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,i.status===202){await i.body?.cancel(),ze(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(m=>this.onerror?.(m));return}const l=(Array.isArray(e)?e:[e]).filter(m=>"method"in m&&"id"in m&&m.id!==void 0).length>0,h=i.headers.get("content-type");if(l)if(h?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:o},!1);else if(h?.includes("application/json")){const m=await i.json(),g=Array.isArray(m)?m.map(y=>x.parse(y)):[x.parse(m)];for(const y of g)this.onmessage?.(y)}else throw await i.body?.cancel(),new A(-1,`Unexpected content type: ${h}`);else await i.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,t);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new A(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class ut extends lt{constructor(e,t){super(e,t)}send(e,t){const r=dt(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,t)}}function dt(s){const e=s;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const t=e?.params?.protocolVersion;return t?{type:"emit",message:{result:{protocolVersion:t,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"mesh-virtual-mcp",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}}const ht={name:"mesh-sdk",version:"1.0.0"};function ft(s,e,t){const r=t??(typeof window<"u"?window.location.origin:void 0);if(!r)throw new Error("MCP client requires either meshUrl option or a browser environment.");const o=`/api/${encodeURIComponent(e)}`,a=s?`${o}/mcp/${s}`:`${o}/mcp`;return new URL(a,r).href}async function re({connectionId:s,orgId:e,orgSlug:t,token:r,meshUrl:o}){const a=ft(s,t,o),n=new rt(ht,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),i=new ut(new URL(a),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream",...r?{Authorization:`Bearer ${r}`}:{}}}});await n.connect(i);const u=j.mcpClient(e,s??"self",r??"",o??"");return n.toJSON=()=>`mcp-client:${u.join(":")}`,n}function yt(s){const e=ee.c(14),{connectionId:t,orgId:r,orgSlug:o,token:a,meshUrl:n}=s;let i;e[0]!==t||e[1]!==n||e[2]!==r||e[3]!==a?(i=j.mcpClient(r,t??"self",a??"",n??""),e[0]=t,e[1]=n,e[2]=r,e[3]=a,e[4]=i):i=e[4];const u=i;let f;e[5]!==t||e[6]!==n||e[7]!==r||e[8]!==o||e[9]!==a?(f=()=>re({connectionId:t,orgId:r,orgSlug:o,token:a,meshUrl:n}),e[5]=t,e[6]=n,e[7]=r,e[8]=o,e[9]=a,e[10]=f):f=e[10];let l;e[11]!==u||e[12]!==f?(l={queryKey:u,queryFn:f,staleTime:1/0,gcTime:6e4},e[11]=u,e[12]=f,e[13]=l):l=e[13];const{data:h}=te(l);return h}function vt(s){const e=ee.c(14),{connectionId:t,orgId:r,orgSlug:o,token:a,meshUrl:n}=s;let i;e[0]!==t||e[1]!==n||e[2]!==r||e[3]!==a?(i=t!==void 0?j.mcpClient(r,t??"self",a??"",n??""):["mcp","client","skip",r],e[0]=t,e[1]=n,e[2]=r,e[3]=a,e[4]=i):i=e[4];const u=i;let f;e[5]!==t||e[6]!==n||e[7]!==r||e[8]!==o||e[9]!==a?(f=async()=>t===void 0?null:re({connectionId:t,orgId:r,orgSlug:o,token:a,meshUrl:n}),e[5]=t,e[6]=n,e[7]=r,e[8]=o,e[9]=a,e[10]=f):f=e[10];let l;e[11]!==u||e[12]!==f?(l={queryKey:u,queryFn:f,staleTime:1/0,gcTime:6e4},e[11]=u,e[12]=f,e[13]=l):l=e[13];const{data:h}=te(l);return h??null}const kt={SELF:s=>`${s}_self`,REGISTRY:s=>`${s}_registry`,COMMUNITY_REGISTRY:s=>`${s}_community-registry`,DEV_ASSETS:s=>`${s}_dev-assets`,SITE_DIAGNOSTICS:s=>`site-diagnostics_${s}`},St="self";function pt(s){return{is(e){return!e||!e.startsWith(s)?null:e.slice(s.length)||null},get(e){return`${s}${e}`}}}function mt(s){return{id:s.id,organization_id:s.organizationId,title:s.title,description:s.description,icon:s.icon,status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:s.instructions??null},pinned:!1,connections:[]}}const oe=pt("decopilot_"),Ct=oe.is,_t=oe.get;function bt(s){return mt({id:_t(s),organizationId:s,title:"Decopilot",description:"Default agent that aggregates all organization connections",icon:"https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png"})}const Rt={AGENT_MANAGER:s=>`studio-agent-manager_${s}`,AUTOMATION_MANAGER:s=>`studio-automation-manager_${s}`,CONNECTION_MANAGER:s=>`studio-connection-manager_${s}`,STORE_MANAGER:s=>`studio-store-manager_${s}`,BRAND_MANAGER:s=>`studio-brand-manager_${s}`,USAGE_MANAGER:s=>`studio-usage-manager_${s}`};function It(s){return s?s.startsWith("studio-agent-manager_")||s.startsWith("studio-automation-manager_")||s.startsWith("studio-connection-manager_")||s.startsWith("studio-store-manager_")||s.startsWith("studio-brand-manager_")||s.startsWith("studio-usage-manager_"):!1}export{Be as A,rt as C,j as K,Qe as P,St as S,kt as W,Rt as a,It as b,re as c,nt as d,ot as e,lt as f,bt as g,_t as h,Ct as i,vt as j,F as n,yt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as P,q as k,F as q,cb as b,j as n,cc as E,b3 as R,K as S,o as K}from"./index-8Av7_XG5.js";import{P as j}from"./index-5FdhmN0u.js";import{d as _}from"./use-organization-settings-B6tWOwuA.js";import{S as F}from"./switch-CCjru8jV.js";import{n as I}from"./Container-V3OuMECL.js";import{b as Q,S as w,a as z,c as N}from"./settings-section-rywQD1H8.js";import{R as T}from"./require-capability-B58b3LsO.js";import"./sidebar-BTAYcbpn.js";import"./LayoutLeft-CAachN7j.js";import"./tooltip-B9p8ywB_.js";import"./sheet-HD1tdtUP.js";import"./X-D5DAti-0.js";import"./constants-DeFtLUND.js";import"./card-Bs_ZETWd.js";import"./ArrowUpRight-CGlPrRsR.js";import"./use-capability-CeWdChcL.js";import"./access-gate-Duof6cnb.js";import"./capability-load-error-BoG7ZxlR.js";function U(){const e=P.c(17),{org:t,project:s}=k(),r=q();let d;e[0]!==s.enabledPlugins?(d=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=d):d=e[1];const a=d,l=_();let m;e[2]!==t||e[3]!==s.slug||e[4]!==r?(m=()=>{r.invalidateQueries({queryKey:S.project(t.id,s.slug)}),r.invalidateQueries({queryKey:S.projects(t.id)}),r.invalidateQueries({predicate:i=>{const o=i.queryKey;return o[1]===t.id&&o[3]==="collection"&&o[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=r,e[5]=m):m=e[5];const x=m;let p;e[6]!==x||e[7]!==l||e[8]!==a?(p=(i,o)=>{const u=new Set(a);o?u.add(i):u.delete(i),l.mutate({enabled_plugins:Array.from(u)},{onSuccess:x,onError:M})},e[6]=x,e[7]=l,e[8]=a,e[9]=p):p=e[9];const g=p,y=D,C=A;if(b.length===0){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=i):i=e[10],i}let c;e[11]!==g||e[12]!==l||e[13]!==a?(c=b.map(i=>{const o=y(i.id),u=C(i.id),h=a.includes(i.id);return n.jsx(Q,{title:o?.label??i.id,description:u??void 0,icon:n.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:o?.icon??n.jsx(I,{size:14})}),onClick:()=>!l.isPending&&g(i.id,!h),action:n.jsx(F,{checked:h,onCheckedChange:v=>g(i.id,v),disabled:l.isPending,onClick:$})},i.id)}),e[11]=g,e[12]=l,e[13]=a,e[14]=c):c=e[14];let f;return e[15]!==c?(f=n.jsx(w,{children:n.jsx(z,{children:c})}),e[15]=c,e[16]=f):f=e[16],f}function $(e){return e.stopPropagation()}function A(e){return b.find(s=>s.id===e)?.description??null}function D(e){const t=E.find(r=>r.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=R.find(r=>r.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function M(e){K.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function B(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(j,{children:n.jsx(j.Content,{children:n.jsx(j.Body,{children:n.jsxs(N,{children:[n.jsx(j.Title,{children:"Plugins"}),n.jsx(U,{})]})})})}),e[0]=t):t=e[0],t}function ae(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(T,{capability:"org:manage",area:"plugins",children:n.jsx(B,{})}),e[0]=t):t=e[0],t}export{ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as k,r as z,b4 as S,g as _,Z as E,b5 as T,j as o,M as $}from"./index-8Av7_XG5.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function M(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function U(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=M("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function q(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],U(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as it,r as E,j as e,l as rt}from"./index-8Av7_XG5.js";import{S as mt,d as pt,a as st,b as at}from"./sheet-HD1tdtUP.js";import{S as nt}from"./scroll-area-GY_MqX9m.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-nusKb5Sb.js";import{j as xt}from"./index-OL8Ldzfm.js";import"./X-D5DAti-0.js";import"./select-Y4AHPww8.js";import"./tooltip-B9p8ywB_.js";import"./Check-D-2DMeXR.js";import"./ChevronDown-DUb-OAcF.js";import"./ChevronUp-mT0kmu5O.js";import"./label-D5ze4fbW.js";import"./switch-CCjru8jV.js";import"./schema-form-CLs9R9OM.js";import"./agent-icon-VIqap9Jf.js";import"./AlertCircle-Ctbek2zl.js";import"./Tool01-Co9IzxOX.js";import"./SwitchHorizontal01-CdSYnpvh.js";import"./RefreshCcw01-DSZXx3HQ.js";import"./XCircle-BjeFLJxj.js";import"./ArrowUpRight-CGlPrRsR.js";import"./ZapSquare-By7Cv3Wp.js";import"./Users03-mgRYViRT.js";import"./CheckCircle-CPLY3iX-.js";import"./ChevronLeft-IUSMXc7n.js";import"./ChevronRight-C6_Bb1P7.js";import"./DotsVertical-CYMPhMIv.js";import"./Container-V3OuMECL.js";import"./Eye-DLKlw-42.js";import"./ZoomOut-CIHaUyEl.js";import"./Globe01-BSqLqa8H.js";import"./FilterLines-B2lLGnWS.js";import"./Star01-DWr_psxV.js";import"./Palette-D1rjO3C7.js";import"./HardDrive-BFG0b6vP.js";import"./Stars02-7S-x4jsE.js";import"./Key01-DeIJhm73.js";import"./LayoutLeft-CAachN7j.js";import"./LinkExternal01-C7Ulot5I.js";import"./Monitor01-RdLthi4L.js";import"./Sun-C0yimusT.js";import"./Play-CL1Mgiwf.js";import"./Plus-DINfOuqC.js";import"./SearchMd-Dt4Aj6N4.js";import"./Settings02-COHAF-aj.js";import"./Shield01-Ef5O0H91.js";import"./Stars01-CTAt_kJn.js";import"./Trash01-m4F91Gbm.js";import"./Upload01-BWuva6Fs.js";import"./User01-BQ6QP8OL.js";import"./Users01-ByzlIQ3F.js";import"./XClose-s3WJPw3-.js";import"./Zap-Z3n8EP6c.js";import"./calendar-D3ybWgKx.js";import"./input-CFgdCIf-.js";import"./popover-CusBDsw3.js";import"./textarea-Bw4v_xfm.js";import"./dropdown-menu-BuEg85yr.js";import"./image-field-dhimK8za.js";import"./dialog-BDoa-Aig.js";import"./skeleton-KPs8aExG.js";import"./tabs-Bsb3WneA.js";import"./use-file-configs-DWgNRokn.js";import"./constants-DeFtLUND.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./useInfiniteQuery-CQ_UxVw9.js";import"./infiniteQueryObserver-BPAoXqhZ.js";import"./agent-capabilities-Ckkw1MUq.js";import"./pair-B10kI-gZ.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DPF-R5Zs.js";import"./file-type-icon-CXEAWEt3.js";import"./content-blocks-o63cs2vh.js";import"./types-5S14a687.js";import"./chat-context-DXMK9LpM.js";import"./tab-id-Cj2zAp8p.js";import"./decopilot-sse-pool-xYuzxJCG.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-C_vD2kKw.js";import"./use-collections-CMMaRmVG.js";import"./use-ai-providers-iJF3uFpo.js";import"./use-organization-settings-B6tWOwuA.js";import"./shell-layout-D1gXYOI4.js";import"./avatar-B5XGLu28.js";import"./required-auth-layout-CLPqu2hV.js";import"./useRouterState-BLC1S9ll.js";import"./use-org-sso-BB-vyF4c.js";import"./integration-icon-ByZrCdpe.js";import"./use-navigate-to-agent-C3AzTy7G.js";import"./use-connection-C2Ef-EqP.js";import"./use-mcp-prompts-1dd1yGOH.js";import"./form-CEHwzUIx.js";import"./spinner-CWHpDgnL.js";import"./drawer-DBoqm7Ga.js";import"./collection-search-CIGzMvXg.js";import"./toggle-group-a9DpUbSj.js";import"./connect-desktop-dialog-D0cwbi62.js";import"./agent-icons-D05ipmZ4.js";import"./checkbox-CDeLVmoz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-rywQD1H8.js";import"./card-Bs_ZETWd.js";import"./command-nIpjgY_C.js";import"./index-B3HtVn_3.js";import"./sortable.esm-k9dnaUc0.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Js2GKnMD.js";import"./use-registry-connections-DIBKm4oO.js";import"./extract-connection-data-C73XSXJg.js";import"./generate-id-DwXNdT-H.js";import"./collections-DsvWgjkq.js";import"./collection-tabs-Cl0Sce7d.js";import"./badge-BiVWMQaC.js";import"./connection-form-helpers-Dkeln3L-.js";import"./use-infinite-scroll-BaBllFvG.js";import"./useSuspenseInfiniteQuery-XoWOrVYw.js";import"./index-DhlM3QdF.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BMvdQN97.js";import"./sidebar-BTAYcbpn.js";import"./toolbar-BkMHRO8B.js";import"./use-create-virtual-mcp-7QQxHiI4.js";import"./github-repo-picker-CFHmzbdo.js";import"./use-mcp-tools-C8LW1vg1.js";import"./alert-dialog-Ci1rMRpl.js";import"./index-D2E_r2Ga.js";import"./use-org-auth-client-BQe59WMu.js";import"./hover-card-CZKyvEKV.js";import"./task-status-Bq8PHYFh.js";import"./use-status-sounds-Wb6qMNbl.js";import"./empty-state-Ct_D2Lzo.js";import"./resizable-DtVYiBv-.js";import"./use-capability-CeWdChcL.js";import"./header-tab-button-Be5qNrZz.js";import"./index-CX7SvFBB.js";import"./user-BHKPSALf.js";import"./tools-list-CmaWZYdl.js";import"./use-debounced-autosave-Da4caii8.js";import"./index-5FdhmN0u.js";import"./search-input-CaIL3--R.js";import"./use-secrets-BhZyR2Dx.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B1qqQUiM.js";import"./view-mode-toggle-BabF7Sx4.js";import"./select-model-DV1-Oh57.js";import"./use-automations-BTipFIOi.js";import"./monaco-editor-BAqhsJzm.js";import"./automation-runs-BmKdgkka.js";import"./table-Dpu-CGxg.js";import"./use-members-D2U599cF.js";import"./automation-list-row-Dg6SIiTL.js";function Si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(jt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),j=m.kind==="page",ot=j?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=j?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!j||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let w;t[0]!==s?(w=vt(s),t[0]=s,t[1]=w):w=t[1];const M=w;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=j&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function jt(u){return u+1}export{Si as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as H,q as $,j}from"./index-8Av7_XG5.js";import{h as q,g as O,s as b}from"./pair-B10kI-gZ.js";import{u as v}from"./constants-DeFtLUND.js";import{a as L,c as B}from"./use-mcp-tools-C8LW1vg1.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as k,M as G,b as E}from"./types-5S14a687.js";import{a as V,c as z}from"./chat-context-DXMK9LpM.js";import{u as F}from"./shell-layout-D1gXYOI4.js";import"./agent-icon-VIqap9Jf.js";import"./AlertCircle-Ctbek2zl.js";import"./Tool01-Co9IzxOX.js";import"./SwitchHorizontal01-CdSYnpvh.js";import"./RefreshCcw01-DSZXx3HQ.js";import"./XCircle-BjeFLJxj.js";import"./ArrowUpRight-CGlPrRsR.js";import"./ZapSquare-By7Cv3Wp.js";import"./Users03-mgRYViRT.js";import"./CheckCircle-CPLY3iX-.js";import"./Check-D-2DMeXR.js";import"./ChevronDown-DUb-OAcF.js";import"./ChevronLeft-IUSMXc7n.js";import"./ChevronRight-C6_Bb1P7.js";import"./ChevronUp-mT0kmu5O.js";import"./DotsVertical-CYMPhMIv.js";import"./Container-V3OuMECL.js";import"./Eye-DLKlw-42.js";import"./ZoomOut-CIHaUyEl.js";import"./Globe01-BSqLqa8H.js";import"./FilterLines-B2lLGnWS.js";import"./Star01-DWr_psxV.js";import"./Palette-D1rjO3C7.js";import"./HardDrive-BFG0b6vP.js";import"./Stars02-7S-x4jsE.js";import"./Key01-DeIJhm73.js";import"./LayoutLeft-CAachN7j.js";import"./LinkExternal01-C7Ulot5I.js";import"./Monitor01-RdLthi4L.js";import"./Sun-C0yimusT.js";import"./Play-CL1Mgiwf.js";import"./Plus-DINfOuqC.js";import"./SearchMd-Dt4Aj6N4.js";import"./Settings02-COHAF-aj.js";import"./Shield01-Ef5O0H91.js";import"./Stars01-CTAt_kJn.js";import"./Trash01-m4F91Gbm.js";import"./Upload01-BWuva6Fs.js";import"./User01-BQ6QP8OL.js";import"./Users01-ByzlIQ3F.js";import"./XClose-s3WJPw3-.js";import"./X-D5DAti-0.js";import"./Zap-Z3n8EP6c.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-GY_MqX9m.js";import"./select-Y4AHPww8.js";import"./tooltip-B9p8ywB_.js";import"./use-copy-DPF-R5Zs.js";import"./file-type-icon-CXEAWEt3.js";import"./dialog-BDoa-Aig.js";import"./tab-id-Cj2zAp8p.js";import"./decopilot-sse-pool-xYuzxJCG.js";import"./create-sse-subscription-BS5983N4.js";import"./integration-icon-ByZrCdpe.js";import"./use-virtual-mcp-C_vD2kKw.js";import"./use-collections-CMMaRmVG.js";import"./use-navigate-to-agent-C3AzTy7G.js";import"./use-connection-C2Ef-EqP.js";import"./use-mcp-prompts-1dd1yGOH.js";import"./form-CEHwzUIx.js";import"./label-D5ze4fbW.js";import"./input-CFgdCIf-.js";import"./spinner-CWHpDgnL.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-ai-providers-iJF3uFpo.js";import"./use-organization-settings-B6tWOwuA.js";import"./avatar-B5XGLu28.js";import"./required-auth-layout-CLPqu2hV.js";import"./useRouterState-BLC1S9ll.js";import"./use-org-sso-BB-vyF4c.js";const J={};function K(S){const t=H.c(37),{client:r,resourceURI:g,tool:e,connectionId:s,orgId:a,args:c}=S,{sendMessage:u}=V(),{setAppContext:d,clearAppContext:o}=z(),{setChatOpen:f,openTab:m}=F(),p=`${s}:${e.name}`;let l;t[0]!==m?(l=h=>h==="inline"?(m("0"),"inline"):"fullscreen",t[0]=m,t[1]=l):l=t[1];const i=l,n=c??J;let T;t[2]!==r||t[3]!==e.name||t[4]!==n?(T={client:r,toolName:e.name,toolArguments:n},t[2]=r,t[3]=e.name,t[4]=n,t[5]=T):T=t[5];const{data:x}=B(T);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=O(e._meta);R=b(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let I;t[9]!==e.inputSchema?(I=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=I):I=t[10];let N;t[11]!==U||t[12]!==I||t[13]!==e?(N={...e,name:U,inputSchema:I},t[11]=U,t[12]=I,t[13]=e,t[14]=N):N=t[14];const y=N;let _;t[15]!==u||t[16]!==f?(_=h=>{const w=Y(h.content);w.content.length>0&&(f(!0),u({tiptapDoc:w}))},t[15]=u,t[16]=f,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let M;t[20]!==d||t[21]!==p?(M=h=>d(p,h),t[20]=d,t[21]=p,t[22]=M):M=t[22];let P;t[23]!==o||t[24]!==p?(P=()=>o(p),t[23]=o,t[24]=p,t[25]=P):P=t[25];let A;return t[26]!==r||t[27]!==D||t[28]!==i||t[29]!==a||t[30]!==g||t[31]!==C||t[32]!==M||t[33]!==P||t[34]!==n||t[35]!==x?(A=j.jsx(G,{resourceURI:g,orgId:a,toolInfo:C,toolInput:n,toolResult:x,displayMode:"fullscreen",minHeight:E.fullscreen.minHeight,maxHeight:E.fullscreen.maxHeight,client:r,onMessage:D,onUpdateModelContext:M,onTeardown:P,onRequestDisplayMode:i,className:"h-full"}),t[26]=r,t[27]=D,t[28]=i,t[29]=a,t[30]=g,t[31]=C,t[32]=M,t[33]=P,t[34]=n,t[35]=x,t[36]=A):A=t[36],A}function Pe(S){const t=H.c(20),{connectionId:r,toolName:g,args:e}=S,{org:s}=$();let a;t[0]!==r||t[1]!==s.id||t[2]!==s.slug?(a={connectionId:r,orgId:s.id,orgSlug:s.slug},t[0]=r,t[1]=s.id,t[2]=s.slug,t[3]=a):a=t[3];const c=v(a);let u;t[4]!==c?(u={client:c},t[4]=c,t[5]=u):u=t[5];const{data:d}=L(u);let o,f,m;t[6]!==g||t[7]!==d.tools?(o=q(decodeURIComponent(g)),m=d.tools.find(i=>i.name===o)??d.tools.find(i=>{const n=O(i._meta);if(!n)return!1;if(b(i.name,n)===o)return!0;const x=b(o,n);return x!==o&&i.name===x}),f=m?._meta?k(m._meta):void 0,t[6]=g,t[7]=d.tools,t[8]=o,t[9]=f,t[10]=m):(o=t[8],f=t[9],m=t[10]);const p=f;if(!m||!p){let i;return t[11]!==o?(i=j.jsx("div",{className:"flex items-center justify-center h-full w-full",children:j.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',o,'" not found or has no UI']})}),t[11]=o,t[12]=i):i=t[12],i}let l;return t[13]!==e||t[14]!==c||t[15]!==r||t[16]!==s.id||t[17]!==p||t[18]!==m?(l=j.jsx(K,{client:c,resourceURI:p,tool:m,connectionId:r,orgId:s.id,args:e}),t[13]=e,t[14]=c,t[15]=r,t[16]=s.id,t[17]=p,t[18]=m,t[19]=l):l=t[19],l}export{Pe as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as C,j as r}from"./index-8Av7_XG5.js";import{I as F}from"./input-CFgdCIf-.js";import{L as T}from"./label-D5ze4fbW.js";import{T as L}from"./textarea-Bw4v_xfm.js";import{I as A}from"./image-field-dhimK8za.js";import{a7 as R,a8 as D,aa as J}from"./index-OL8Ldzfm.js";import{u as K,s as S}from"./primitives-K-Cou-34.js";import{S as M}from"./save-status-CcrdCZvz.js";import"./Tool01-Co9IzxOX.js";import"./Trash01-m4F91Gbm.js";import"./Upload01-BWuva6Fs.js";import"./AlertCircle-Ctbek2zl.js";import"./Check-D-2DMeXR.js";import"./Eye-DLKlw-42.js";import"./DotsVertical-CYMPhMIv.js";import"./agent-icon-VIqap9Jf.js";import"./SwitchHorizontal01-CdSYnpvh.js";import"./RefreshCcw01-DSZXx3HQ.js";import"./XCircle-BjeFLJxj.js";import"./ArrowUpRight-CGlPrRsR.js";import"./ZapSquare-By7Cv3Wp.js";import"./Users03-mgRYViRT.js";import"./CheckCircle-CPLY3iX-.js";import"./ChevronDown-DUb-OAcF.js";import"./ChevronLeft-IUSMXc7n.js";import"./ChevronRight-C6_Bb1P7.js";import"./ChevronUp-mT0kmu5O.js";import"./Container-V3OuMECL.js";import"./ZoomOut-CIHaUyEl.js";import"./Globe01-BSqLqa8H.js";import"./FilterLines-B2lLGnWS.js";import"./Star01-DWr_psxV.js";import"./Palette-D1rjO3C7.js";import"./HardDrive-BFG0b6vP.js";import"./Stars02-7S-x4jsE.js";import"./Key01-DeIJhm73.js";import"./LayoutLeft-CAachN7j.js";import"./LinkExternal01-C7Ulot5I.js";import"./Monitor01-RdLthi4L.js";import"./Sun-C0yimusT.js";import"./Play-CL1Mgiwf.js";import"./Plus-DINfOuqC.js";import"./SearchMd-Dt4Aj6N4.js";import"./Settings02-COHAF-aj.js";import"./Shield01-Ef5O0H91.js";import"./Stars01-CTAt_kJn.js";import"./User01-BQ6QP8OL.js";import"./Users01-ByzlIQ3F.js";import"./XClose-s3WJPw3-.js";import"./X-D5DAti-0.js";import"./Zap-Z3n8EP6c.js";import"./dialog-BDoa-Aig.js";import"./dropdown-menu-BuEg85yr.js";import"./skeleton-KPs8aExG.js";import"./tabs-Bsb3WneA.js";import"./use-file-configs-DWgNRokn.js";import"./constants-DeFtLUND.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./useInfiniteQuery-CQ_UxVw9.js";import"./infiniteQueryObserver-BPAoXqhZ.js";import"./agent-capabilities-Ckkw1MUq.js";import"./pair-B10kI-gZ.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-GY_MqX9m.js";import"./select-Y4AHPww8.js";import"./tooltip-B9p8ywB_.js";import"./use-copy-DPF-R5Zs.js";import"./file-type-icon-CXEAWEt3.js";import"./content-blocks-o63cs2vh.js";import"./types-5S14a687.js";import"./chat-context-DXMK9LpM.js";import"./tab-id-Cj2zAp8p.js";import"./decopilot-sse-pool-xYuzxJCG.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-C_vD2kKw.js";import"./use-collections-CMMaRmVG.js";import"./use-ai-providers-iJF3uFpo.js";import"./use-organization-settings-B6tWOwuA.js";import"./shell-layout-D1gXYOI4.js";import"./avatar-B5XGLu28.js";import"./required-auth-layout-CLPqu2hV.js";import"./useRouterState-BLC1S9ll.js";import"./use-org-sso-BB-vyF4c.js";import"./integration-icon-ByZrCdpe.js";import"./use-navigate-to-agent-C3AzTy7G.js";import"./use-connection-C2Ef-EqP.js";import"./use-mcp-prompts-1dd1yGOH.js";import"./form-CEHwzUIx.js";import"./spinner-CWHpDgnL.js";import"./drawer-DBoqm7Ga.js";import"./collection-search-CIGzMvXg.js";import"./toggle-group-a9DpUbSj.js";import"./connect-desktop-dialog-D0cwbi62.js";import"./agent-icons-D05ipmZ4.js";import"./checkbox-CDeLVmoz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-rywQD1H8.js";import"./card-Bs_ZETWd.js";import"./popover-CusBDsw3.js";import"./command-nIpjgY_C.js";import"./index-B3HtVn_3.js";import"./sortable.esm-k9dnaUc0.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Js2GKnMD.js";import"./use-registry-connections-DIBKm4oO.js";import"./extract-connection-data-C73XSXJg.js";import"./generate-id-DwXNdT-H.js";import"./collections-DsvWgjkq.js";import"./collection-tabs-Cl0Sce7d.js";import"./badge-BiVWMQaC.js";import"./connection-form-helpers-Dkeln3L-.js";import"./use-infinite-scroll-BaBllFvG.js";import"./useSuspenseInfiniteQuery-XoWOrVYw.js";import"./index-DhlM3QdF.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BMvdQN97.js";import"./sidebar-BTAYcbpn.js";import"./sheet-HD1tdtUP.js";import"./toolbar-BkMHRO8B.js";import"./use-create-virtual-mcp-7QQxHiI4.js";import"./github-repo-picker-CFHmzbdo.js";import"./use-mcp-tools-C8LW1vg1.js";import"./alert-dialog-Ci1rMRpl.js";import"./index-D2E_r2Ga.js";import"./use-org-auth-client-BQe59WMu.js";import"./hover-card-CZKyvEKV.js";import"./task-status-Bq8PHYFh.js";import"./use-status-sounds-Wb6qMNbl.js";import"./empty-state-Ct_D2Lzo.js";import"./resizable-DtVYiBv-.js";import"./use-capability-CeWdChcL.js";import"./header-tab-button-Be5qNrZz.js";import"./index-CX7SvFBB.js";import"./user-BHKPSALf.js";import"./tools-list-CmaWZYdl.js";import"./switch-CCjru8jV.js";import"./use-debounced-autosave-Da4caii8.js";import"./index-5FdhmN0u.js";import"./search-input-CaIL3--R.js";import"./use-secrets-BhZyR2Dx.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-B1qqQUiM.js";import"./view-mode-toggle-BabF7Sx4.js";import"./select-model-DV1-Oh57.js";import"./use-automations-BTipFIOi.js";import"./monaco-editor-BAqhsJzm.js";import"./automation-runs-BmKdgkka.js";import"./table-Dpu-CGxg.js";import"./use-members-D2U599cF.js";import"./automation-list-row-Dg6SIiTL.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}],categories:[{key:"name",label:"Name",widget:"text"},{key:"slug",label:"Slug",widget:"text",placeholder:"my-category"}]},q={authors:"Author",categories:"Category"};function Tr(P){const t=C.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:y,block:f}=P;let u;t[0]!==w||t[1]!==v||t[2]!==j?(u={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=u):u=t[3];const m=R(u);let d;t[4]!==f||t[5]!==p?(d=D(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==y||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:y,data:J(y,p,e)})},t[7]=y,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=K(B,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(M,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(A,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:x=>a(o.key,x),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(T,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:S(i[o.key]),onChange:x=>a(o.key,x.target.value),rows:3}):r.jsx(F,{id:o.key,value:S(i[o.key]),placeholder:o.placeholder,onChange:x=>a(o.key,x.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let g;t[29]!==c?(g=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=g):g=t[30];let b;return t[31]!==g||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,g]}),t[31]=g,t[32]=n,t[33]=b):b=t[33],b}export{Tr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-1N9kmpom.js","assets/index-8Av7_XG5.js","assets/index-D5dv4kfs.css","assets/XCircle-BjeFLJxj.js","assets/CheckCircle-CPLY3iX-.js","assets/Container-V3OuMECL.js","assets/Settings02-COHAF-aj.js","assets/constants-DeFtLUND.js","assets/useInfiniteQuery-CQ_UxVw9.js","assets/infiniteQueryObserver-BPAoXqhZ.js","assets/badge-BiVWMQaC.js","assets/input-CFgdCIf-.js","assets/dropdown-menu-BuEg85yr.js","assets/Check-D-2DMeXR.js","assets/ChevronRight-C6_Bb1P7.js","assets/DotsVertical-CYMPhMIv.js","assets/table-Dpu-CGxg.js","assets/toggle-group-a9DpUbSj.js","assets/use-view-mode-BwvjqQMY.js","assets/tooltip-B9p8ywB_.js","assets/FilterLines-B2lLGnWS.js","assets/Globe01-BSqLqa8H.js","assets/SearchMd-Dt4Aj6N4.js","assets/dialog-BDoa-Aig.js","assets/X-D5DAti-0.js","assets/AlertCircle-Ctbek2zl.js","assets/Upload01-BWuva6Fs.js","assets/alert-dialog-Ci1rMRpl.js","assets/card-Bs_ZETWd.js","assets/Trash01-m4F91Gbm.js","assets/label-D5ze4fbW.js","assets/select-Y4AHPww8.js","assets/ChevronDown-DUb-OAcF.js","assets/ChevronUp-mT0kmu5O.js","assets/switch-CCjru8jV.js","assets/textarea-Bw4v_xfm.js","assets/RefreshCcw01-DSZXx3HQ.js","assets/checkbox-CDeLVmoz.js","assets/Eye-DLKlw-42.js","assets/LinkExternal01-C7Ulot5I.js","assets/use-copy-DPF-R5Zs.js","assets/Key01-DeIJhm73.js","assets/Plus-DINfOuqC.js","assets/Play-CL1Mgiwf.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as i,j as e,r as s,l as a,_ as o}from"./index-8Av7_XG5.js";import{R as l}from"./require-capability-B58b3LsO.js";import"./use-capability-CeWdChcL.js";import"./access-gate-Duof6cnb.js";import"./capability-load-error-BoG7ZxlR.js";const m=s.lazy(()=>o(()=>import("./registry-layout-1N9kmpom.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(l,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(m,{})})}),r[0]=t):t=r[0],t}export{f as default};
|