decocms 2.292.1 → 2.293.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-Cx8oex2u.js → AlertCircle-DnJbX_0w.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DtpIYMrr.js → ArrowNarrowLeft-M9-X6Sxy.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BBjaHjTK.js → ArrowUpRight-BQK-oA7E.js} +1 -1
- package/dist/client/assets/{CheckCircle-Mywkb82K.js → CheckCircle-BTDGGZJo.js} +1 -1
- package/dist/client/assets/{ChevronDown-BE0rQ4ho.js → ChevronDown-D098IDk9.js} +1 -1
- package/dist/client/assets/{ChevronRight-BVJ2HUMt.js → ChevronRight-DIr3-XeU.js} +1 -1
- package/dist/client/assets/{ChevronUp-B2y_5HwX.js → ChevronUp-qt4sL4uC.js} +1 -1
- package/dist/client/assets/{Container-CtsNRge8.js → Container-BvdKvtbe.js} +1 -1
- package/dist/client/assets/{DotsVertical-BQnGY6Nc.js → DotsVertical-DGFUAKYN.js} +1 -1
- package/dist/client/assets/{LinkExternal01-SieYyhiZ.js → LinkExternal01-CS_vTEL0.js} +1 -1
- package/dist/client/assets/{Lock01-BrFrkt3t.js → Lock01-DepQhBci.js} +1 -1
- package/dist/client/assets/{Palette-2CChK5yr.js → Palette-SeD4BOqL.js} +1 -1
- package/dist/client/assets/{Play-BfzIvHVC.js → Play-B2WhNMxb.js} +1 -1
- package/dist/client/assets/{Plus-kLSd3TZy.js → Plus-6a_0gFD5.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-B-L6FvMp.js → RefreshCcw01-CmGHOB_j.js} +1 -1
- package/dist/client/assets/{SearchMd-BfBE-dHK.js → SearchMd-B4RJoOIR.js} +1 -1
- package/dist/client/assets/{Settings02-EP4I50bB.js → Settings02-86F4b3dQ.js} +1 -1
- package/dist/client/assets/{Shield01-D19-LRUf.js → Shield01-CzaXyqoU.js} +1 -1
- package/dist/client/assets/{Star01-MuiWZ8GS.js → Star01-BsL_E8DX.js} +1 -1
- package/dist/client/assets/{Sun-CTLobT4y.js → Sun-CoYtwe4c.js} +1 -1
- package/dist/client/assets/{Tool01-CeBylvMu.js → Tool01-Cxeqfwwz.js} +1 -1
- package/dist/client/assets/{Trash01-BLGcALKg.js → Trash01-Crqeojj8.js} +1 -1
- package/dist/client/assets/{User01-BLHrCCyy.js → User01-lfQ-qZIG.js} +1 -1
- package/dist/client/assets/{Users03-C3QqJn94.js → Users03-BEcIfaLP.js} +1 -1
- package/dist/client/assets/{X-BJbamPEP.js → X-DSm8Y-S-.js} +1 -1
- package/dist/client/assets/{XCircle-DP5EGLqX.js → XCircle-D0NNu2cU.js} +1 -1
- package/dist/client/assets/{XClose-BRn4UVuG.js → XClose-8tp9nQPE.js} +1 -1
- package/dist/client/assets/{Zap-kZUu0No-.js → Zap-GnwBp_Qp.js} +1 -1
- package/dist/client/assets/{ZapSquare-B3o6QvJe.js → ZapSquare-DgxRVJjy.js} +1 -1
- package/dist/client/assets/accordion-CJq3HBrS.js +1 -0
- package/dist/client/assets/agent-icon-DxobcFDr.js +1 -0
- package/dist/client/assets/agents-list-eEeKypKu.js +1 -0
- package/dist/client/assets/ai-providers-D_bgIPsh.js +1 -0
- package/dist/client/assets/{alert-dialog-BFg1HHbW.js → alert-dialog-CscciHzk.js} +2 -2
- package/dist/client/assets/{auth-catchall-BPCBowrT.js → auth-catchall-DZZidYw0.js} +1 -1
- package/dist/client/assets/{automation-list-row-0e1qSQoQ.js → automation-list-row-Br_pkbGs.js} +1 -1
- package/dist/client/assets/automations-Ch3eQvio.js +1 -0
- package/dist/client/assets/{avatar-BfSY5CVM.js → avatar-BQ09Qk0Z.js} +1 -1
- package/dist/client/assets/{badge-C_B8gNbw.js → badge-Clg4Tzdw.js} +1 -1
- package/dist/client/assets/brand-context-DZl3n4iE.js +1 -0
- package/dist/client/assets/{card-G6flwhwa.js → card-DUOq7Rl6.js} +1 -1
- package/dist/client/assets/chat-context-CfrtTY3a.js +31 -0
- package/dist/client/assets/{checkbox-LBmczTXJ.js → checkbox-D2GZcsVt.js} +1 -1
- package/dist/client/assets/collection-detail-ChjtG6Ga.js +1 -0
- package/dist/client/assets/collection-display-button-BZwsY1Wv.js +1 -0
- package/dist/client/assets/{collection-search-DoXoIAYq.js → collection-search-CzSQR8Hb.js} +1 -1
- package/dist/client/assets/{collection-search-CsSMb59s.js → collection-search-DW3g3zGc.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B2fVBjE4.js → collection-table-wrapper-B84Op-Zk.js} +1 -1
- package/dist/client/assets/{collection-tabs-CA1SpsaZ.js → collection-tabs-DVyOXsXh.js} +1 -1
- package/dist/client/assets/{collections-BAHpsq0P.js → collections-CzE8C7FB.js} +1 -1
- package/dist/client/assets/{command-CJYPyBOh.js → command-ChcvD0z3.js} +1 -1
- package/dist/client/assets/{connection-card-DZ1fYoPr.js → connection-card-C2vEoZIt.js} +1 -1
- package/dist/client/assets/connection-detail-BGY9VwYa.js +1 -0
- package/dist/client/assets/connection-form-helpers-CgA-QNzF.js +1 -0
- package/dist/client/assets/connections-DRgi7C4U.js +1 -0
- package/dist/client/assets/{constants-B-gCw63I.js → constants-CrD_AMxD.js} +1 -1
- package/dist/client/assets/{constants-Dw_UtizE.js → constants-nJzh8CYx.js} +2 -2
- package/dist/client/assets/{dialog-DjZXbytL.js → dialog-CVDAkUpR.js} +1 -1
- package/dist/client/assets/domain-settings-ClmaftJG.js +1 -0
- package/dist/client/assets/{drawer-BFBl_9mB.js → drawer-CFg3CiQr.js} +1 -1
- package/dist/client/assets/dropdown-menu-gP2-wJTw.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-DZA29J1C.js +1 -0
- package/dist/client/assets/{empty-state-CWYR2iH4.js → empty-state-C2PUUqhT.js} +1 -1
- package/dist/client/assets/{empty-state-DskpQs8Q.js → empty-state-CPpC79-7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DiYA0QYt.js → extract-connection-data-5g73Imwy.js} +1 -1
- package/dist/client/assets/features-CeA9UMCz.js +1 -0
- package/dist/client/assets/form-yPmbpUVF.js +1 -0
- package/dist/client/assets/general-CX6-dTKZ.js +1 -0
- package/dist/client/assets/index-B3vDeqTk.js +1 -0
- package/dist/client/assets/{index-Bm_-4bAj.js → index-BYM0cbyk.js} +3 -3
- package/dist/client/assets/{index-QvZR-ABK.js → index-BdUJIICa.js} +1 -1
- package/dist/client/assets/index-BzSFWy5-.js +189 -0
- package/dist/client/assets/index-C3hSkh4S.js +1 -0
- package/dist/client/assets/index-CXbGCxBV.js +547 -0
- package/dist/client/assets/{index-BnoHDdAn.js → index-CfanpUI7.js} +3 -3
- package/dist/client/assets/{index-x18ABRVV.js → index-CqrrK0SQ.js} +1 -1
- package/dist/client/assets/{index-DA_fcz0a.js → index-CsTWePfc.js} +1 -1
- package/dist/client/assets/index-DImBkhtD.js +1 -0
- package/dist/client/assets/index-Dbs2wH7N.js +1 -0
- package/dist/client/assets/index-DkZMRzTR.js +1 -0
- package/dist/client/assets/index-Dkaetwrr.js +142 -0
- package/dist/client/assets/{index-CllFnV9J.js → index-Dlk19fTc.js} +1 -1
- package/dist/client/assets/index-b9vWbQjO.js +1 -0
- package/dist/client/assets/{index-Bu0xhzLF.js → index-gKZjkMnf.js} +26 -26
- package/dist/client/assets/{infiniteQueryObserver-DEk-T30Y.js → infiniteQueryObserver-B9PWohpE.js} +1 -1
- package/dist/client/assets/{input-B5aMagwc.js → input-Cet4kRAV.js} +1 -1
- package/dist/client/assets/{integration-icon-B5mNngh-.js → integration-icon-BYjt2zM8.js} +1 -1
- package/dist/client/assets/{label-Bv4VMaQH.js → label-CaWfIbuT.js} +1 -1
- package/dist/client/assets/layout-BgwHTi9m.js +1 -0
- package/dist/client/assets/lean-canvas-recruit-modal-CNtMOKiS.js +116 -0
- package/dist/client/assets/{login-DFTX50_T.js → login-DDBhfkxa.js} +1 -1
- package/dist/client/assets/{members-BbGgTXF7.js → members-CpZry3vM.js} +1 -1
- package/dist/client/assets/{monaco-editor-CV15HqlU.js → monaco-editor-D2GSkzL1.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-FCrYNYUL.js → monitoring-stats-row-B9-AgFrN.js} +1 -1
- package/dist/client/assets/{oauth-callback-W1x4HvAt.js → oauth-callback-ZTQDmTMI.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-8jGGtkD-.js → oauth-callback-ai-provider-Gd1uARX2.js} +1 -1
- package/dist/client/assets/{onboarding-DiKHM7MB.js → onboarding-8fDDt_RN.js} +1 -1
- package/dist/client/assets/{org-layout-B-bINoer.js → org-layout-Bw77z4Sw.js} +1 -1
- package/dist/client/assets/org-plugin-layout-BIXLREf_.js +1 -0
- package/dist/client/assets/{task-status-D3v6N-jY.js → pair-CSF6pLZy.js} +40 -40
- package/dist/client/assets/plugin-empty-state-D452cObw.js +1 -0
- package/dist/client/assets/plugin-header-DesRdhcy.js +1 -0
- package/dist/client/assets/{plugin-layout-2a2a-fWN.js → plugin-layout-cW34W41Y.js} +1 -1
- package/dist/client/assets/{popover-CGtNHDEz.js → popover-dpRZqzOJ.js} +1 -1
- package/dist/client/assets/profile-AXVJhA8D.js +1 -0
- package/dist/client/assets/project-app-view-C0WWCGe_.js +1 -0
- package/dist/client/assets/registry-91e7KTfr.js +2 -0
- package/dist/client/assets/{registry-layout-YWa06n-y.js → registry-layout-DWruz43b.js} +1 -1
- package/dist/client/assets/required-auth-layout-DVgyyuV-.js +1 -0
- package/dist/client/assets/{reset-password-CfhsLJCK.js → reset-password-jjqpZRxZ.js} +1 -1
- package/dist/client/assets/roles-Bf8vBKyU.js +1 -0
- package/dist/client/assets/scroll-area-CH9Vosbx.js +1 -0
- package/dist/client/assets/{search-input-DRzVzeWW.js → search-input-BTdLweUR.js} +1 -1
- package/dist/client/assets/select-B6R2tTSM.js +1 -0
- package/dist/client/assets/{select-model-BdV3Nm5y.js → select-model-BMdrDFa3.js} +1 -1
- package/dist/client/assets/settings-layout-CnrVmFqe.js +1 -0
- package/dist/client/assets/{settings-section-nyO0fOgx.js → settings-section-Z9FmAPIg.js} +1 -1
- package/dist/client/assets/shell-layout-DaB5J-du.js +1 -0
- package/dist/client/assets/{skeleton-ClT50YXx.js → skeleton-BhVqr-eG.js} +1 -1
- package/dist/client/assets/sso-DZJw-CAn.js +1 -0
- package/dist/client/assets/store-D-L6Gt6i.js +1 -0
- package/dist/client/assets/store-registry-DdZCk03l.js +2 -0
- package/dist/client/assets/{switch-Bp1Tvx2h.js → switch-D_DqyrYW.js} +1 -1
- package/dist/client/assets/{table-BL7WuMkY.js → table-D1_6e_tY.js} +1 -1
- package/dist/client/assets/{tabs-CNz9F6wL.js → tabs-Bu_QsdLq.js} +1 -1
- package/dist/client/assets/task-status-DKnoaN0K.js +1 -0
- package/dist/client/assets/{textarea-BxmFQbso.js → textarea-BPX5qWaA.js} +1 -1
- package/dist/client/assets/{toggle-group-B4KaadHq.js → toggle-group-BJxlfhsN.js} +1 -1
- package/dist/client/assets/tools-list-CjPOU8GA.js +1 -0
- package/dist/client/assets/tooltip-DlUl6zVU.js +1 -0
- package/dist/client/assets/{types-BtVZ_7jK.js → types-CUVoLk-m.js} +6 -6
- package/dist/client/assets/{use-ai-providers-DqhLue8O.js → use-ai-providers-CKSasQTP.js} +1 -1
- package/dist/client/assets/{use-collections-CLt7BhQ3.js → use-collections-DKaygmj-.js} +1 -1
- package/dist/client/assets/{use-connection-BCV5VAjQ.js → use-connection-DLwIHVYP.js} +1 -1
- package/dist/client/assets/{use-copy-CYT1tdMJ.js → use-copy-CLL1wnsg.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-B693GvUD.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BNaQbe7E.js → use-decopilot-events-NXGOEGvZ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-YzycomMd.js → use-delete-connection-DN8HxHVx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CoMWGssU.js → use-infinite-scroll-B32XN73V.js} +1 -1
- package/dist/client/assets/{use-list-state-jiGNrC7M.js → use-list-state-Cwr5OloB.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-yi4edHzR.js → use-mcp-tools-CyPVbfii.js} +1 -1
- package/dist/client/assets/{use-members-BPb2gPfy.js → use-members-C8bjIWu8.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DuF5pNCT.js +1 -0
- package/dist/client/assets/{use-org-sso-CEfAe1W3.js → use-org-sso-pbiXxD33.js} +1 -1
- package/dist/client/assets/{use-organization-roles-1TjtICKp.js → use-organization-roles-7NVaQG9M.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B98QP_Ve.js → use-organization-settings-DpXizr85.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D0FgXcrs.js → use-registry-connections-BFqaVIUz.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B5WhjryL.js → use-status-sounds-DVyydX5_.js} +1 -1
- package/dist/client/assets/{use-tasks-COeMfIn8.js → use-tasks-tzb1zUeQ.js} +1 -1
- package/dist/client/assets/use-view-mode-D9sT86SW.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-CZoeCuBL.js → use-virtual-mcp-SIWEo5E_.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B3rxurAJ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-KPnhOQU0.js +1 -0
- package/dist/client/assets/{user-CWcWoefF.js → user-DxM-AJLw.js} +1 -1
- package/dist/client/assets/view-mode-toggle-CussfoqD.js +1 -0
- package/dist/client/assets/workflow-a5DJAs_-.js +1 -0
- package/dist/client/assets/workflow-detail-DqMXf6Es.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/license +9 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/pg-pool/LICENSE +21 -0
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/package.json +1 -1
- package/dist/client/assets/accordion-BP1gqDGq.js +0 -1
- package/dist/client/assets/agent-icon-Db8xI2bq.js +0 -1
- package/dist/client/assets/agents-list-CKkZAwkG.js +0 -1
- package/dist/client/assets/ai-providers-Cnvjm1DV.js +0 -1
- package/dist/client/assets/automations-Cr0E7mF8.js +0 -1
- package/dist/client/assets/brand-context-DMrJlbv3.js +0 -1
- package/dist/client/assets/chat-context-BJBiG4eq.js +0 -30
- package/dist/client/assets/collection-detail-D_lV_A0m.js +0 -1
- package/dist/client/assets/collection-display-button-BXL1tYdg.js +0 -1
- package/dist/client/assets/connection-detail-DGI32gtH.js +0 -1
- package/dist/client/assets/connection-form-helpers-Dim-adMo.js +0 -1
- package/dist/client/assets/connections-Dl4MUHeU.js +0 -1
- package/dist/client/assets/domain-settings-NIhMIJvG.js +0 -1
- package/dist/client/assets/dropdown-menu--l1OQ6xu.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-D8kk92gE.js +0 -1
- package/dist/client/assets/features-j7f3i077.js +0 -1
- package/dist/client/assets/form-BVdbuwTF.js +0 -1
- package/dist/client/assets/general-BLunjYWc.js +0 -1
- package/dist/client/assets/github-repo-picker-ku0KWxb8.js +0 -116
- package/dist/client/assets/index-CHcfXh0a.js +0 -1
- package/dist/client/assets/index-ClmOj0lo.js +0 -735
- package/dist/client/assets/index-I_6bIMcX.js +0 -1
- package/dist/client/assets/layout-ChoVtsz2.js +0 -1
- package/dist/client/assets/org-plugin-layout-enuMys5H.js +0 -1
- package/dist/client/assets/plugin-empty-state-DCR5r8Zj.js +0 -1
- package/dist/client/assets/plugin-header-DX2ycNO6.js +0 -1
- package/dist/client/assets/profile-C0rN-ocq.js +0 -1
- package/dist/client/assets/project-app-view-CQsZ6NHk.js +0 -1
- package/dist/client/assets/registry-BO2q_Gke.js +0 -2
- package/dist/client/assets/required-auth-layout-emsOE3qR.js +0 -1
- package/dist/client/assets/roles-BDsBxvE0.js +0 -1
- package/dist/client/assets/scroll-area-CoWBmpAM.js +0 -142
- package/dist/client/assets/select-DerdayxE.js +0 -1
- package/dist/client/assets/settings-layout-B3TmxZwq.js +0 -1
- package/dist/client/assets/shell-layout-cKwbYqFy.js +0 -1
- package/dist/client/assets/sso-DXETt_Ed.js +0 -1
- package/dist/client/assets/store-BBgqe7Dc.js +0 -1
- package/dist/client/assets/store-registry-DKa8Ghfu.js +0 -2
- package/dist/client/assets/tools-list-BNtwzSa4.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-DPW_d2QJ.js +0 -1
- package/dist/client/assets/use-mobile-BACO9YYc.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-DbPOuTIs.js +0 -1
- package/dist/client/assets/use-view-mode-BLlR5qfu.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BiAZtptE.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CPbx6xDm.js +0 -1
- package/dist/client/assets/view-mode-toggle-C_B0ABFw.js +0 -1
- package/dist/client/assets/workflow-Cq9jV44q.js +0 -1
- package/dist/client/assets/workflow-detail-CaiPxMVe.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as F,n as ke,aO as qe,aP as Pe,
|
|
1
|
+
import{e as F,n as ke,aO as qe,aP as Pe,w as be,bl as p,a$ as t,aI as b,J as l,bm as P,H as s,a_ as g,aK as u,I as f,aJ as x,bn as B,bo as ye,bp as ve,bq as K,br as j,bs as xe,bt as we,bu as V,bv as Te,bw as Ie,bx as Ee,by as Le,bz as ze,bA as De,bB as Ne,bC as Ae,bD as Ue,bE as Oe,bF as $e,bG as Be,bH as je,bI as Fe,bJ as Ke,bK as Ve,bL as We,r as oe,t as Je,c as se,j as v}from"./index-gKZjkMnf.js";import{K as re,P as Ze}from"./constants-nJzh8CYx.js";async function Re(n){if(!n.getServerCapabilities()?.resources)return{resources:[]};try{return await n.listResources()}catch(o){if(o instanceof qe&&o.code===Pe.MethodNotFound)return{resources:[]};throw o}}async function Qe(n,e){return await n.readResource({uri:e})}function Yt(n){const e=F.c(12);let o,i;e[0]!==n?({client:o,...i}=n,e[0]=n,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let r;e[3]!==o?(r=re.mcpResourcesList(o),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==o?(a=()=>Re(o),e[5]=o,e[6]=a):a=e[6];const c=i.staleTime??3e4;let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d={...i,queryKey:r,queryFn:a,staleTime:c,retry:!1},e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],be(d)}function Gt(n){const e=F.c(12);let o,i;e[0]!==n?({client:o,...i}=n,e[0]=n,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let r;e[3]!==o?(r=re.mcpResourcesList(o),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==o?(a=()=>Re(o),e[5]=o,e[6]=a):a=e[6];const c=i.staleTime??3e4;let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d={...i,queryKey:r,queryFn:a,staleTime:c,retry:!1},e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],ke(d)}function Ye(n){const e=F.c(15);let o,i,r;e[0]!==n?({client:o,uri:r,...i}=n,e[0]=n,e[1]=o,e[2]=i,e[3]=r):(o=e[1],i=e[2],r=e[3]);let a;e[4]!==o||e[5]!==r?(a=re.mcpReadResource(o,r),e[4]=o,e[5]=r,e[6]=a):a=e[6];let c;e[7]!==o||e[8]!==r?(c=()=>Qe(o,r),e[7]=o,e[8]=r,e[9]=c):c=e[9];const d=i.staleTime??3e4;let h;return e[10]!==i||e[11]!==a||e[12]!==c||e[13]!==d?(h={...i,queryKey:a,queryFn:c,staleTime:d,retry:!1},e[10]=i,e[11]=a,e[12]=c,e[13]=d,e[14]=h):h=e[14],be(h)}const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ge(n,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${et(e)}">`,r=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,a=n.match(r);if(a){const m=(a.index??0)+a[0].length;return n.slice(0,m)+`
|
|
2
2
|
`+i+n.slice(m)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=n.match(c);if(d){const m=(d.index??0)+d[0].length;return n.slice(0,m)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -8,7 +8,7 @@ import{e as F,n as ke,aO as qe,aP as Pe,V as be,bl as p,a$ as t,aI as b,y as l,b
|
|
|
8
8
|
</head>`+n.slice(m)}return`<head>
|
|
9
9
|
`+i+`
|
|
10
10
|
</head>
|
|
11
|
-
`+n}const Xe=/^https?:\/\/(\*\.)?[a-zA-Z0-9._-]+(:\d+)?\/?$/;function $(n){return!n||n.length===0?[]:n.filter(e=>Xe.test(e))}function et(n){if(n.csp)return n.csp;const e=n.resourceCsp;if(!e)return de;const o=$(e.resourceDomains),i=$(e.connectDomains),r=$(e.frameDomains),a=$(e.baseUriDomains),c=o.length>0,d=i.length>0,h=r.length>0,y=a.length>0;if(!c&&!d&&!h&&!y)return de;const m=o.join(" ");return["default-src 'none'",c?`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${m}`:"script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",c?`style-src 'unsafe-inline' ${m}`:"style-src 'unsafe-inline'",c?`img-src * data: blob: ${m}`:"img-src * data: blob:",c?`media-src * data: blob: ${m}`:"media-src * data: blob:",c?`font-src data: ${m}`:"font-src data:",d?`connect-src ${i.join(" ")}`:"connect-src 'none'",h?`frame-src ${r.join(" ")}`:"frame-src 'none'","worker-src blob:","form-action 'none'",y?`base-uri ${a.join(" ")}`:"base-uri 'none'"].join("; ")}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class tt extends
|
|
11
|
+
`+n}const Xe=/^https?:\/\/(\*\.)?[a-zA-Z0-9._-]+(:\d+)?\/?$/;function $(n){return!n||n.length===0?[]:n.filter(e=>Xe.test(e))}function et(n){if(n.csp)return n.csp;const e=n.resourceCsp;if(!e)return de;const o=$(e.resourceDomains),i=$(e.connectDomains),r=$(e.frameDomains),a=$(e.baseUriDomains),c=o.length>0,d=i.length>0,h=r.length>0,y=a.length>0;if(!c&&!d&&!h&&!y)return de;const m=o.join(" ");return["default-src 'none'",c?`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${m}`:"script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",c?`style-src 'unsafe-inline' ${m}`:"style-src 'unsafe-inline'",c?`img-src * data: blob: ${m}`:"img-src * data: blob:",c?`media-src * data: blob: ${m}`:"media-src * data: blob:",c?`font-src data: ${m}`:"font-src data:",d?`connect-src ${i.join(" ")}`:"connect-src 'none'",h?`frame-src ${r.join(" ")}`:"frame-src 'none'","worker-src blob:","form-action 'none'",y?`base-uri ${a.join(" ")}`:"base-uri 'none'"].join("; ")}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class tt extends Ze{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,o){}_ensureEventSlot(e){let o=this._eventSlots.get(e);if(!o){let i=this.eventSchemas[e];if(!i)throw Error(`Unknown event: ${String(e)}`);o={listeners:[]},this._eventSlots.set(e,o);let r=i.shape.method.value;this._registeredMethods.add(r);let a=o;super.setNotificationHandler(i,c=>{let d=c.params;this.onEventDispatch(e,d),a.onHandler?.(d);for(let h of[...a.listeners])h(d)})}return o}setEventHandler(e,o){let i=this._ensureEventSlot(e);i.onHandler&&o&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),i.onHandler=o}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,o){this._ensureEventSlot(e).listeners.push(o)}removeEventListener(e,o){let i=this._eventSlots.get(e);if(!i)return;let r=i.listeners.indexOf(o);r!==-1&&i.listeners.splice(r,1)}setRequestHandler=(e,o)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,o)};setNotificationHandler=(e,o)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,o)};warnIfRequestHandlerReplaced(e,o,i){o&&i&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,o)=>{let i=e.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(e,o)};_assertMethodNotRegistered(e,o){let i=e.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${o}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var Ce="2026-01-26",ot="ui/notifications/tool-input-partial",st=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),T=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),it=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),rt=b(it.describe(`Style variables for theming MCP apps.
|
|
12
12
|
|
|
13
13
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
14
14
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -45,8 +45,8 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
45
45
|
- \`false\`: request no visible border + background
|
|
46
46
|
- omitted: host decides border`)});var ue=s({method:t("ui/request-display-mode"),params:s({mode:T.describe("The display mode being requested.")})});s({mode:T.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough();var gt=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:l().optional(),visibility:u(gt).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
47
47
|
- "model": Tool visible to and callable by the agent
|
|
48
|
-
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var bt=s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),yt=s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(
|
|
49
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:_e.describe("Partial context update containing only changed fields.")});var vt=s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),xt=s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:mt.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:ht.describe("Features and capabilities provided by the host."),hostContext:_e.describe("Rich context about the host environment.")}).passthrough();class wt{eventTarget;eventSource;messageListener;constructor(e=window.parent,o){this.eventTarget=e,this.eventSource=o,this.messageListener=i=>{if(o&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=We.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,i):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==ot&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Rt="ui/resourceUri";function Ct(n){let e=n._meta?.ui?.resourceUri;if(e===void 0&&(e=n._meta?.[Rt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var _t=[Ce];class St extends tt{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${i.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),o(i,r)))};eventSchemas={sizechange:lt,sandboxready:at,initialized:ft,requestteardown:ut,loggingmessage:Te};constructor(e,o,i,r){super(r),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(xt,a=>this._oninitialize(a)),this.setRequestHandler(Ie,(a,c)=>(this.onping?.(a.params,c),{})),this.replaceRequestHandler(ue,a=>({mode:this._hostContext.displayMode??"inline"}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(yt,async(o,i)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(o.params,i)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(nt,async(o,i)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(o.params,i)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(bt,async(o,i)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(o.params,i)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(ue,async(o,i)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(o.params,i)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(vt,async(o,i)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(o.params,i)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Ee,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Le,async(o,i)=>e(o.params,i))}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(ze,async(o,i)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(o.params,i)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(De,async(o,i)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(o.params,i)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(Ne,async(o,i)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(o.params,i)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Ae,async(o,i)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(o.params,i)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(e){let o=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values."),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:_t.includes(o)?o:Ce,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let r of Object.keys(e)){let a=this._hostContext[r],c=e[r];Ht(a,c)||(o[r]=c,i=!0)}i&&(this._hostContext=e,this.sendHostContextChange(o))}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,o){return this.request({method:"ui/resource-teardown",params:e},pt,o)}sendResourceTeardown=this.teardownResource;callTool(e,o){return this.request({method:"tools/call",params:e},j,o)}listTools(e,o){return this.request({method:"tools/list",params:e},Ue,o)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let o=this._client.getServerCapabilities();if(!o)throw Error("Client server capabilities not available");o.tools&&(this.oncalltool=async(i,r)=>this._client.request({method:"tools/call",params:i},j,{signal:r.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Oe,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,r)=>this._client.request({method:"resources/list",params:i},$e,{signal:r.signal}),this.onlistresourcetemplates=async(i,r)=>this._client.request({method:"resources/templates/list",params:i},Be,{signal:r.signal}),this.onreadresource=async(i,r)=>this._client.request({method:"resources/read",params:i},je,{signal:r.signal}),o.resources.listChanged&&this._client.setNotificationHandler(Fe,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,r)=>this._client.request({method:"prompts/list",params:i},Ve,{signal:r.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ke,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function Ht(n,e){return JSON.stringify(n)===JSON.stringify(e)}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var Mt=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),I=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),kt=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),qt=b(kt.describe(`Style variables for theming MCP apps.
|
|
48
|
+
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var bt=s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),yt=s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(K).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:l().describe("HTML content to load into the inner iframe."),sandbox:l().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ne.optional().describe("CSP configuration from resource metadata."),permissions:ae.optional().describe("Sandbox permissions from resource metadata.")})});s({method:t("ui/notifications/tool-result"),params:j.describe("Standard MCP tool execution result.")});var _e=s({toolInfo:s({id:we.optional().describe("JSON-RPC id of the tools/call request."),tool:xe.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:st.optional().describe("Current color theme preference."),styles:dt.optional().describe("Style configuration for theming the app."),displayMode:T.optional().describe("How the UI is currently displayed."),availableDisplayModes:u(T).optional().describe("Display modes the host supports."),containerDimensions:p([s({height:f().describe("Fixed container height in pixels.")}),s({maxHeight:p([f(),P()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:f().describe("Fixed container width in pixels.")}),s({maxWidth:p([f(),P()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
49
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:_e.describe("Partial context update containing only changed fields.")});var vt=s({method:t("ui/update-model-context"),params:s({content:u(K).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),xt=s({method:t("ui/initialize"),params:s({appInfo:V.describe("App identification (name and version)."),appCapabilities:mt.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:V.describe("Host application identification and version."),hostCapabilities:ht.describe("Features and capabilities provided by the host."),hostContext:_e.describe("Rich context about the host environment.")}).passthrough();class wt{eventTarget;eventSource;messageListener;constructor(e=window.parent,o){this.eventTarget=e,this.eventSource=o,this.messageListener=i=>{if(o&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=We.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,i):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==ot&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Rt="ui/resourceUri";function Ct(n){let e=n._meta?.ui?.resourceUri;if(e===void 0&&(e=n._meta?.[Rt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var _t=[Ce];class St extends tt{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${i.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),o(i,r)))};eventSchemas={sizechange:lt,sandboxready:at,initialized:ft,requestteardown:ut,loggingmessage:Te};constructor(e,o,i,r){super(r),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(xt,a=>this._oninitialize(a)),this.setRequestHandler(Ie,(a,c)=>(this.onping?.(a.params,c),{})),this.replaceRequestHandler(ue,a=>({mode:this._hostContext.displayMode??"inline"}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(yt,async(o,i)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(o.params,i)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(nt,async(o,i)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(o.params,i)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(bt,async(o,i)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(o.params,i)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(ue,async(o,i)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(o.params,i)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(vt,async(o,i)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(o.params,i)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Ee,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Le,async(o,i)=>e(o.params,i))}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(ze,async(o,i)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(o.params,i)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(De,async(o,i)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(o.params,i)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(Ne,async(o,i)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(o.params,i)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Ae,async(o,i)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(o.params,i)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(e){let o=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values."),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:_t.includes(o)?o:Ce,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let r of Object.keys(e)){let a=this._hostContext[r],c=e[r];Ht(a,c)||(o[r]=c,i=!0)}i&&(this._hostContext=e,this.sendHostContextChange(o))}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,o){return this.request({method:"ui/resource-teardown",params:e},pt,o)}sendResourceTeardown=this.teardownResource;callTool(e,o){return this.request({method:"tools/call",params:e},j,o)}listTools(e,o){return this.request({method:"tools/list",params:e},Ue,o)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let o=this._client.getServerCapabilities();if(!o)throw Error("Client server capabilities not available");o.tools&&(this.oncalltool=async(i,r)=>this._client.request({method:"tools/call",params:i},j,{signal:r.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Oe,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,r)=>this._client.request({method:"resources/list",params:i},$e,{signal:r.signal}),this.onlistresourcetemplates=async(i,r)=>this._client.request({method:"resources/templates/list",params:i},Be,{signal:r.signal}),this.onreadresource=async(i,r)=>this._client.request({method:"resources/read",params:i},je,{signal:r.signal}),o.resources.listChanged&&this._client.setNotificationHandler(Fe,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,r)=>this._client.request({method:"prompts/list",params:i},Ke,{signal:r.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ve,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function Ht(n,e){return JSON.stringify(n)===JSON.stringify(e)}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var Mt=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),I=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),kt=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),qt=b(kt.describe(`Style variables for theming MCP apps.
|
|
50
50
|
|
|
51
51
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
52
52
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -83,5 +83,5 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
83
83
|
- \`false\`: request no visible border + background
|
|
84
84
|
- omitted: host decides border`)});s({method:t("ui/request-display-mode"),params:s({mode:I.describe("The display mode being requested.")})});s({mode:I.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough();var Lt=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:l().optional(),visibility:u(Lt).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
85
85
|
- "model": Tool visible to and callable by the agent
|
|
86
|
-
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(
|
|
87
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:Se.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:Et.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:It.describe("Features and capabilities provided by the host."),hostContext:Se.describe("Rich context about the host environment.")}).passthrough();function zt(){let n=document.documentElement.getAttribute("data-theme");return n==="dark"||n==="light"?n:document.documentElement.classList.contains("dark")?"dark":"light"}const Dt=[["--background","--color-background-primary"],["--muted","--color-background-secondary"],["--accent","--color-background-tertiary"],["--destructive","--color-background-danger"],["--success","--color-background-success"],["--warning","--color-background-warning"],["--foreground","--color-text-primary"],["--muted-foreground","--color-text-secondary"],["--accent-foreground","--color-text-tertiary"],["--destructive-foreground","--color-text-danger"],["--success-foreground","--color-text-success"],["--warning-foreground","--color-text-warning"],["--border","--color-border-primary"],["--input","--color-border-secondary"],["--ring","--color-ring-primary"],["--font-sans","--font-sans"],["--font-mono","--font-mono"],["--font-weight-normal","--font-weight-normal"],["--font-weight-medium","--font-weight-medium"],["--font-weight-semibold","--font-weight-semibold"],["--font-weight-bold","--font-weight-bold"],["--radius","--border-radius-md"],["--default-border-width","--border-width-regular"],["--shadow-sm","--shadow-sm"],["--shadow-md","--shadow-md"],["--shadow-lg","--shadow-lg"]];function Nt(){if(typeof document>"u")return{};const n=getComputedStyle(document.documentElement),e={};for(const[o,i]of Dt){const r=n.getPropertyValue(o).trim();r&&(e[i]=r)}return{variables:e}}const At={name:"MCP Mesh",version:"1.0.0"},Ut={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Ot=15e3;function $t(){return typeof navigator>"u"?"en":navigator.language??"en"}function Bt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function jt(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function me(n,e,o,i){return{theme:zt(),styles:Nt(),displayMode:n,availableDisplayModes:["inline","fullscreen"],locale:$t(),timeZone:Bt(),platform:jt(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const ie=new Set;let fe=!1;function Ft(){if(fe||typeof document>"u")return;fe=!0;const n=()=>ie.forEach(e=>e());new MutationObserver(n).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n)}function Vt(n){return ie.add(n),Ft(),()=>ie.delete(n)}class Kt{bridge=null;timeout=null;disposed=!1;unsubTheme=null;snapshot;listeners=new Set;config;constructor(e){this.config=e,this.snapshot=Object.freeze({height:e.minHeight,isLoading:!0,error:null})}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.snapshot;updateConfig(e){const o=this.config;this.config=e,!(!this.bridge||this.disposed)&&(e.displayMode!==o.displayMode&&this.pushHostContext(),e.toolInput!==o.toolInput&&e.toolInput!=null&&this.bridge.sendToolInput({arguments:e.toolInput}),e.toolResult!==o.toolResult&&e.toolResult!=null&&this.bridge.sendToolResult(e.toolResult))}pushHostContext(){if(!this.bridge||this.disposed)return;const{displayMode:e,maxHeight:o,toolInfo:i,orgId:r}=this.config;this.bridge.setHostContext(me(e,i,o,r))}set(e){const o=this.snapshot,i={...o,...e};if(!(i.height===o.height&&i.isLoading===o.isLoading&&i.error===o.error)){this.snapshot=Object.freeze(i);for(const r of this.listeners)r()}}teardown(){(this.bridge||this.timeout||this.unsubTheme)&&this.config.onTeardown?.(),this.disposed=!0,this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.teardownResource({}).catch(()=>{}),this.bridge.close(),this.bridge=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}attach=e=>{if(this.teardown(),this.disposed=!1,this.set({height:this.config.minHeight,isLoading:!0,error:null}),!!e){e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};try{const{client:o,displayMode:i,maxHeight:r,toolInfo:a,orgId:c}=this.config,d=me(i,a,r,c),h=new St(o,At,Ut,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Vt(()=>this.pushHostContext())}catch(o){this.clearTimeout(),console.error("Failed to create AppBridge:",o),this.set({error:o instanceof Error?o.message:"Unknown error",isLoading:!1})}}};registerHandlers(e){e.onopenlink=async({url:o})=>{let i=null;try{i=new URL(o)}catch{}if(!i||!["http:","https:"].includes(i.protocol))throw new Error("Only http and https URLs are allowed");return window.open(o,"_blank","noopener,noreferrer"),{}},e.onmessage=async o=>(this.config.onMessage?.(o),{}),e.onupdatemodelcontext=async o=>(this.config.onUpdateModelContext?.(o),{}),e.onsizechange=({height:o})=>{if(!this.disposed&&o!=null){const{minHeight:i,maxHeight:r}=this.config;this.set({height:Math.max(i,Math.min(r,o))})}},e.onloggingmessage=({level:o,data:i})=>{console[o==="error"?"error":"debug"](`[MCP App ${this.config.toolInfo?.tool.name??"unknown"}]`,i)},e.onrequestdisplaymode=async({mode:o})=>({mode:this.config.onRequestDisplayMode?await this.config.onRequestDisplayMode(o):this.config.displayMode}),e.ondownloadfile=async({contents:o})=>{for(const i of o)if(i.type==="resource"){const r=i.resource,a="blob"in r?new Blob([Uint8Array.from(atob(r.blob),h=>h.charCodeAt(0))],{type:r.mimeType}):new Blob([r.text??""],{type:r.mimeType}),c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=r.uri.split("/").pop()??"download",d.click(),URL.revokeObjectURL(c)}else i.type==="resource_link"&&window.open(i.uri,"_blank");return{}}}registerInitHandler(e){e.oninitialized=()=>{if(this.disposed)return;this.clearTimeout(),this.set({isLoading:!1});const{toolInput:o,toolResult:i}=this.config;o!=null&&e.sendToolInput({arguments:o}),i!=null&&e.sendToolResult(i)}}startInitTimeout(){this.timeout=setTimeout(()=>{this.disposed||this.set({error:"App took too long to load",isLoading:!1})},Ot)}clearTimeout(){this.timeout&&(globalThis.clearTimeout(this.timeout),this.timeout=null)}connectTransport(e,o){if(!o.contentWindow){console.warn("iframe contentWindow not yet available");return}const i=new wt(o.contentWindow,o.contentWindow);e.connect(i).catch(r=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",r),this.set({error:r instanceof Error?r.message:"Connection failed",isLoading:!1}))})}}function Wt(n){const e=oe.useRef(new Kt(n));oe.useEffect(()=>{e.current.updateConfig(n)},[n]);const{height:o,isLoading:i,error:r}=oe.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:r,iframeRef:e.current.attach}}const ge=new Set;function Zt(n){const e=n?.contents?.[0];return!e||!("text"in e)||!e.text?null:Ge(e.text,{resourceCsp:e._meta?.ui?.csp})}function Xt(n){const e=F.c(42),{resourceURI:o,orgId:i,toolInfo:r,toolInput:a,toolResult:c,displayMode:d,minHeight:h,maxHeight:y,client:m,onMessage:E,onUpdateModelContext:W,onTeardown:Z,onRequestDisplayMode:J,className:R}=n,w=d===void 0?"inline":d,Q=h===void 0?150:h,Y=y===void 0?600:y;let L;e[0]!==m||e[1]!==o?(L={client:m,uri:o,staleTime:3e4},e[0]=m,e[1]=o,e[2]=L):L=e[2];const{data:He}=Ye(L),z=Zt(He);o&&!ge.has(o)&&(ge.add(o),Ze("mcp_app_opened",{resource_uri:o,display_mode:w,tool_name:r?.tool?.name??null}));let D;e[3]!==m||e[4]!==w||e[5]!==Y||e[6]!==Q||e[7]!==E||e[8]!==J||e[9]!==Z||e[10]!==W||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==c?(D={client:m,displayMode:w,minHeight:Q,maxHeight:Y,orgId:i,toolInfo:r,toolInput:a,toolResult:c,onMessage:E,onUpdateModelContext:W,onTeardown:Z,onRequestDisplayMode:J},e[3]=m,e[4]=w,e[5]=Y,e[6]=Q,e[7]=E,e[8]=J,e[9]=Z,e[10]=W,e[11]=i,e[12]=r,e[13]=a,e[14]=c,e[15]=D):D=e[15];const{height:G,isLoading:N,error:A,iframeRef:X}=Wt(D);if(!z)return null;if(A){let k;e[16]!==R?(k=se("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",R),e[16]=R,e[17]=k):k=e[17];let q;e[18]!==A?(q=v.jsx("span",{className:"text-sm",children:A}),e[18]=A,e[19]=q):q=e[19];let O;return e[20]!==k||e[21]!==q?(O=v.jsx("div",{className:k,children:q}),e[20]=k,e[21]=q,e[22]=O):O=e[22],O}const Me=r?.tool.name;let C;e[23]!==R?(C=se("relative w-full overflow-hidden rounded-lg",R),e[23]=R,e[24]=C):C=e[24];let _;e[25]!==w||e[26]!==G?(_=w!=="fullscreen"?{height:`${G}px`}:void 0,e[25]=w,e[26]=G,e[27]=_):_=e[27];let S;e[28]!==N?(S=N&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),v.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[28]=N,e[29]=S):S=e[29];const ee=N&&"invisible";let H;e[30]!==ee?(H=se("w-full h-full border-0",ee),e[30]=ee,e[31]=H):H=e[31];const te=`MCP App: ${Me??o}`;let M;e[32]!==z||e[33]!==X||e[34]!==H||e[35]!==te?(M=v.jsx("iframe",{ref:X,srcDoc:z,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:te}),e[32]=z,e[33]=X,e[34]=H,e[35]=te,e[36]=M):M=e[36];let U;return e[37]!==M||e[38]!==C||e[39]!==_||e[40]!==S?(U=v.jsxs("div",{className:C,style:_,children:[S,M]}),e[37]=M,e[38]=C,e[39]=_,e[40]=S,e[41]=U):U=e[41],U}const eo={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function to(n){if(!(n==null||typeof n!="object"))try{return Ct({_meta:n})}catch{return}}export{Xt as M,Gt as a,eo as b,to as g,Re as l,Qe as r,Yt as u};
|
|
86
|
+
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(K).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:l().describe("HTML content to load into the inner iframe."),sandbox:l().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:le.optional().describe("CSP configuration from resource metadata."),permissions:ce.optional().describe("Sandbox permissions from resource metadata.")})});s({method:t("ui/notifications/tool-result"),params:j.describe("Standard MCP tool execution result.")});var Se=s({toolInfo:s({id:we.optional().describe("JSON-RPC id of the tools/call request."),tool:xe.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Mt.optional().describe("Current color theme preference."),styles:Tt.optional().describe("Style configuration for theming the app."),displayMode:I.optional().describe("How the UI is currently displayed."),availableDisplayModes:u(I).optional().describe("Display modes the host supports."),containerDimensions:p([s({height:f().describe("Fixed container height in pixels.")}),s({maxHeight:p([f(),P()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:f().describe("Fixed container width in pixels.")}),s({maxWidth:p([f(),P()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
87
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:Se.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(K).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});s({method:t("ui/initialize"),params:s({appInfo:V.describe("App identification (name and version)."),appCapabilities:Et.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:V.describe("Host application identification and version."),hostCapabilities:It.describe("Features and capabilities provided by the host."),hostContext:Se.describe("Rich context about the host environment.")}).passthrough();function zt(){let n=document.documentElement.getAttribute("data-theme");return n==="dark"||n==="light"?n:document.documentElement.classList.contains("dark")?"dark":"light"}const Dt=[["--background","--color-background-primary"],["--muted","--color-background-secondary"],["--accent","--color-background-tertiary"],["--destructive","--color-background-danger"],["--success","--color-background-success"],["--warning","--color-background-warning"],["--foreground","--color-text-primary"],["--muted-foreground","--color-text-secondary"],["--accent-foreground","--color-text-tertiary"],["--destructive-foreground","--color-text-danger"],["--success-foreground","--color-text-success"],["--warning-foreground","--color-text-warning"],["--border","--color-border-primary"],["--input","--color-border-secondary"],["--ring","--color-ring-primary"],["--font-sans","--font-sans"],["--font-mono","--font-mono"],["--font-weight-normal","--font-weight-normal"],["--font-weight-medium","--font-weight-medium"],["--font-weight-semibold","--font-weight-semibold"],["--font-weight-bold","--font-weight-bold"],["--radius","--border-radius-md"],["--default-border-width","--border-width-regular"],["--shadow-sm","--shadow-sm"],["--shadow-md","--shadow-md"],["--shadow-lg","--shadow-lg"]];function Nt(){if(typeof document>"u")return{};const n=getComputedStyle(document.documentElement),e={};for(const[o,i]of Dt){const r=n.getPropertyValue(o).trim();r&&(e[i]=r)}return{variables:e}}const At={name:"MCP Mesh",version:"1.0.0"},Ut={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Ot=15e3;function $t(){return typeof navigator>"u"?"en":navigator.language??"en"}function Bt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function jt(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function me(n,e,o,i){return{theme:zt(),styles:Nt(),displayMode:n,availableDisplayModes:["inline","fullscreen"],locale:$t(),timeZone:Bt(),platform:jt(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const ie=new Set;let fe=!1;function Ft(){if(fe||typeof document>"u")return;fe=!0;const n=()=>ie.forEach(e=>e());new MutationObserver(n).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n)}function Kt(n){return ie.add(n),Ft(),()=>ie.delete(n)}class Vt{bridge=null;timeout=null;disposed=!1;unsubTheme=null;snapshot;listeners=new Set;config;constructor(e){this.config=e,this.snapshot=Object.freeze({height:e.minHeight,isLoading:!0,error:null})}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.snapshot;updateConfig(e){const o=this.config;this.config=e,!(!this.bridge||this.disposed)&&(e.displayMode!==o.displayMode&&this.pushHostContext(),e.toolInput!==o.toolInput&&e.toolInput!=null&&this.bridge.sendToolInput({arguments:e.toolInput}),e.toolResult!==o.toolResult&&e.toolResult!=null&&this.bridge.sendToolResult(e.toolResult))}pushHostContext(){if(!this.bridge||this.disposed)return;const{displayMode:e,maxHeight:o,toolInfo:i,orgId:r}=this.config;this.bridge.setHostContext(me(e,i,o,r))}set(e){const o=this.snapshot,i={...o,...e};if(!(i.height===o.height&&i.isLoading===o.isLoading&&i.error===o.error)){this.snapshot=Object.freeze(i);for(const r of this.listeners)r()}}teardown(){(this.bridge||this.timeout||this.unsubTheme)&&this.config.onTeardown?.(),this.disposed=!0,this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.teardownResource({}).catch(()=>{}),this.bridge.close(),this.bridge=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}attach=e=>{if(this.teardown(),this.disposed=!1,this.set({height:this.config.minHeight,isLoading:!0,error:null}),!!e){e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};try{const{client:o,displayMode:i,maxHeight:r,toolInfo:a,orgId:c}=this.config,d=me(i,a,r,c),h=new St(o,At,Ut,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Kt(()=>this.pushHostContext())}catch(o){this.clearTimeout(),console.error("Failed to create AppBridge:",o),this.set({error:o instanceof Error?o.message:"Unknown error",isLoading:!1})}}};registerHandlers(e){e.onopenlink=async({url:o})=>{let i=null;try{i=new URL(o)}catch{}if(!i||!["http:","https:"].includes(i.protocol))throw new Error("Only http and https URLs are allowed");return window.open(o,"_blank","noopener,noreferrer"),{}},e.onmessage=async o=>(this.config.onMessage?.(o),{}),e.onupdatemodelcontext=async o=>(this.config.onUpdateModelContext?.(o),{}),e.onsizechange=({height:o})=>{if(!this.disposed&&o!=null){const{minHeight:i,maxHeight:r}=this.config;this.set({height:Math.max(i,Math.min(r,o))})}},e.onloggingmessage=({level:o,data:i})=>{console[o==="error"?"error":"debug"](`[MCP App ${this.config.toolInfo?.tool.name??"unknown"}]`,i)},e.onrequestdisplaymode=async({mode:o})=>({mode:this.config.onRequestDisplayMode?await this.config.onRequestDisplayMode(o):this.config.displayMode}),e.ondownloadfile=async({contents:o})=>{for(const i of o)if(i.type==="resource"){const r=i.resource,a="blob"in r?new Blob([Uint8Array.from(atob(r.blob),h=>h.charCodeAt(0))],{type:r.mimeType}):new Blob([r.text??""],{type:r.mimeType}),c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=r.uri.split("/").pop()??"download",d.click(),URL.revokeObjectURL(c)}else i.type==="resource_link"&&window.open(i.uri,"_blank");return{}}}registerInitHandler(e){e.oninitialized=()=>{if(this.disposed)return;this.clearTimeout(),this.set({isLoading:!1});const{toolInput:o,toolResult:i}=this.config;o!=null&&e.sendToolInput({arguments:o}),i!=null&&e.sendToolResult(i)}}startInitTimeout(){this.timeout=setTimeout(()=>{this.disposed||this.set({error:"App took too long to load",isLoading:!1})},Ot)}clearTimeout(){this.timeout&&(globalThis.clearTimeout(this.timeout),this.timeout=null)}connectTransport(e,o){if(!o.contentWindow){console.warn("iframe contentWindow not yet available");return}const i=new wt(o.contentWindow,o.contentWindow);e.connect(i).catch(r=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",r),this.set({error:r instanceof Error?r.message:"Connection failed",isLoading:!1}))})}}function Wt(n){const e=oe.useRef(new Vt(n));oe.useEffect(()=>{e.current.updateConfig(n)},[n]);const{height:o,isLoading:i,error:r}=oe.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:r,iframeRef:e.current.attach}}const ge=new Set;function Jt(n){const e=n?.contents?.[0];return!e||!("text"in e)||!e.text?null:Ge(e.text,{resourceCsp:e._meta?.ui?.csp})}function Xt(n){const e=F.c(42),{resourceURI:o,orgId:i,toolInfo:r,toolInput:a,toolResult:c,displayMode:d,minHeight:h,maxHeight:y,client:m,onMessage:E,onUpdateModelContext:W,onTeardown:J,onRequestDisplayMode:Z,className:R}=n,w=d===void 0?"inline":d,Q=h===void 0?150:h,Y=y===void 0?600:y;let L;e[0]!==m||e[1]!==o?(L={client:m,uri:o,staleTime:3e4},e[0]=m,e[1]=o,e[2]=L):L=e[2];const{data:He}=Ye(L),z=Jt(He);o&&!ge.has(o)&&(ge.add(o),Je("mcp_app_opened",{resource_uri:o,display_mode:w,tool_name:r?.tool?.name??null}));let D;e[3]!==m||e[4]!==w||e[5]!==Y||e[6]!==Q||e[7]!==E||e[8]!==Z||e[9]!==J||e[10]!==W||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==c?(D={client:m,displayMode:w,minHeight:Q,maxHeight:Y,orgId:i,toolInfo:r,toolInput:a,toolResult:c,onMessage:E,onUpdateModelContext:W,onTeardown:J,onRequestDisplayMode:Z},e[3]=m,e[4]=w,e[5]=Y,e[6]=Q,e[7]=E,e[8]=Z,e[9]=J,e[10]=W,e[11]=i,e[12]=r,e[13]=a,e[14]=c,e[15]=D):D=e[15];const{height:G,isLoading:N,error:A,iframeRef:X}=Wt(D);if(!z)return null;if(A){let k;e[16]!==R?(k=se("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",R),e[16]=R,e[17]=k):k=e[17];let q;e[18]!==A?(q=v.jsx("span",{className:"text-sm",children:A}),e[18]=A,e[19]=q):q=e[19];let O;return e[20]!==k||e[21]!==q?(O=v.jsx("div",{className:k,children:q}),e[20]=k,e[21]=q,e[22]=O):O=e[22],O}const Me=r?.tool.name;let C;e[23]!==R?(C=se("relative w-full overflow-hidden rounded-lg",R),e[23]=R,e[24]=C):C=e[24];let _;e[25]!==w||e[26]!==G?(_=w!=="fullscreen"?{height:`${G}px`}:void 0,e[25]=w,e[26]=G,e[27]=_):_=e[27];let S;e[28]!==N?(S=N&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),v.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[28]=N,e[29]=S):S=e[29];const ee=N&&"invisible";let H;e[30]!==ee?(H=se("w-full h-full border-0",ee),e[30]=ee,e[31]=H):H=e[31];const te=`MCP App: ${Me??o}`;let M;e[32]!==z||e[33]!==X||e[34]!==H||e[35]!==te?(M=v.jsx("iframe",{ref:X,srcDoc:z,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:te}),e[32]=z,e[33]=X,e[34]=H,e[35]=te,e[36]=M):M=e[36];let U;return e[37]!==M||e[38]!==C||e[39]!==_||e[40]!==S?(U=v.jsxs("div",{className:C,style:_,children:[S,M]}),e[37]=M,e[38]=C,e[39]=_,e[40]=S,e[41]=U):U=e[41],U}const eo={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function to(n){if(!(n==null||typeof n!="object"))try{return Ct({_meta:n})}catch{return}}export{Xt as M,Gt as a,eo as b,to as g,Re as l,Qe as r,Yt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,s as m,K as P,
|
|
1
|
+
import{e as f,s as m,K as P,w as y,n as I}from"./index-gKZjkMnf.js";import{S,u as g}from"./constants-nJzh8CYx.js";function K(){const t=f.c(9),{org:e}=m();let n;t[0]!==e.id?(n={connectionId:S,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const o=g(n);let i;t[2]!==e.id?(i=P.aiProviders(e.id),t[2]=e.id,t[3]=i):i=t[3];let s;t[4]!==o?(s=async()=>(await o.callTool({name:"AI_PROVIDERS_LIST",arguments:{}})).structuredContent,t[4]=o,t[5]=s):s=t[5];let l;t[6]!==i||t[7]!==s?(l={queryKey:i,staleTime:1/0,queryFn:s},t[6]=i,t[7]=s,t[8]=l):l=t[8];const{data:r}=y(l);return r}function R(){const t=f.c(11),{org:e}=m();let n;t[0]!==e.id?(n={connectionId:S,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const o=g(n);let i;t[2]!==e.id?(i=P.aiProviderKeys(e.id),t[2]=e.id,t[3]=i):i=t[3];let s;t[4]!==o?(s=async()=>(await o.callTool({name:"AI_PROVIDER_KEY_LIST",arguments:{}})).structuredContent??null,t[4]=o,t[5]=s):s=t[5];let l;t[6]!==i||t[7]!==s?(l={queryKey:i,staleTime:6e4,queryFn:s},t[6]=i,t[7]=s,t[8]=l):l=t[8];const{data:r}=y(l);let u;return t[9]!==r?.keys?(u=r?.keys??[],t[9]=r?.keys,t[10]=u):u=t[10],u}function q(t){const e=f.c(17),{org:n}=m();let o;e[0]!==n.id?(o={connectionId:S,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const i=g(o);let s;e[2]!==t||e[3]!==n.id?(s=P.aiProviderModels(n.id,t??""),e[2]=t,e[3]=n.id,e[4]=s):s=e[4];const l=!!t;let r;e[5]!==i||e[6]!==t?(r=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[5]=i,e[6]=t,e[7]=r):r=e[7];let u;e[8]!==s||e[9]!==l||e[10]!==r?(u={queryKey:s,enabled:l,staleTime:6e4,queryFn:r},e[8]=s,e[9]=l,e[10]=r,e[11]=u):u=e[11];const{data:c,isLoading:T}=I(u);let a;e[12]!==c?.models?(a=c?.models??[],e[12]=c?.models,e[13]=a):a=e[13];const _=!!t&&T;let d;return e[14]!==a||e[15]!==_?(d={models:a,isLoading:_},e[14]=a,e[15]=_,e[16]=d):d=e[16],d}function v(t){const e=f.c(13),{org:n}=m();let o;e[0]!==n.id?(o={connectionId:S,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const i=g(o);let s;e[2]!==t||e[3]!==n.id?(s=P.aiProviderModels(n.id,t),e[2]=t,e[3]=n.id,e[4]=s):s=e[4];let l;e[5]!==i||e[6]!==t?(l=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[5]=i,e[6]=t,e[7]=l):l=e[7];let r;e[8]!==s||e[9]!==l?(r={queryKey:s,staleTime:6e4,queryFn:l},e[8]=s,e[9]=l,e[10]=r):r=e[10];const{data:u}=y(r);let c;return e[11]!==u?.models?(c=u?.models??[],e[11]=u?.models,e[12]=c):c=e[12],c}export{q as a,K as b,v as c,R as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as I,o as D,a as
|
|
1
|
+
import{e as I,o as D,a as x,w as K,x as L}from"./index-gKZjkMnf.js";import{K as v}from"./constants-nJzh8CYx.js";function q(o,s,n){const t=[];if(o?.trim()){const e=o.trim(),r=n.map(a=>({field:[String(a)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function U(o,s,n){const t=o??n,e=s??"desc";return[{field:[String(t)],direction:e}]}function O(o){if(!o||typeof o!="object")throw new Error("Invalid result");if("isError"in o&&o.isError)throw new Error("content"in o&&Array.isArray(o.content)&&o.content[0]?.type==="text"?o.content[0].text:"Unknown error");if("structuredContent"in o)return o.structuredContent;throw new Error("No structured content found")}function M(o,s,n,t){const e=I.c(14);let r,a,u;if(e[0]!==t||e[1]!==s||e[2]!==n||e[3]!==o){const i=s.toUpperCase();r=`COLLECTION_${i}_GET`,u=K,a=v.collectionItem(t,o,"",i,n??""),e[0]=t,e[1]=s,e[2]=n,e[3]=o,e[4]=r,e[5]=a,e[6]=u}else r=e[4],a=e[5],u=e[6];let c;e[7]!==t||e[8]!==r||e[9]!==n?(c=async()=>{if(!n)return{item:null};const i=await t.callTool({name:r,arguments:{id:n}});return O(i)},e[7]=t,e[8]=r,e[9]=n,e[10]=c):c=e[10];let d;e[11]!==a||e[12]!==c?(d={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=d):d=e[13];const{data:y}=u(d);return y?.item??null}const Q={structuredContent:{items:[]},isError:!1};function Y(o,s,n,t={}){const{searchTerm:e,filters:r,sortKey:a,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:y=100,additionalToolArgs:i}=t,f=s.toUpperCase(),m=`COLLECTION_${f}_LIST`,g=q(e,r,c),T=U(a,u,d),p={...g&&{where:g},...T&&{orderBy:T},limit:y,offset:0,...i},C=JSON.stringify(p),h=v.collectionList(n,o,"",f,C),{data:w}=K({queryKey:h,queryFn:async()=>n?await n.callTool({name:m,arguments:p}):Q,staleTime:3e4,retry:!1,select:E=>O(E??{})?.items??[]});return w}function j(o,s,n,t={}){const{searchTerm:e,filters:r,sortKey:a,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:y=100,additionalToolArgs:i}=t,f=s.toUpperCase(),m=q(e,r,c),g=U(a,u,d),T={...m&&{where:m},...g&&{orderBy:g},limit:y,offset:0,...i},p=JSON.stringify(T);return v.collectionList(o,n,"",f,p)}function G(o,s,n){const t=I.c(34),e=D();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,u=`COLLECTION_${a}_CREATE`,c=`COLLECTION_${a}_UPDATE`,d=`COLLECTION_${a}_DELETE`;let y;t[2]!==e||t[3]!==o||t[4]!==a?(y=()=>{e.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===o&&l[3]==="collection"&&l[4]===a}})},t[2]=e,t[3]=o,t[4]=a,t[5]=y):y=t[5];const i=y;let f;t[6]!==n||t[7]!==u?(f=async S=>{const l=await n.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=n,t[7]=u,t[8]=f):f=t[8];let m;t[9]!==i?(m=()=>{i(),L.success("Item created successfully")},t[9]=i,t[10]=m):m=t[10];let g;t[11]!==f||t[12]!==m?(g={mutationFn:f,onSuccess:m,onError:P},t[11]=f,t[12]=m,t[13]=g):g=t[13];const T=x(g);let p;t[14]!==n||t[15]!==c?(p=async S=>{const{id:l,data:$}=S,b=await n.callTool({name:c,arguments:{id:l,data:$}});return O(b).item},t[14]=n,t[15]=c,t[16]=p):p=t[16];let C;t[17]!==i?(C=()=>{i(),L.success("Item updated successfully")},t[17]=i,t[18]=C):C=t[18];let h;t[19]!==p||t[20]!==C?(h={mutationFn:p,onSuccess:C,onError:B},t[19]=p,t[20]=C,t[21]=h):h=t[21];const w=x(h);let E;t[22]!==n||t[23]!==d?(E=async S=>{const l=await n.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=n,t[23]=d,t[24]=E):E=t[24];let _;t[25]!==i?(_=()=>{i(),L.success("Item deleted successfully")},t[25]=i,t[26]=_):_=t[26];let N;t[27]!==E||t[28]!==_?(N={mutationFn:E,onSuccess:_,onError:k},t[27]=E,t[28]=_,t[29]=N):N=t[29];const F=x(N);let A;return t[30]!==T||t[31]!==F||t[32]!==w?(A={create:T,update:w,delete:F},t[30]=T,t[31]=F,t[32]=w,t[33]=A):A=t[33],A}function k(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to delete item: ${s}`)}function B(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to update item: ${s}`)}function P(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to create item: ${s}`)}export{G as a,j as b,Y as c,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as g,s as C}from"./index-
|
|
1
|
+
import{e as g,s as C}from"./index-gKZjkMnf.js";import{u as N,c as O,a as T}from"./use-collections-DKaygmj-.js";import{S as I,u as m}from"./constants-nJzh8CYx.js";function b(t){const o=g.c(19);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let s,l,c,d;o[2]!==n?({binding:s,includeVirtual:c,slug:d,...l}=n,o[2]=n,o[3]=s,o[4]=l,o[5]=c,o[6]=d):(s=o[3],l=o[4],c=o[5],d=o[6]);let e;o[7]!==s||o[8]!==l.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...l.additionalToolArgs},s!==void 0&&(e.binding=s),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=s,o[8]=l.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let a;o[14]!==l||o[15]!==r?(a={...l,additionalToolArgs:r},o[14]=l,o[15]=r,o[16]=a):a=o[16];const p=a,{org:u}=C();let f;o[17]!==u.id?(f={connectionId:I,orgId:u.id},o[17]=u.id,o[18]=f):f=o[18];const A=m(f);return O(u.id,"CONNECTIONS",A,p)}function _(t){const o=g.c(2),{org:i}=C();let n;o[0]!==i.id?(n={connectionId:I,orgId:i.id},o[0]=i.id,o[1]=n):n=o[1];const s=m(n);return N(i.id,"CONNECTIONS",t,s)}function x(){const t=g.c(2),{org:o}=C();let i;t[0]!==o.id?(i={connectionId:I,orgId:o.id},t[0]=o.id,t[1]=i):i=t[1];const n=m(i);return T(o.id,"CONNECTIONS",n)}export{_ as a,x as b,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,r as n}from"./index-
|
|
1
|
+
import{e as c,r as n}from"./index-gKZjkMnf.js";function p(){const e=c.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async i=>{await navigator.clipboard.writeText(i),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as g}from"./index-gKZjkMnf.js";import{a as p}from"./use-virtual-mcp-SIWEo5E_.js";import{a as f}from"./use-navigate-to-agent-DuF5pNCT.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const l=n,{navigateOnCreate:d}=l,r=d===void 0?!1:d,t=p(),c=f();let a;e[2]!==t.create||e[3]!==r||e[4]!==c?(a=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!0});return r&&c(u.id,{search:{main:"instructions"}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=r,e[4]=c,e[5]=a):a=e[5];const o=a;let s;return e[6]!==t.create.isPending||e[7]!==o?(s={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=s):s=e[8],s}export{A as u};
|
package/dist/client/assets/{use-decopilot-events-BNaQbe7E.js → use-decopilot-events-NXGOEGvZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-gKZjkMnf.js";import{c as k}from"./create-sse-subscription-CxkOgzKf.js";const c={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},b=Object.values(c),R=k({buildUrl:o=>{const e=b.join(",");return`/org/${o}/watch?types=${e}`},eventTypes:[...b]}),d=()=>0;function y(o){const{orgId:e,taskId:u,enabled:n=!0,onStep:i,onFinish:S,onTaskStatus:p}=o,l=s.useRef({taskId:u,onStep:i,onFinish:S,onTaskStatus:p});l.current={taskId:u,onStep:i,onFinish:S,onTaskStatus:p};const a=s.useRef(null),E=s.useRef(n),T=s.useRef(e);(!a.current||E.current!==n||T.current!==e)&&(E.current=n,T.current=e,a.current=f=>{if(!n||!e)return()=>{};const I=h=>{let t;try{t=JSON.parse(h.data)}catch{return}const r=l.current;if(!(r.taskId&&t.subject!==r.taskId)){switch(t.type){case c.STEP:r.onStep?.(t);break;case c.FINISH:r.onFinish?.(t);break;case c.THREAD_STATUS:r.onTaskStatus?.(t);break}f()}};return R.subscribe(e,I)}),s.useSyncExternalStore(a.current,d,d)}export{y as u};
|
package/dist/client/assets/{use-delete-connection-YzycomMd.js → use-delete-connection-DN8HxHVx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as R,j as n,s as
|
|
1
|
+
import{e as R,j as n,s as H,o as J,r as K,x as S}from"./index-gKZjkMnf.js";import{c as F,b as L,d as $,f as k,e as q,g as M,a as P,A as U}from"./alert-dialog-CscciHzk.js";import{u as z,S as B}from"./constants-nJzh8CYx.js";function X(j){const e=R.c(41),{deleteState:r,cancelDelete:i,confirmDelete:a,confirmForceDelete:l}=j,y=r.mode==="deleting";let d;e[0]!==i?(d=w=>{w||i()},e[0]=i,e[1]=d):d=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(F,{children:"Delete Connection?"}),e[2]=N):N=e[2];const T=r.mode==="deleting"&&r.connection.title;let m;e[3]!==T?(m=n.jsxs(L,{children:[N,n.jsxs($,{children:["This action cannot be undone. This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:T}),"."]})]}),e[3]=T,e[4]=m):m=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{children:"Cancel"}),e[5]=E):E=e[5];let o;e[6]!==a?(o=n.jsxs(q,{children:[E,n.jsx(M,{onClick:a,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=a,e[7]=o):o=e[7];let t;e[8]!==m||e[9]!==o?(t=n.jsxs(P,{children:[m,o]}),e[8]=m,e[9]=o,e[10]=t):t=e[10];let s;e[11]!==y||e[12]!==d||e[13]!==t?(s=n.jsx(U,{open:y,onOpenChange:d,children:t}),e[11]=y,e[12]=d,e[13]=t,e[14]=s):s=e[14];const _=r.mode==="force-deleting";let c;e[15]!==i?(c=w=>{w||i()},e[15]=i,e[16]=c):c=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(F,{children:"Connection Used by Agents"}),e[17]=f):f=e[17];const v=r.mode==="force-deleting"&&r.connection.title;let u;e[18]!==v?(u=n.jsx("span",{className:"font-medium text-foreground",children:v}),e[18]=v,e[19]=u):u=e[19];const I=r.mode==="force-deleting"&&r.agentNames;let g;e[20]!==I?(g=n.jsx("span",{className:"font-medium text-foreground",children:I}),e[20]=I,e[21]=g):g=e[21];let h;e[22]!==u||e[23]!==g?(h=n.jsxs("p",{children:["The connection"," ",u," ","is currently used by the following agent(s):"," ",g,"."]}),e[22]=u,e[23]=g,e[24]=h):h=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."}),e[25]=A):A=e[25];let x;e[26]!==h?(x=n.jsxs(L,{children:[f,n.jsx($,{asChild:!0,children:n.jsxs("div",{children:[h,A]})})]}),e[26]=h,e[27]=x):x=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(k,{children:"Cancel"}),e[28]=O):O=e[28];let C;e[29]!==l?(C=n.jsxs(q,{children:[O,n.jsx(M,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=C):C=e[30];let D;e[31]!==x||e[32]!==C?(D=n.jsxs(P,{children:[x,C]}),e[31]=x,e[32]=C,e[33]=D):D=e[33];let p;e[34]!==_||e[35]!==c||e[36]!==D?(p=n.jsx(U,{open:_,onOpenChange:c,children:D}),e[34]=_,e[35]=c,e[36]=D,e[37]=p):p=e[37];let b;return e[38]!==p||e[39]!==s?(b=n.jsxs(n.Fragment,{children:[s,p]}),e[38]=p,e[39]=s,e[40]=b):b=e[40],b}function Q(j){const e=j.content;return Array.isArray(e)&&e[0]?.type==="text"&&typeof e[0].text=="string"?e[0].text:"Unknown error"}function Y({onSuccess:j}={}){const{org:e}=H(),r=J(),i=z({connectionId:B,orgId:e.id}),[a,l]=K.useState({mode:"idle"}),y=()=>{r.invalidateQueries({predicate:o=>{const t=o.queryKey;return t[1]===e.id&&t[3]==="collection"&&t[4]==="CONNECTIONS"}})},d=()=>{y(),S.success("Connection deleted successfully"),l({mode:"idle"}),j?.()};return{deleteState:a,requestDelete:o=>{l({mode:"deleting",connection:o})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(a.mode!=="deleting")return;const o=a.connection;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o.id}});if(t.isError){const s=Q(t),_=s.replace(/^Error:\s*/,"");try{const c=JSON.parse(_);if(c.code==="CONNECTION_IN_USE"&&c.agentNames){l({mode:"force-deleting",connection:o,agentNames:c.agentNames.map(f=>`"${f}"`).join(", ")});return}}catch{}S.error(`Failed to delete connection: ${s}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}},confirmForceDelete:async()=>{if(a.mode!=="force-deleting")return;const o=a.connection.id;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o,force:!0}});if(t.isError){S.error(`Failed to delete connection: ${Q(t)}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}}}}export{X as D,Y as u};
|
package/dist/client/assets/{use-infinite-scroll-CoMWGssU.js → use-infinite-scroll-B32XN73V.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./index-
|
|
1
|
+
import{r}from"./index-gKZjkMnf.js";function a(t,n,s=!1){const e=r.useRef(null),c=r.useRef(t),u=r.useRef(n),f=r.useRef(s);return c.current=t,u.current=n,f.current=s,o=>{e.current&&e.current.disconnect(),e.current=new IntersectionObserver(i=>{i[0]?.isIntersecting&&u.current&&!f.current&&c.current()}),o&&e.current.observe(o)}}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,e as w}from"./index-
|
|
1
|
+
import{r as u,e as w}from"./index-gKZjkMnf.js";import{u as E}from"./use-view-mode-D9sT86SW.js";function J(a){const e=`deco-filters-${a}`,[s,i]=u.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[s,t=>{i(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function N(a){const e=w.c(7),[s,i]=u.useState(a),[r,t]=u.useState(a?"desc":null);let l;e[0]!==r||e[1]!==s?(l=S=>{s!==S?(i(S),t("asc")):r==="asc"?t("desc"):r==="desc"&&(i(void 0),t(null))},e[0]=r,e[1]=s,e[2]=l):l=e[2];const d=l;let o;return e[3]!==d||e[4]!==r||e[5]!==s?(o={sortKey:s,sortDirection:r,handleSort:d},e[3]=d,e[4]=r,e[5]=s,e[6]=o):o=e[6],o}function W(a){const e=w.c(20),{namespace:s,resource:i,defaultSortKey:r,defaultViewMode:t}=a,l=r===void 0?"title":r,d=t===void 0?"table":t,[o,S]=u.useState(""),b=u.useDeferredValue(o),D=`${s}-${i}`,[p,F]=J(D),c=`mesh-${i}-filter-visible-${s}`;let g;e[0]!==c?(g=()=>globalThis.localStorage?.getItem(c)==="true",e[0]=c,e[1]=g):g=e[1];const[n,x]=u.useState(g);let h;e[2]!==c?(h=T=>{x(T),globalThis.localStorage?.setItem(c,String(T))},e[2]=c,e[3]=h):h=e[3];const f=h;let m;e[4]!==n||e[5]!==f?(m=()=>{f(!n)},e[4]=n,e[5]=f,e[6]=m):m=e[6];const V=m,[$,K]=E(`mesh-${i}-${s}`,d),{sortKey:I,sortDirection:v,handleSort:B}=N(l),M=I;let y;return e[7]!==n||e[8]!==p||e[9]!==B||e[10]!==o||e[11]!==b||e[12]!==f||e[13]!==F||e[14]!==K||e[15]!==v||e[16]!==M||e[17]!==V||e[18]!==$?(y={search:o,searchTerm:b,setSearch:S,filters:p,setFilters:F,filterBarVisible:n,setFilterBarVisible:f,toggleFilterBar:V,viewMode:$,setViewMode:K,sortKey:M,sortDirection:v,handleSort:B},e[7]=n,e[8]=p,e[9]=B,e[10]=o,e[11]=b,e[12]=f,e[13]=F,e[14]=K,e[15]=v,e[16]=M,e[17]=V,e[18]=$,e[19]=y):y=e[19],y}export{W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as m,a as C,n as p,
|
|
1
|
+
import{e as m,a as C,n as p,w as q}from"./index-gKZjkMnf.js";import{K as T}from"./constants-nJzh8CYx.js";function M(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function O(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function w(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function F(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function P(a){const e=m.c(8);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{M as a,O as b,w as c,P as d,F as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,s as o,
|
|
1
|
+
import{e as n,s as o,w as u,K as i,b as a}from"./index-gKZjkMnf.js";function l(){const e=n.c(4),{locator:r}=o();let t;e[0]!==r?(t=i.members(r),e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s={queryKey:t,queryFn:m},e[2]=t,e[3]=s):s=e[3],u(s)}function m(){return a.organization.listMembers()}export{l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as x,b as C,Q as b,f as k,s as v}from"./index-gKZjkMnf.js";import{b as y}from"./use-virtual-mcp-SIWEo5E_.js";function N(s,i){const e=x.c(16),{data:l}=C.useSession(),a=l?.user?.id??"anon",$=`mesh:pinned-agents:${s}:${a}`;let r;e[0]!==i?(r=o=>o??i,e[0]=i,e[1]=r):r=e[1];const[n,t]=b($,r);let c;e[2]!==t?(c=o=>{t(f=>f.includes(o)?f:[...f,o])},e[2]=t,e[3]=c):c=e[3];const u=c;let d;e[4]!==t?(d=o=>{t(f=>f.filter(A=>A!==o))},e[4]=t,e[5]=d):d=e[5];const h=d;let g;e[6]!==t?(g=o=>{t(o)},e[6]=t,e[7]=g):g=e[7];const I=g;let p;e[8]!==n?(p=o=>n.includes(o),e[8]=n,e[9]=p):p=e[9];const P=p;let m;return e[10]!==P||e[11]!==u||e[12]!==n||e[13]!==I||e[14]!==h?(m={pinnedIds:n,pin:u,unpin:h,reorder:I,isPinned:P},e[10]=P,e[11]=u,e[12]=n,e[13]=I,e[14]=h,e[15]=m):m=e[15],m}function D(){const s=x.c(6),i=k(),{org:e}=v(),l=y();let a;s[0]!==l?(a=l.filter(U).map(S),s[0]=l,s[1]=a):a=s[1];const $=a,{pin:r}=N(e.id,$);let n;return s[2]!==i||s[3]!==e.slug||s[4]!==r?(n=(t,c)=>{r(t);const u=crypto.randomUUID();i({to:"/$org/$taskId",params:{org:e.slug,taskId:u},search:{...c?.search??{},virtualmcpid:t}})},s[2]=i,s[3]=e.slug,s[4]=r,s[5]=n):n=s[5],n}function S(s){return s.id}function U(s){return!!s.pinned}export{D as a,N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,n as c,o as a,a as u,K as i}from"./index-
|
|
1
|
+
import{e as r,n as c,o as a,a as u,K as i}from"./index-gKZjkMnf.js";function h(t){const e=r.c(5);let n;e[0]!==t?(n=i.orgSsoStatus(t??""),e[0]=t,e[1]=n):n=e[1];const o=!!t;let s;return e[2]!==n||e[3]!==o?(s={queryKey:n,queryFn:f,enabled:o},e[2]=n,e[3]=o,e[4]=s):s=e[4],c(s)}async function f(){const t=await fetch("/api/org-sso/status");if(!t.ok)throw new Error("Failed to check SSO status");return t.json()}function m(t){const e=r.c(5);let n;e[0]!==t?(n=i.orgSsoConfig(t??""),e[0]=t,e[1]=n):n=e[1];const o=!!t;let s;return e[2]!==n||e[3]!==o?(s={queryKey:n,queryFn:l,enabled:o},e[2]=n,e[3]=o,e[4]=s):s=e[4],c(s)}async function l(){const t=await fetch("/api/org-sso/config");if(!t.ok)throw new Error("Failed to fetch SSO config");return t.json()}function w(t){const e=r.c(3),n=a();let o;return e[0]!==t||e[1]!==n?(o={mutationFn:S,onSuccess:()=>{n.invalidateQueries({queryKey:i.orgSsoConfig(t)}),n.invalidateQueries({queryKey:i.orgSsoStatus(t)})}},e[0]=t,e[1]=n,e[2]=o):o=e[2],u(o)}async function S(t){const e=await fetch("/api/org-sso/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json();throw new Error(n.error||"Failed to save SSO config")}return e.json()}function q(t){const e=r.c(3),n=a();let o;return e[0]!==t||e[1]!==n?(o={mutationFn:y,onSuccess:()=>{n.invalidateQueries({queryKey:i.orgSsoConfig(t)}),n.invalidateQueries({queryKey:i.orgSsoStatus(t)})}},e[0]=t,e[1]=n,e[2]=o):o=e[2],u(o)}async function y(){const t=await fetch("/api/org-sso/config",{method:"DELETE"});if(!t.ok)throw new Error("Failed to delete SSO config");return t.json()}function C(t){const e=r.c(3),n=a();let o;return e[0]!==t||e[1]!==n?(o={mutationFn:p,onSuccess:()=>{n.invalidateQueries({queryKey:i.orgSsoConfig(t)}),n.invalidateQueries({queryKey:i.orgSsoStatus(t)})}},e[0]=t,e[1]=n,e[2]=o):o=e[2],u(o)}async function p(t){const e=await fetch("/api/org-sso/config/enforce",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:t})});if(!e.ok)throw new Error("Failed to toggle SSO enforcement");return e.json()}export{m as a,w as b,q as c,C as d,h as u};
|
package/dist/client/assets/{use-organization-roles-1TjtICKp.js → use-organization-roles-7NVaQG9M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as h,n as b,b as p,K as P}from"./index-
|
|
1
|
+
import{s as h,n as b,b as p,K as P}from"./index-gKZjkMnf.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function y(t){return t.replace(/-/g," ")}function B(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let u=!1;const c=[];let f=!1;const l=new Set;let r=!1,e=0,s=!1;for(const[i,o]of Object.entries(t)){if(i==="self"){o.includes("*")?u=!0:n.push(...o);continue}if(i==="models"){o.includes("*:*")?s=!0:e=o.length;continue}if(i==="*"){if(f=!0,o.includes("*"))r=!0;else for(const a of o)l.add(a);continue}if(c.push(i),o.includes("*"))r=!0;else for(const a of o)l.add(a)}return{staticPermissions:n,allowsAllStaticPermissions:u,connectionIds:c,allowsAllConnections:f,toolNames:Array.from(l),allowsAllTools:r,modelCount:e,allowsAllModels:s}}function v(){const{locator:t}=h(),{data:n,isLoading:u,error:c,refetch:f}=b({queryKey:P.organizationRoles(t),queryFn:async()=>{try{const e=await p.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),l=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(n&&Array.isArray(n))for(const e of n){const s=e.role;if(!s||w.some(g=>g.value===s))continue;const{staticPermissions:i,allowsAllStaticPermissions:o,connectionIds:a,allowsAllConnections:m,toolNames:C,allowsAllTools:d,modelCount:R,allowsAllModels:A}=B(e.permission);l.push({id:e.id,role:s,label:y(s),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:o?-1:i.length,allowsAllStaticPermissions:o,connectionCount:m?-1:a.length,allowsAllConnections:m,toolCount:d?-1:C.length,allowsAllTools:d,modelCount:A?-1:R,allowsAllModels:A})}const r=l.filter(e=>!e.isBuiltin);return{roles:l,customRoles:r,builtinRoles:l.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:f}}export{v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,s as m,
|
|
1
|
+
import{e as c,s as m,K as f,n as E,o as A,a as I,w as h}from"./index-gKZjkMnf.js";import{S as g,u as _,d as z}from"./constants-nJzh8CYx.js";const d={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null},p={enabled:!1,chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};function y(t){const e=c.c(11),{org:n}=m();let s;e[0]!==n.id?(s={connectionId:g,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const a=_(s);let i;e[2]!==n.id?(i=f.organizationSettings(n.id),e[2]=n.id,e[3]=i):i=e[3];let r;e[4]!==a||e[5]!==n.id?(r=async()=>{const u=await a.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return u?.isError?{...d,organizationId:n.id}:u.structuredContent??{...d,organizationId:n.id}},e[4]=a,e[5]=n.id,e[6]=r):r=e[6];const l=t;let o;return e[7]!==i||e[8]!==r||e[9]!==l?(o={queryKey:i,queryFn:r,staleTime:6e4,select:l},e[7]=i,e[8]=r,e[9]=l,e[10]=o):o=e[10],E(o)}function M(t){const e=c.c(10);let n;e[0]!==t?(n={connectionId:g,orgId:t},e[0]=t,e[1]=n):n=e[1];const s=_(n);let a;e[2]!==t?(a=f.organizationSettings(t),e[2]=t,e[3]=a):a=e[3];let i;e[4]!==s||e[5]!==t?(i=async()=>{const o=await s.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return o?.isError?{...d,organizationId:t}:o.structuredContent??{...d,organizationId:t}},e[4]=s,e[5]=t,e[6]=i):i=e[6];let r;e[7]!==a||e[8]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[7]=a,e[8]=i,e[9]=r):r=e[9];const{data:l}=h(r);return l}function S(){const t=c.c(11),{org:e}=m();let n;t[0]!==e.id?(n={connectionId:g,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=_(n),a=A();let i;t[2]!==s||t[3]!==e.id?(i=async o=>{const u=await s.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e.id,...o}});if(u?.isError)throw new Error(u.content?.[0]?.text??"Failed to update organization settings");const T=u.structuredContent;if(!T)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return T},t[2]=s,t[3]=e.id,t[4]=i):i=t[4];let r;t[5]!==e.id||t[6]!==a?(r=o=>{a.setQueryData(f.organizationSettings(e.id),u=>({...u??d,...o}))},t[5]=e.id,t[6]=a,t[7]=r):r=t[7];let l;return t[8]!==i||t[9]!==r?(l={mutationFn:i,onSuccess:r},t[8]=i,t[9]=r,t[10]=l):l=t[10],I(l)}function C(t){return t?{enabled:t.enabled??!1,chat:{fast:t.chat?.fast??null,smart:t.chat?.smart??null,thinking:t.chat?.thinking??null},image:t.image??null,webResearch:t.webResearch??null}:p}function P(){const{data:t}=y(N);return t??p}function N(t){return C(t.simple_mode)}function D(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({simple_mode:i},r),s=(i,r)=>e.mutateAsync({simple_mode:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function O(){const{data:t}=y(R);return t??null}function R(t){return t.registry_config}function $(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({registry_config:i},r),s=(i,r)=>e.mutateAsync({registry_config:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function U(){const{data:t}=y(w);return t??null}function w(t){return t.default_home_agents}function q(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({default_home_agents:i},r),s=(i,r)=>e.mutateAsync({default_home_agents:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function F(){const t=c.c(5),{org:e}=m(),n=O();let s;t[0]!==e.id?(s=z.REGISTRY(e.id),t[0]=e.id,t[1]=s):s=t[1];const a=s;let i;return t[2]!==a||t[3]!==n?(i=r=>{if(!n)return r===a;const l=n.registries[r];return l?l.enabled:r===a},t[2]=a,t[3]=n,t[4]=i):i=t[4],i}export{F as a,M as b,q as c,S as d,P as e,D as f,O as g,$ as h,U as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,s as C}from"./index-
|
|
1
|
+
import{e as a,s as C}from"./index-gKZjkMnf.js";import{u as R}from"./use-connection-DLwIHVYP.js";import{d as u}from"./constants-nJzh8CYx.js";import{g as p}from"./use-organization-settings-DpXizr85.js";function E(){const e=a.c(17),{org:i}=C(),o=p();let n;e[0]!==i.id?(n=u.REGISTRY(i.id),e[0]=i.id,e[1]=n):n=e[1];const c=n;let l;e[2]!==i.id?(l=u.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=l):l=e[3];const d=l;let r;e[4]!==d||e[5]!==c?(r=[c,d],e[4]=d,e[5]=c,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const m of s)t.add(m)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const g=R();let f;if(e[12]!==g||e[13]!==t){let s;e[15]!==t?(s=m=>t.has(m.id),e[15]=t,e[16]=s):s=e[16],f=g.filter(s),e[12]=g,e[13]=t,e[14]=f}else f=e[14];return f}export{E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,
|
|
1
|
+
import{e as u,P as r}from"./index-gKZjkMnf.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-NXGOEGvZ.js";const l=new Set(["completed","failed","requires_action"]);function q(s){const e=u.c(5),[n]=r();let t;e[0]!==n?(t=o=>{n.enableSounds&&l.has(o.data.status)&&i(c.dataUri).catch(p)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgId:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function p(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as y,s as A,o as C,K as S}from"./index-
|
|
1
|
+
import{e as y,s as A,o as C,K as S}from"./index-gKZjkMnf.js";import{a as x}from"./use-collections-DKaygmj-.js";import{S as E,u as I}from"./constants-nJzh8CYx.js";function M(){const t=y.c(12),{org:o,locator:c}=A();let n;t[0]!==o.id?(n={connectionId:E,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const m=I(n),l=C(),i=x(o.id,"THREADS",m),e=i.create;let r;t[2]!==c||t[3]!==e||t[4]!==l?(r=async(f,d)=>{const p=await e.mutateAsync(f,d);return l.invalidateQueries({queryKey:S.tasksPrefix(c)}),p},t[2]=c,t[3]=e,t[4]=l,t[5]=r):r=t[5];const u=r;let s;t[6]!==e||t[7]!==u?(s={...e,mutateAsync:u},t[6]=e,t[7]=u,t[8]=s):s=t[8];let a;return t[9]!==i||t[10]!==s?(a={...i,create:s},t[9]=i,t[10]=s,t[11]=a):a=t[11],a}export{M as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as p,r as f}from"./index-gKZjkMnf.js";import{u as w}from"./tooltip-DlUl6zVU.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,s as r}from"./index-
|
|
1
|
+
import{e as c,s as r}from"./index-gKZjkMnf.js";import{c as a,a as C,u as I}from"./use-collections-DKaygmj-.js";import{S as l,u}from"./constants-nJzh8CYx.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./infiniteQueryObserver-B9PWohpE.js";import{c2 as i}from"./index-gKZjkMnf.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as s}from"./infiniteQueryObserver-B9PWohpE.js";import{c2 as u,c3 as n}from"./index-gKZjkMnf.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as w,s as b,n as C,K as k,c as y,j as t}from"./index-
|
|
1
|
+
import{e as w,s as b,n as C,K as k,c as y,j as t}from"./index-gKZjkMnf.js";import{A as E}from"./avatar-BQ09Qk0Z.js";import{S as A,u as _}from"./constants-nJzh8CYx.js";function K(m){const e=w.c(11),{org:h}=b();let x;e[0]!==h.id?(x={connectionId:A,orgId:h.id},e[0]=h.id,e[1]=x):x=e[1];const u=_(x);let d;e[2]!==m?(d=k.user(m),e[2]=m,e[3]=d):d=e[3];let s;e[4]!==u||e[5]!==m?(s=async()=>{const c=await u.callTool({name:"USER_GET",arguments:{id:m}});return(c.structuredContent??c).user},e[4]=u,e[5]=m,e[6]=s):s=e[6];const l=!!m;let o;return e[7]!==d||e[8]!==s||e[9]!==l?(o={queryKey:d,queryFn:s,staleTime:3e5,retry:1,enabled:l},e[7]=d,e[8]=s,e[9]=l,e[10]=o):o=e[10],C(o)}function T(m){const e=w.c(36),{id:h,size:x,showEmail:u,avatarOnly:d,className:s}=m,l=x===void 0?"xs":x,o=u===void 0?!1:u,c=d===void 0?!1:d,{data:r,isLoading:S,isError:U}=K(h);if(S){let a;e[0]!==s?(a=y("flex items-center gap-2",s),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==l?(i=t.jsx(E.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=i):i=e[3];let n;e[4]!==c||e[5]!==o?(n=!c&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),o&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=c,e[5]=o,e[6]=n):n=e[6];let f;return e[7]!==a||e[8]!==i||e[9]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[7]=a,e[8]=i,e[9]=n,e[10]=f):f=e[10],f}if(U||!r){let a;e[11]!==s?(a=y("flex items-center gap-2",s),e[11]=s,e[12]=a):a=e[12];let i;e[13]!==l?(i=t.jsx(E,{shape:"circle",size:l,fallback:"?",muted:!0}),e[13]=l,e[14]=i):i=e[14];let n;e[15]!==c?(n=!c&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=c,e[16]=n):n=e[16];let f;return e[17]!==a||e[18]!==i||e[19]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[17]=a,e[18]=i,e[19]=n,e[20]=f):f=e[20],f}let p;e[21]!==s?(p=y("flex items-center gap-2",s),e[21]=s,e[22]=p):p=e[22];const N=r.image??void 0;let v;e[23]!==l||e[24]!==N||e[25]!==r.name?(v=t.jsx(E,{shape:"circle",size:l,url:N,fallback:r.name}),e[23]=l,e[24]=N,e[25]=r.name,e[26]=v):v=e[26];let j;e[27]!==c||e[28]!==o||e[29]!==r.email||e[30]!==r.name?(j=!c&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:r.name}),o&&t.jsx("div",{className:"text-xs text-muted-foreground",children:r.email})]}),e[27]=c,e[28]=o,e[29]=r.email,e[30]=r.name,e[31]=j):j=e[31];let g;return e[32]!==p||e[33]!==v||e[34]!==j?(g=t.jsxs("div",{className:p,children:[v,j]}),e[32]=p,e[33]=v,e[34]=j,e[35]=g):g=e[35],g}export{T as U};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as P,r as v,c as m,j as o}from"./index-gKZjkMnf.js";import{T as L,a as M,b as q}from"./tooltip-DlUl6zVU.js";const A={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function F(W){const e=P.c(29),{value:s,onValueChange:j,options:i,size:_,fullWidth:C,className:y}=W,$=_===void 0?"sm":_,u=C===void 0?!1:C,E=v.useRef(null),S=v.useRef(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},e[0]=x):x=e[0];const[f,k]=v.useState(x);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=t=>{if(!t.current)return;const{offsetLeft:R,offsetWidth:T}=t.current;k({left:R,width:T,opacity:1})},e[1]=g):g=e[1];const I=g;let b;e[2]!==i[0].value||e[3]!==s?(b=()=>{const t=s===i[0].value?E:S;I(t)},e[2]=i[0].value,e[3]=s,e[4]=b):b=e[4];let h;e[5]!==i||e[6]!==s?(h=[s,i],e[5]=i,e[6]=s,e[7]=h):h=e[7],v.useEffect(b,h);const d=A[$];let n;e[8]!==y?(n=m("relative flex gap-0 bg-muted rounded-lg",y),e[8]=y,e[9]=n):n=e[9];let l;e[10]!==d||e[11]!==u||e[12]!==j||e[13]!==i||e[14]!==s?(l=i.map((t,R)=>{const T=R===0?E:S,V=o.jsxs("button",{ref:T,type:"button",onClick:()=>j(t.value),className:m("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",u?"flex-1 h-12 px-4":d.button,!u&&t.label?"px-3":""),children:[o.jsx("span",{className:m("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",d.icon,s===t.value?"text-foreground":"text-muted-foreground"),children:t.icon}),t.label&&o.jsx("span",{className:m("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===t.value?"text-foreground":"text-muted-foreground"),children:t.label})]},t.value);return t.tooltip?o.jsxs(L,{children:[o.jsx(M,{asChild:!0,children:V}),o.jsx(q,{side:"bottom",children:t.tooltip})]},t.value):V}),e[10]=d,e[11]=u,e[12]=j,e[13]=i,e[14]=s,e[15]=l):l=e[15];const z=u?"h-12":d.button;let a;e[16]!==z?(a=m("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",z),e[16]=z,e[17]=a):a=e[17];const w=`${f.left}px`,N=`${f.width}px`;let r;e[18]!==f.opacity||e[19]!==w||e[20]!==N?(r={left:w,width:N,opacity:f.opacity},e[18]=f.opacity,e[19]=w,e[20]=N,e[21]=r):r=e[21];let c;e[22]!==a||e[23]!==r?(c=o.jsx("div",{className:a,style:r}),e[22]=a,e[23]=r,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==n||e[27]!==l?(p=o.jsxs("div",{className:n,children:[l,c]}),e[25]=c,e[26]=n,e[27]=l,e[28]=p):p=e[28],p}export{F as V};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as oe,j as t,B as Ce,f as Be,b as ct,s as ze,r as dt,x as Le,o as ut,a as mt,K as Fe,Y as Ke,Z as pt}from"./index-gKZjkMnf.js";import{u as Ve,S as qe}from"./constants-nJzh8CYx.js";import{B as ft,g as Me}from"./constants-CrD_AMxD.js";import{C as Qe}from"./collection-display-button-BZwsY1Wv.js";import{C as ht}from"./collection-search-CzSQR8Hb.js";import{C as gt}from"./card-DUOq7Rl6.js";import{I as Ge}from"./integration-icon-BYjt2zM8.js";import{D as He,a as Ye,b as Je,c as O}from"./dropdown-menu-gP2-wJTw.js";import{c as Ze}from"./XCircle-D0NNu2cU.js";import{i as Xe}from"./DotsVertical-DGFUAKYN.js";import{y as et,H as Ue}from"./agent-icon-DxobcFDr.js";import{s as tt}from"./RefreshCcw01-CmGHOB_j.js";import{s as st}from"./Trash01-Crqeojj8.js";import{C as xt}from"./collection-table-wrapper-B84Op-Zk.js";import{E as We}from"./empty-state-C2PUUqhT.js";import{U as jt}from"./user-DxM-AJLw.js";import{E as it}from"./empty-state-CPpC79-7.js";import{u as Ct}from"./use-list-state-Cwr5OloB.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{f as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,A as Dt}from"./alert-dialog-CscciHzk.js";import{a as It,c as At}from"./use-collections-DKaygmj-.js";import{a as Tt}from"./use-connection-DLwIHVYP.js";import{s as Et}from"./Plus-6a_0gFD5.js";import{a as Ot}from"./layout-BgwHTi9m.js";import{P as je}from"./index-C3hSkh4S.js";import"./collections-CzE8C7FB.js";import"./XClose-8tp9nQPE.js";import"./ChevronDown-D098IDk9.js";import"./tooltip-DlUl6zVU.js";import"./view-mode-toggle-CussfoqD.js";import"./badge-Clg4Tzdw.js";import"./SearchMd-B4RJoOIR.js";import"./Container-BvdKvtbe.js";import"./ChevronRight-DIr3-XeU.js";import"./AlertCircle-DnJbX_0w.js";import"./Tool01-Cxeqfwwz.js";import"./ArrowNarrowLeft-M9-X6Sxy.js";import"./ArrowUpRight-BQK-oA7E.js";import"./ZapSquare-DgxRVJjy.js";import"./Users03-BEcIfaLP.js";import"./CheckCircle-BTDGGZJo.js";import"./ChevronUp-qt4sL4uC.js";import"./Star01-BsL_E8DX.js";import"./Palette-SeD4BOqL.js";import"./LinkExternal01-CS_vTEL0.js";import"./Lock01-DepQhBci.js";import"./Sun-CoYtwe4c.js";import"./Play-B2WhNMxb.js";import"./Settings02-86F4b3dQ.js";import"./Shield01-CzaXyqoU.js";import"./User01-lfQ-qZIG.js";import"./X-DSm8Y-S-.js";import"./Zap-GnwBp_Qp.js";import"./table-D1_6e_tY.js";import"./avatar-BQ09Qk0Z.js";import"./use-view-mode-D9sT86SW.js";function $t(i,e){const s=i.properties||{};for(const n in s){const c=s[n];if(c&&c.type==="string"&&(c.format==="url"||c.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=$t(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=c,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let d;e[3]!==n?(d=n&&Object.keys(n).length>0,e[3]=n,e[4]=d):d=e[4];const o=d;let m;e[5]!==r||e[6]!==s.title?(m=t.jsx(Ge,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==s.title?(u=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=u):u=e[9];const f=p||"No description";let a;e[10]!==f?(a=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:f}),e[10]=f,e[11]=a):a=e[11];let b;e[12]!==u||e[13]!==a?(b=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[u,a]}),e[12]=u,e[13]=a,e[14]=b):b=e[14];let y;e[15]!==m||e[16]!==b?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,b]}),e[15]=m,e[16]=b,e[17]=y):y=e[17];let C;e[18]!==n||e[19]!==o||e[20]!==s?(C=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Kt,onMouseDown:Ft,children:t.jsxs(He,{children:[t.jsx(Ye,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Lt,children:t.jsx(Xe,{size:20})})}),t.jsxs(Je,{align:"end",onClick:zt,children:[n.open&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(tt,{size:16}),"Open"]}),n.edit&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(et,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Ze,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(O,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(st,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=C):C=e[21];let v;return e[22]!==y||e[23]!==C?(v=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,C]}),e[22]=y,e[23]=C,e[24]=v):v=e[24],v}function zt(i){return i.stopPropagation()}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}const Mt=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Ut(i){return Object.keys(i).find(e=>Mt.includes(e.toLowerCase()))}function ot(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Wt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:c,sortKey:r,sortDirection:p,onSort:d,actions:o,onItemClick:m,headerActions:u,emptyState:f,readOnly:a,columns:b,hideToolbar:y,sortableFields:C}=i,v=p===void 0?"asc":p,g=d===void 0?qt:d;let $;e[0]!==o?($=o===void 0?{}:o,e[0]=o,e[1]=$):$=e[1];const h=$,T=m===void 0?Vt:m,E=u===void 0?null:u,N=f===void 0?null:f,k=a===void 0?!1:a,x=b===void 0?void 0:b,z=y===void 0?!1:y,P=C===void 0?void 0:C;let D;e[2]!==x||e[3]!==l||e[4]!==P?(D=x?x.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=x,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==v||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Qe,{sortKey:r,sortDirection:v,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=v,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==x||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==v||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(kt,{item:A,schema:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Ht(x,l,P,h),data:s,sortKey:r,sortDirection:v,onSort:g,onRowClick:T,emptyState:N||t.jsx(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}),e[13]=h,e[14]=x,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=c,e[22]=v,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Rt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function Bt(i){return i.sortable!==!1}function Vt(){}function qt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(He,{children:[t.jsx(Ye,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(Je,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(tt,{size:16}),"Open"]}),i.edit&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(et,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Ze,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(O,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(st,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function nt(i){const e=i.type;return Array.isArray(e)?e.every(s=>nt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Gt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const m=s[o];return m&&nt(m)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));return c.map(o=>{const m=s[o],u=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:f=>{const a=f[o];return t.jsx(Ge,{icon:a,name:f.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(a)})},sortable:u,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx(jt,{id:String(a),size:"xs"}):"—"},sortable:u,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx("span",{className:"block truncate max-w-full",children:new Date(a).toLocaleDateString()}):"—"},sortable:u,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(a)})},sortable:u,cellClassName:"max-w-[200px]"}})}function Ht(i,e,s,l){const n=i||Gt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Yt(i){const e=oe.c(118),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=n.name,p=n.schema??ft,d=n.hasCreateTool,o=n.hasUpdateTool,m=n.hasDeleteTool,u=Be(),{data:f}=ct.useSession(),a=f?.user?.id||"unknown",b=Tt(s);let y;e[0]!==b||e[1]!==s?(y=b?bt(b):s,e[0]=b,e[1]=s,e[2]=y):y=e[2];const C=y,{org:v}=ze();let g;e[3]!==s||e[4]!==v.id?(g={connectionId:s,orgId:v.id},e[3]=s,e[4]=v.id,e[5]=g):g=e[5];const $=Ve(g),h=It(s,r,$),T=`${s}-${r}`;let E;e[6]!==l||e[7]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[6]=l,e[7]=T,e[8]=E):E=e[8];const{search:N,searchTerm:k,setSearch:x,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[9]!==k||e[10]!==w||e[11]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[9]=k,e[10]=w,e[11]=D,e[12]=_):_=e[12];const I=At(s,r,$,_),A=!d&&!o&&!m;let ne;e[13]!==C||e[14]!==r||e[15]!==u||e[16]!==c||e[17]!==l?(ne=j=>{if(c){c(j);return}u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:C,collectionName:r,itemId:j.id}})},e[13]=C,e[14]=r,e[15]=u,e[16]=c,e[17]=l,e[18]=ne):ne=e[18];const L=ne;let re;e[19]!==h.create||e[20]!==a?(re=async j=>{const xe=new Date().toISOString();await h.create.mutateAsync({...j,id:Me("conn"),title:`${j.title} (Copy)`,created_at:xe,updated_at:xe,created_by:a,updated_by:a})},e[19]=h.create,e[20]=a,e[21]=re):re=e[21];const be=re,[F,ve]=dt.useState(null);let le;e[22]===Symbol.for("react.memo_cache_sentinel")?(le=j=>{ve(j)},e[22]=le):le=e[22];const rt=le;let K;e[23]!==L||e[24]!==o?(K=o&&{edit:L},e[23]=L,e[24]=o,e[25]=K):K=e[25];let M;e[26]!==be||e[27]!==d?(M=d&&{duplicate:be},e[26]=be,e[27]=d,e[28]=M):M=e[28];let U;e[29]!==m?(U=m&&{delete:rt},e[29]=m,e[30]=U):U=e[30];let ae;e[31]!==M||e[32]!==U||e[33]!==K?(ae={...K,...M,...U},e[31]=M,e[32]=U,e[33]=K,e[34]=ae):ae=e[34];const ye=ae;let ce;e[35]!==h.delete||e[36]!==F?(ce=async()=>{F&&(await h.delete.mutateAsync(F.id),ve(null))},e[35]=h.delete,e[36]=F,e[37]=ce):ce=e[37];const Ne=ce;let de;e[38]!==h.create||e[39]!==C||e[40]!==r||e[41]!==d||e[42]!==u||e[43]!==l||e[44]!==a?(de=async()=>{if(!d){Le.error("Create operation is not available for this collection");return}const j=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:j,updated_at:j,created_by:a,updated_by:a};try{const ke=await h.create.mutateAsync(xe);u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:C,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[38]=h.create,e[39]=C,e[40]=r,e[41]=d,e[42]=u,e[43]=l,e[44]=a,e[45]=de):de=e[45];const we=de;let ue;e[46]!==p?(ue=ot(p),e[46]=p,e[47]=ue):ue=e[47];const Se=ue,lt=(I?.length??0)>0,at=d&&!lt&&!N;let me;e[48]!==h.create||e[49]!==we||e[50]!==d?(me=d?t.jsxs(Ce,{onClick:we,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[48]=h.create,e[49]=we,e[50]=d,e[51]=me):me=e[51];const pe=me,Pe=D;let W;e[52]!==S||e[53]!==w||e[54]!==Se||e[55]!==Pe?(W=t.jsx(Ot,{children:t.jsx(Qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[52]=S,e[53]=w,e[54]=Se,e[55]=Pe,e[56]=W):W=e[56];const _e=`Search ${r}...`;let R;e[57]!==x?(R=j=>{j.key==="Escape"&&(x(""),j.target.blur())},e[57]=x,e[58]=R):R=e[58];let B;e[59]!==N||e[60]!==x||e[61]!==_e||e[62]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:x,placeholder:_e,onKeyDown:R})}),e[59]=N,e[60]=x,e[61]=_e,e[62]=R,e[63]=B):B=e[63];let V;e[64]!==pe||e[65]!==d?(V=d&&t.jsx("div",{className:"pr-3",children:pe}),e[64]=pe,e[65]=d,e[66]=V):V=e[66];let q;e[67]!==B||e[68]!==V?(q=t.jsxs("div",{className:"flex items-center gap-2",children:[B,V]}),e[67]=B,e[68]=V,e[69]=q):q=e[69];let Q;e[70]!==I?(Q=I??[],e[70]=I,e[71]=Q):Q=e[71];const De=D;let G;e[72]!==L?(G=j=>L(j),e[72]=L,e[73]=G):G=e[73];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let H;e[74]!==Ie||e[75]!==Ae||e[76]!==Te?(H=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[74]=Ie,e[75]=Ae,e[76]=Te,e[77]=H):H=e[77];let Y;e[78]!==S||e[79]!==A||e[80]!==ye||e[81]!==p||e[82]!==N||e[83]!==x||e[84]!==P||e[85]!==w||e[86]!==Q||e[87]!==De||e[88]!==G||e[89]!==H||e[90]!==z?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:Q,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:x,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:G,readOnly:A,emptyState:H})}),e[78]=S,e[79]=A,e[80]=ye,e[81]=p,e[82]=N,e[83]=x,e[84]=P,e[85]=w,e[86]=Q,e[87]=De,e[88]=G,e[89]=H,e[90]=z,e[91]=Y):Y=e[91];let J;e[92]!==q||e[93]!==Y?(J=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,Y]}),e[92]=q,e[93]=Y,e[94]=J):J=e[94];const Ee=!!F;let fe;e[95]===Symbol.for("react.memo_cache_sentinel")?(fe=j=>{j||ve(null)},e[95]=fe):fe=e[95];let he;e[96]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[96]=he):he=e[96];const Oe=F?.title;let Z;e[97]!==Oe?(Z=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',Oe,'"? This action cannot be undone.']})]}),e[97]=Oe,e[98]=Z):Z=e[98];let X;e[99]!==h.delete.isPending?(X=t.jsx(vt,{disabled:h.delete.isPending,children:"Cancel"}),e[99]=h.delete.isPending,e[100]=X):X=e[100];const $e=h.delete.isPending?"Deleting...":"Delete";let ee;e[101]!==h.delete.isPending||e[102]!==Ne||e[103]!==$e?(ee=t.jsx(yt,{onClick:Ne,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[101]=h.delete.isPending,e[102]=Ne,e[103]=$e,e[104]=ee):ee=e[104];let te;e[105]!==X||e[106]!==ee?(te=t.jsxs(Pt,{children:[X,ee]}),e[105]=X,e[106]=ee,e[107]=te):te=e[107];let se;e[108]!==Z||e[109]!==te?(se=t.jsxs(_t,{children:[Z,te]}),e[108]=Z,e[109]=te,e[110]=se):se=e[110];let ie;e[111]!==Ee||e[112]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[111]=Ee,e[112]=se,e[113]=ie):ie=e[113];let ge;return e[114]!==W||e[115]!==J||e[116]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,J,ie]}),e[114]=W,e[115]=J,e[116]=ie,e[117]=ge):ge=e[117],ge}function Jt(){const i=oe.c(12),{org:e,project:s}=ze(),l=ut();let n;i[0]!==e.id?(n={connectionId:qe,orgId:e.id},i[0]=e.id,i[1]=n):n=i[1];const c=Ve(n);let r;i[2]!==c||i[3]!==s?(r=async m=>{const u=s.enabledPlugins??[];if(u.includes(m))return;const f=[...u,m],a=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s.id,data:{metadata:{enabled_plugins:f}}}});return a.structuredContent??a},i[2]=c,i[3]=s,i[4]=r):r=i[4];let p;i[5]!==e.id||i[6]!==s||i[7]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[5]=e.id,i[6]=s,i[7]=l,i[8]=p):p=i[8];let d;return i[9]!==r||i[10]!==p?(d={mutationFn:r,onSuccess:p,onError:Zt},i[9]=r,i[10]=p,i[11]=d):d=i[11],mt(d)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function Xt(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:c}=i,r=Jt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,m=r.isPending?"Enabling…":"Enable plugin";let u;e[3]!==r.isPending||e[4]!==d||e[5]!==m?(u=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:m}),e[3]=r.isPending,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;return e[7]!==n||e[8]!==o||e[9]!==u||e[10]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:u}),e[7]=n,e[8]=o,e[9]=u,e[10]=l,e[11]=f):f=e[11],f}const es={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function oi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(Xt,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(pt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Yt,{connectionId:qe,org:e.slug,activeCollection:es,onItemClick:c=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:c.id}})})})})}export{oi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-gKZjkMnf.js";import{a as f}from"./index-BYM0cbyk.js";import"./index-Dlk19fTc.js";import"./constants-nJzh8CYx.js";import"./collections-CzE8C7FB.js";import"./index-BdUJIICa.js";import"./use-virtual-mcp-SIWEo5E_.js";import"./use-collections-DKaygmj-.js";import"./monaco-editor-D2GSkzL1.js";import"./index-Dkaetwrr.js";import"./accordion-CJq3HBrS.js";import"./agent-icon-DxobcFDr.js";import"./AlertCircle-DnJbX_0w.js";import"./Tool01-Cxeqfwwz.js";import"./XClose-8tp9nQPE.js";import"./RefreshCcw01-CmGHOB_j.js";import"./ArrowNarrowLeft-M9-X6Sxy.js";import"./XCircle-D0NNu2cU.js";import"./ArrowUpRight-BQK-oA7E.js";import"./ZapSquare-DgxRVJjy.js";import"./Users03-BEcIfaLP.js";import"./CheckCircle-BTDGGZJo.js";import"./ChevronDown-D098IDk9.js";import"./ChevronRight-DIr3-XeU.js";import"./ChevronUp-qt4sL4uC.js";import"./DotsVertical-DGFUAKYN.js";import"./Container-BvdKvtbe.js";import"./Star01-BsL_E8DX.js";import"./Palette-SeD4BOqL.js";import"./SearchMd-B4RJoOIR.js";import"./index-C3hSkh4S.js";import"./tooltip-DlUl6zVU.js";import"./X-DSm8Y-S-.js";import"./LinkExternal01-CS_vTEL0.js";import"./Lock01-DepQhBci.js";import"./Sun-CoYtwe4c.js";import"./Play-B2WhNMxb.js";import"./Plus-6a_0gFD5.js";import"./Settings02-86F4b3dQ.js";import"./Shield01-CzaXyqoU.js";import"./Trash01-Crqeojj8.js";import"./User01-lfQ-qZIG.js";import"./Zap-GnwBp_Qp.js";import"./badge-Clg4Tzdw.js";import"./select-B6R2tTSM.js";import"./view-mode-toggle-CussfoqD.js";import"./layout-BgwHTi9m.js";import"./use-connection-DLwIHVYP.js";import"./use-mcp-tools-CyPVbfii.js";import"./dialog-CVDAkUpR.js";import"./index-B3vDeqTk.js";import"./dropdown-menu-gP2-wJTw.js";import"./integration-icon-BYjt2zM8.js";import"./scroll-area-CH9Vosbx.js";import"./index-CqrrK0SQ.js";import"./empty-state-C2PUUqhT.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-Cet4kRAV.js";function ht(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{ht as default};
|
package/dist/client/index.html
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
26
26
|
<meta name="twitter:image" content="/og-image.png" />
|
|
27
27
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
28
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
+
<script type="module" crossorigin src="/assets/index-gKZjkMnf.js"></script>
|
|
29
29
|
<link rel="stylesheet" crossorigin href="/assets/index-BZi9riJ2.css">
|
|
30
30
|
</head>
|
|
31
31
|
<body>
|