decocms 4.3.0 → 4.4.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-DC-zDzV-.js → AlertCircle-CM6D9elR.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-OJZisFPQ.js → ArrowUpRight-Kqa5fEjt.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cgnheu-R.js → CheckCircle-8DKF8Yx5.js} +1 -1
- package/dist/client/assets/{ChevronDown-DyHvxYlc.js → ChevronDown-DGuR7uUZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cpfh3gza.js → ChevronRight-BswIt99A.js} +1 -1
- package/dist/client/assets/{ChevronUp-DBpw6M-L.js → ChevronUp-DSdWQUoR.js} +1 -1
- package/dist/client/assets/{DotsVertical-5jSu3d1f.js → DotsVertical-DSosYpI1.js} +1 -1
- package/dist/client/assets/{Eye-bojNLUjA.js → Eye-Dn1AISrx.js} +1 -1
- package/dist/client/assets/{FilterLines-CFl65nng.js → FilterLines-CmWI-8pG.js} +1 -1
- package/dist/client/assets/{Globe01-CyfpzbeQ.js → Globe01-CcXDI4W7.js} +1 -1
- package/dist/client/assets/{Globe04-DFpdKSRI.js → Globe04-B9Btoycr.js} +1 -1
- package/dist/client/assets/{HardDrive-B1mtnaeA.js → HardDrive-BqXWgcmp.js} +1 -1
- package/dist/client/assets/{Key01-CwrJlZo0.js → Key01-F6-x7vNY.js} +1 -1
- package/dist/client/assets/{LayoutLeft-fsm0LcB8.js → LayoutLeft-DpqtgcH3.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BHwVyDja.js → LinkExternal01-DOU6-C1w.js} +1 -1
- package/dist/client/assets/{Monitor01-ChA6ov2I.js → Monitor01-SkSQUhmT.js} +1 -1
- package/dist/client/assets/{Palette-DusYqL0W.js → Palette-CnoObDqZ.js} +1 -1
- package/dist/client/assets/{Play-CnXG8qqP.js → Play-DzGcMRv3.js} +1 -1
- package/dist/client/assets/{Plus-eGxBB1d8.js → Plus-DDlkoJBs.js} +1 -1
- package/dist/client/assets/{SearchLg-CDpA_lbT.js → SearchLg-CdT_y89m.js} +1 -1
- package/dist/client/assets/{SearchMd-ujiTPCmg.js → SearchMd-UY2xUREv.js} +1 -1
- package/dist/client/assets/{Settings02-BcAnTzm5.js → Settings02-QyYEyYyn.js} +1 -1
- package/dist/client/assets/{Shield01-ZxmFmrvL.js → Shield01-V8b5EFFL.js} +1 -1
- package/dist/client/assets/{Star01-DHEkWySe.js → Star01-GVe4t6O1.js} +1 -1
- package/dist/client/assets/{Stars01-BdCaKqhF.js → Stars01-BIVPeWqS.js} +1 -1
- package/dist/client/assets/{Stars02-qnq-_X9g.js → Stars02-DVZm69DV.js} +1 -1
- package/dist/client/assets/{Sun-lTiqxOzH.js → Sun-B2ndPBZP.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DAZXInW8.js → SwitchHorizontal01-BL4xnvxO.js} +1 -1
- package/dist/client/assets/{Tool01-CvnpFI53.js → Tool01-Ci5EQ1tM.js} +1 -1
- package/dist/client/assets/{Trash01-ByxlxTiZ.js → Trash01-Cc007jho.js} +1 -1
- package/dist/client/assets/{Upload01-Z77n1bV8.js → Upload01-DB9meUjO.js} +1 -1
- package/dist/client/assets/{User01-COQtf360.js → User01-Dz-_mMMJ.js} +1 -1
- package/dist/client/assets/{Users01-wtRJYQKX.js → Users01-Ctg0iuAM.js} +1 -1
- package/dist/client/assets/{Users03-DknrDMtT.js → Users03-BazvU-rC.js} +1 -1
- package/dist/client/assets/{X-DrMVHLcw.js → X-_dGiBqSn.js} +1 -1
- package/dist/client/assets/{XCircle-Ct0eqqsw.js → XCircle-CmN6DNsv.js} +1 -1
- package/dist/client/assets/{XClose-BaZ908gw.js → XClose-BpreRuFP.js} +1 -1
- package/dist/client/assets/{Zap-wRIFSWIq.js → Zap-CWxLsQ6b.js} +1 -1
- package/dist/client/assets/{ZapSquare-PMiGcZpW.js → ZapSquare-D5x1wm0t.js} +1 -1
- package/dist/client/assets/{ZoomOut-6ix2H92j.js → ZoomOut-C0bVPfpC.js} +1 -1
- package/dist/client/assets/{access-gate-D6dGDGRI.js → access-gate-CpQ3bOMg.js} +1 -1
- package/dist/client/assets/{add-section-modal-DOhGqRCL.js → add-section-modal-D22Rp_ry.js} +1 -1
- package/dist/client/assets/agent-icon-BjxA8YR3.js +1 -0
- package/dist/client/assets/agents-list-C17XwfcN.js +1 -0
- package/dist/client/assets/{ai-providers-Crp7kidL.js → ai-providers-DNjwL7U0.js} +1 -1
- package/dist/client/assets/{alert-CKj_5smu.js → alert-CTzYtGwN.js} +1 -1
- package/dist/client/assets/{alert-dialog-CYizItFp.js → alert-dialog-DMWXmTGp.js} +2 -2
- package/dist/client/assets/app-editor-uAXMllzs.js +1 -0
- package/dist/client/assets/{auth-Bej0Tx2Y.js → auth-DraSXrC6.js} +1 -1
- package/dist/client/assets/{auth-catchall-CmNVpp-8.js → auth-catchall--3ZAEbBd.js} +1 -1
- package/dist/client/assets/{auth-entry-PwLVm-jX.js → auth-entry-DRJ-aW15.js} +1 -1
- package/dist/client/assets/{auth-split-layout-5YwPgbAb.js → auth-split-layout-B77S9w6i.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DoPUB_Bh.js → authenticate-and-persist-oauth-HBteAcVm.js} +1 -1
- package/dist/client/assets/{automation-list-row-CsTyBm4M.js → automation-list-row-NZNZGrlr.js} +1 -1
- package/dist/client/assets/automation-runs-BoQeZ1gh.js +1 -0
- package/dist/client/assets/automations-bd5MK3eJ.js +1 -0
- package/dist/client/assets/{avatar-CJP1BOq4.js → avatar-COMRxqae.js} +1 -1
- package/dist/client/assets/{badge-DhpSM7g_.js → badge-B1dPfLuK.js} +1 -1
- package/dist/client/assets/{block-document-B2vhG8Ii.js → block-document-B6TgjyKW.js} +2 -2
- package/dist/client/assets/{brand-context-BRpHgxfT.js → brand-context-DGv078pp.js} +1 -1
- package/dist/client/assets/{buckets-DDR0G33f.js → buckets-LnyV7EWC.js} +1 -1
- package/dist/client/assets/bulk-category-panel-BP0Mtj3P.js +1 -0
- package/dist/client/assets/{capability-load-error-CCgNL5xi.js → capability-load-error-WTr85D-I.js} +1 -1
- package/dist/client/assets/{card-BFb5m83e.js → card-Bys-wDTW.js} +1 -1
- package/dist/client/assets/category-editor-Cm1sAVk_.js +1 -0
- package/dist/client/assets/{chat-context-n9syhvq-.js → chat-context-huSCeR82.js} +4 -4
- package/dist/client/assets/{checkbox-DmOzmKLP.js → checkbox-BIDlFz_0.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BVPtMYcv.js → cli-auth-success-DJ5lbMQC.js} +1 -1
- package/dist/client/assets/collection-detail-UTQtN0-J.js +1 -0
- package/dist/client/assets/{collection-display-button-Bf9dlJRy.js → collection-display-button-Bnm_JutP.js} +1 -1
- package/dist/client/assets/{collection-search-8iNXnGlM.js → collection-search-CKMDHnku.js} +1 -1
- package/dist/client/assets/{collection-tabs-KA2be3wH.js → collection-tabs-CWrBkWhe.js} +1 -1
- package/dist/client/assets/{command-C34397s2.js → command-DrgMAh0a.js} +1 -1
- package/dist/client/assets/commerce-onboarding-B8pBrcvE.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-Brra3cMC.js → connect-desktop-dialog-CvuFk-NY.js} +1 -1
- package/dist/client/assets/{connection-card-C6NYo4Gp.js → connection-card-DIh-SIqT.js} +1 -1
- package/dist/client/assets/connection-detail-CWog7XFK.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CwZx7WkC.js → connection-form-helpers-DV-bwjt7.js} +1 -1
- package/dist/client/assets/connections-BkvcH3F-.js +1 -0
- package/dist/client/assets/{context-menu-BW_OZBmV.js → context-menu-BPHfkJEs.js} +1 -1
- package/dist/client/assets/{decopilot-BItqS11w.js → decopilot-BxOK0Z8W.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CvYk1hkc.js → decopilot-sse-pool-Chmwc1_x.js} +1 -1
- package/dist/client/assets/{dialog-BAqFyO8a.js → dialog-o7scRbG9.js} +1 -1
- package/dist/client/assets/{domain-settings-r_E3rHsG.js → domain-settings-DIv14WFm.js} +1 -1
- package/dist/client/assets/{drawer-CFkqEC3w.js → drawer-B-Vy7tMY.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C62KNjwK.js → dropdown-menu-D-VNET4I.js} +1 -1
- package/dist/client/assets/{empty-state-Sh_DuDcy.js → empty-state-1p_UpPHY.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D6bQrejT.js → extract-connection-data-BVX9Eneo.js} +1 -1
- package/dist/client/assets/file-explorer-Bh9kp1sm.js +2 -0
- package/dist/client/assets/{file-type-icon-DPWxBpNL.js → file-type-icon-LHBbJJTG.js} +1 -1
- package/dist/client/assets/{files-B9ekmQa_.js → files-Bw3w16xX.js} +1 -1
- package/dist/client/assets/{form-DGE2mWLL.js → form-DX8cQ4SA.js} +1 -1
- package/dist/client/assets/{general-BMDKtyZB.js → general-DzJAxzRR.js} +1 -1
- package/dist/client/assets/{github-repo-picker-B5tZucJa.js → github-repo-picker-ZmfhFTO6.js} +1 -1
- package/dist/client/assets/{hooks-CUSV6Enf.js → hooks-BUt6AoQh.js} +6 -6
- package/dist/client/assets/{import-from-deco-dialog-M3CP3Gmn.js → import-from-deco-dialog-DZhtwoRn.js} +1 -1
- package/dist/client/assets/{index-Bb-tYGNK.js → index-BBTFoidO.js} +1 -1
- package/dist/client/assets/{index-CkTyYAY1.js → index-BPD9Iyv5.js} +1 -1
- package/dist/client/assets/index-BcXb7VeZ.css +1 -0
- package/dist/client/assets/index-CAV1BNai.js +173 -0
- package/dist/client/assets/{index-mEtg0zTM.js → index-CL3KBg-D.js} +1 -1
- package/dist/client/assets/{index-CFiyU0D9.js → index-CXy6rN6i.js} +3 -3
- package/dist/client/assets/{index-DGzNvPy2.js → index-CjKis1yy.js} +1 -1
- package/dist/client/assets/{index-jBUpmiBg.js → index-Cod7u1PQ.js} +1 -1
- package/dist/client/assets/{index-CRxAjd1d.js → index-CpgVJVWB.js} +27 -27
- package/dist/client/assets/{index-B6hcksS9.js → index-DCwPnlYH.js} +1 -1
- package/dist/client/assets/index-DKs6HTlj.js +1 -0
- package/dist/client/assets/{index-Dj7TxcSd.js → index-Db3cPjnW.js} +2 -2
- package/dist/client/assets/index-DvDkdoxH.js +1 -0
- package/dist/client/assets/{index-hmJjUPum.js → index-NJ9aYDVC.js} +1 -1
- package/dist/client/assets/{index-DIBoN36v.js → index-VkScKLdP.js} +1 -1
- package/dist/client/assets/{index-redirect-C9Kkmz45.js → index-redirect-B6MtHNAq.js} +1 -1
- package/dist/client/assets/{input-BwRH-Gsz.js → input-BlhkemhH.js} +1 -1
- package/dist/client/assets/{integration-icon-LQhkkaLl.js → integration-icon-BSHD1Ijr.js} +1 -1
- package/dist/client/assets/{label-CdBSUJpf.js → label-CL8Vh65B.js} +1 -1
- package/dist/client/assets/{login-d0UWtw9N.js → login-B4UwjrwL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-IblqU9XT.js → mcp-oauth-CXj7zg3h.js} +1 -1
- package/dist/client/assets/{members-Bpdrl2e9.js → members-CZJJNFCT.js} +1 -1
- package/dist/client/assets/{monaco-editor-5JIc-lnc.js → monaco-editor-DBScTPL_.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DPsQ-OAn.js → monitoring-stats-row-DS-oLjL7.js} +1 -1
- package/dist/client/assets/{oauth-callback-B1AvYYRn.js → oauth-callback-DmaJ1bda.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BtGHmjpp.js → oauth-callback-ai-provider-BQMnSXh3.js} +1 -1
- package/dist/client/assets/{onboarding-DfUmI7F5.js → onboarding-Byb6DxyK.js} +1 -1
- package/dist/client/assets/{org-install-CpJAFt1s.js → org-install-DE37K5KN.js} +1 -1
- package/dist/client/assets/{org-layout-BsuFzdH_.js → org-layout-des0Y5a9.js} +1 -1
- package/dist/client/assets/{organization-choice-DrxWffZp.js → organization-choice-COkZ5W_o.js} +1 -1
- package/dist/client/assets/{page-seo-form-BLqpZnj6.js → page-seo-form-BcrUATEU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-D1Z6hzyV.js +1 -0
- package/dist/client/assets/popover-SD8gnUXm.js +1 -0
- package/dist/client/assets/post-editor-BDlfII0z.js +1 -0
- package/dist/client/assets/{primitives-BF1opf4F.js → primitives-CVsZF3ex.js} +1 -1
- package/dist/client/assets/{profile-C8meo3ry.js → profile-DBUkydtR.js} +1 -1
- package/dist/client/assets/project-app-view-Bk8oTYIF.js +1 -0
- package/dist/client/assets/record-editor-DL8IQ3xy.js +1 -0
- package/dist/client/assets/registry-Bd0JPSYO.js +2 -0
- package/dist/client/assets/{registry-layout-C4UMhzml.js → registry-layout-BL9jjFNp.js} +1 -1
- package/dist/client/assets/{require-capability--mIKExbX.js → require-capability-CLQ4GBGj.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DDJmFi3U.js → required-auth-layout-BzYoSj-D.js} +1 -1
- package/dist/client/assets/{reset-password-CuNa1ife.js → reset-password-C3Zmx-Z-.js} +1 -1
- package/dist/client/assets/roles-RwbAlbhC.js +1 -0
- package/dist/client/assets/{scroll-area-BM-54tW1.js → scroll-area-DgIklajW.js} +54 -54
- package/dist/client/assets/{search-input-M7ubuBMG.js → search-input-BwHA7yOt.js} +1 -1
- package/dist/client/assets/{secrets-BN1JMG5V.js → secrets-Cu_Gp7gT.js} +1 -1
- package/dist/client/assets/{sections-editor-Buouhx1S.js → sections-editor-CaNl1tLu.js} +2 -2
- package/dist/client/assets/select-DM3pFFAV.js +1 -0
- package/dist/client/assets/{select-model-Cz9R_UN3.js → select-model-C1odlJ1X.js} +1 -1
- package/dist/client/assets/seo-editor-C28ZayGa.js +1 -0
- package/dist/client/assets/settings-layout-C_nc5y3_.js +1 -0
- package/dist/client/assets/{settings-section-MeT61nuY.js → settings-section-6b9w_VoZ.js} +1 -1
- package/dist/client/assets/{sheet-DyU03ddw.js → sheet-BJF6qruz.js} +1 -1
- package/dist/client/assets/shell-controls-C9tE75mS.js +1 -0
- package/dist/client/assets/{shell-layout-Nyz7GHu7.js → shell-layout-gi6XYvgE.js} +1 -1
- package/dist/client/assets/shell-route-loading-Agan4lHM.js +1 -0
- package/dist/client/assets/{sidebar-BNrafefE.js → sidebar-BD77ZDQ1.js} +1 -1
- package/dist/client/assets/{skeleton-B0I93PJP.js → skeleton-CuVDGSZE.js} +1 -1
- package/dist/client/assets/{sortable.esm-MymOIPKk.js → sortable.esm-DpWg8tde.js} +2 -2
- package/dist/client/assets/{sso-CfyYgWAs.js → sso-B9XBpXX9.js} +1 -1
- package/dist/client/assets/{store-T7GJ1SPI.js → store-Il1Qjdpz.js} +1 -1
- package/dist/client/assets/store-registry-BN4Ygwm2.js +2 -0
- package/dist/client/assets/{studio-tools-CNO5iCKk.js → studio-tools-C-Eel15b.js} +1 -1
- package/dist/client/assets/{switch-CCMIMmOF.js → switch-DWXEjjcR.js} +1 -1
- package/dist/client/assets/{tab-id-BptcWVWa.js → tab-id-AX1D_RMI.js} +1 -1
- package/dist/client/assets/{table-DeNuxLMl.js → table-sXVKQ5vt.js} +1 -1
- package/dist/client/assets/{tabs-Ca0vDJqc.js → tabs-BeXAqCdo.js} +1 -1
- package/dist/client/assets/{task-status-B3nPzwP7.js → task-status-CaQuE65s.js} +1 -1
- package/dist/client/assets/{textarea-BYT525JZ.js → textarea-C30KYfio.js} +1 -1
- package/dist/client/assets/{toggle-group-9TrYMc69.js → toggle-group-B6oTaI1f.js} +1 -1
- package/dist/client/assets/toolbar-DuZrnshW.js +1 -0
- package/dist/client/assets/toolbar-icon-button-CG8gWMNZ.js +1 -0
- package/dist/client/assets/{tools-list-uWC3Ij6C.js → tools-list-BSe55AC9.js} +1 -1
- package/dist/client/assets/tooltip-BRQCINXK.js +1 -0
- package/dist/client/assets/{types-C7syjwde.js → types-ywta9rZ4.js} +4 -4
- package/dist/client/assets/{use-ai-providers-C7KmiuqP.js → use-ai-providers-CpUPA2Pj.js} +1 -1
- package/dist/client/assets/{use-automations-RMjkwkxX.js → use-automations-BSn8_z4p.js} +1 -1
- package/dist/client/assets/{use-capability-C6Dwri-U.js → use-capability-AkUZCu97.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BcxdOJLx.js → use-clock-tick-7J301cSN.js} +1 -1
- package/dist/client/assets/{use-collections-B4atckEK.js → use-collections-BhzLncHB.js} +1 -1
- package/dist/client/assets/{use-connection-Dz29RF9P.js → use-connection-CSQdDXlG.js} +1 -1
- package/dist/client/assets/{use-copy-Xy0buIqd.js → use-copy-3aLRhzTZ.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-ClyuqzV0.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-B4mbwJnu.js → use-debounced-autosave-DwyO4Yri.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C6U3mliE.js → use-debounced-value-BGsbVLHA.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CpQNzv3e.js → use-decopilot-events-B8-U5_6h.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CqeuxO_6.js → use-delete-connection-yP5RphYi.js} +1 -1
- package/dist/client/assets/{use-file-configs-CFCmr--W.js → use-file-configs-XF2AvMPs.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BX1nHHVY.js → use-infinite-scroll-CkXtceVR.js} +1 -1
- package/dist/client/assets/{use-join-requests-j9WpmFq7.js → use-join-requests-mfteqXVe.js} +1 -1
- package/dist/client/assets/{use-mcp-client-xOK-OF8p.js → use-mcp-client-CRWIqSWI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Crr3H7P7.js → use-mcp-prompts-BV9cBymv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C8tMWwG9.js → use-mcp-tools-Dgj65Z69.js} +1 -1
- package/dist/client/assets/{use-members-BMNjJExY.js → use-members-BZOJ4ncQ.js} +1 -1
- package/dist/client/assets/{use-mobile-NlF-3RoP.js → use-mobile-DgvzRDzB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DZubxUSm.js → use-navigate-to-agent-DTqeD3lq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C_UJ3Vg_.js → use-org-auth-client-Dx974y4u.js} +1 -1
- package/dist/client/assets/{use-org-fs-DyK8omii.js → use-org-fs-DI1Q1Ycz.js} +1 -1
- package/dist/client/assets/{use-org-sso-DkqH8Zpz.js → use-org-sso-kfQLtl8D.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cu69Rnex.js → use-organization-roles-B2GmBYYT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DksiQdGc.js → use-organization-settings-ClL7mSbK.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BOZLpkM5.js → use-registry-connections-DzyhBLO8.js} +1 -1
- package/dist/client/assets/{use-secrets-CLmhH-Rb.js → use-secrets-BX0N_3N-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DxV7deix.js → use-status-sounds-BsVH7G2F.js} +1 -1
- package/dist/client/assets/{use-view-mode-C2dllj6L.js → use-view-mode-D4v-Vh_n.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-2U_MnYnK.js → use-virtual-mcp-7AWl-thI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DbI8AV-k.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DT-JxV4F.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-Cysvk68n.js → useSuspenseQueries-D4Gfj0Tf.js} +1 -1
- package/dist/client/assets/variant-calendar-C9mxKuI5.js +1 -0
- package/dist/client/assets/{view-mode-toggle-4CQodGfa.js → view-mode-toggle-Dcs21C2T.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +11 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChevronLeft-dyRjFCmp.js +0 -1
- package/dist/client/assets/agent-icon-oDx9Z_Be.js +0 -1
- package/dist/client/assets/agents-list-BgSM_QG_.js +0 -1
- package/dist/client/assets/app-editor-Xoia35dq.js +0 -1
- package/dist/client/assets/automation-runs-B-dNDEWH.js +0 -1
- package/dist/client/assets/automations-D395202A.js +0 -1
- package/dist/client/assets/bulk-category-panel-CM1bMunr.js +0 -1
- package/dist/client/assets/category-editor-2T4Y_ABL.js +0 -1
- package/dist/client/assets/collection-detail-BQKV3UU7.js +0 -1
- package/dist/client/assets/commerce-onboarding-D2H83R0U.js +0 -1
- package/dist/client/assets/connection-detail-gJ5ITUXe.js +0 -1
- package/dist/client/assets/connections-CicrEJbU.js +0 -1
- package/dist/client/assets/file-explorer-C8pgfKCz.js +0 -2
- package/dist/client/assets/index-B2yJy2sB.js +0 -1
- package/dist/client/assets/index-BqKQnks_.css +0 -1
- package/dist/client/assets/index-DQnTjiix.js +0 -1
- package/dist/client/assets/index-D_S_Rq8A.js +0 -169
- package/dist/client/assets/page-seo-sheet-C7jjKuEW.js +0 -1
- package/dist/client/assets/popover-BXFiEQtN.js +0 -1
- package/dist/client/assets/post-editor-Tve7DmSa.js +0 -1
- package/dist/client/assets/preview-dialog-CQgf0QcR.js +0 -5
- package/dist/client/assets/project-app-view-BR2-hR46.js +0 -1
- package/dist/client/assets/record-editor-DbXO7U7E.js +0 -1
- package/dist/client/assets/registry-jjhvqeDq.js +0 -2
- package/dist/client/assets/roles-BMhGnq_F.js +0 -1
- package/dist/client/assets/select-C6v8Xcth.js +0 -1
- package/dist/client/assets/seo-editor-D9o3utSQ.js +0 -1
- package/dist/client/assets/settings-layout-CSaUQUXv.js +0 -1
- package/dist/client/assets/shell-controls-DtGb6E4l.js +0 -1
- package/dist/client/assets/shell-route-loading-BRcTX0VT.js +0 -1
- package/dist/client/assets/store-registry-B-YJeGRV.js +0 -2
- package/dist/client/assets/toolbar-p8VcpV1N.js +0 -1
- package/dist/client/assets/tooltip-DrpiSbRG.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-DVmI--_C.js +0 -1
- package/dist/client/assets/useInfiniteQuery-RUqqRph1.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-fRYRtDkY.js +0 -1
- package/dist/client/assets/variant-calendar-mZn_D1Zo.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-
|
|
1
|
+
import{i as o}from"./AlertCircle-CM6D9elR.js";import{i as t}from"./CheckCircle-8DKF8Yx5.js";import{a as r}from"./DotsVertical-DSosYpI1.js";import{ar as a}from"./agent-icon-BjxA8YR3.js";import{i as n}from"./index-CXy6rN6i.js";import{a as l}from"./XCircle-CmN6DNsv.js";const i={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:l,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:n,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return i[e??"completed"]??m}export{i as S,x as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-
|
|
1
|
+
import{c as o,l,j as n}from"./index-CXy6rN6i.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,
|
|
1
|
+
import{r as x,a2 as b,j as c,U as m,V as k,af as p,ba as M,bb as T,ah as S,bc as A,X as F,bE as $,c as P,l as C}from"./index-CXy6rN6i.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,U]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",E=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=U(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});E.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=h,L=E;const X=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),N=x.createContext({size:"default",variant:"default"});function J(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(N.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function K(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(N),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(X({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{J as T,K as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,r as m,j as r,l as x,e as $,al as h,G as k,F as N,H as C}from"./index-CXy6rN6i.js";const T=m.createContext(null);function u(){const t=m.use(T);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function p(t){const e=c.c(8),{children:s}=t,[l,o]=m.useState(null),[n,a]=m.useState(null),[f,E]=m.useState(null),[b,S]=m.useState(null);let g;e[0]!==f||e[1]!==b||e[2]!==n||e[3]!==l?(g={togglesEl:l,setTogglesEl:o,tabsEl:n,setTabsEl:a,centerEl:f,setCenterEl:E,rightEl:b,setRightEl:S},e[0]=f,e[1]=b,e[2]=n,e[3]=l,e[4]=g):g=e[4];let d;return e[5]!==s||e[6]!==g?(d=r.jsx(T,{value:g,children:s}),e[5]=s,e[6]=g,e[7]=d):d=e[7],d}function i(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx(p,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=l):l=e[1],l}function L(t){const e=c.c(10);let s,l,o;e[0]!==t?({children:s,className:l,...o}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=o):(s=e[1],l=e[2],o=e[3]);let n;e[4]!==l?(n=x("app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",l),e[4]=l,e[5]=n):n=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=r.jsx("div",{className:n,...o,children:s}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a}function v(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=l):l=e[1],l}function y(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=l):l=e[1],l}function R(){const t=c.c(7),s=N().logo??C,l=typeof s=="string"?s:s.light,o=typeof s=="string"?s:s.dark;let n;t[0]!==l?(n=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=l,t[1]=n):n=t[1];let a;t[2]!==o?(a=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=o,t[3]=a):a=t[3];let f;return t[4]!==n||t[5]!==a?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,a]}),t[4]=n,t[5]=a,t[6]=f):f=t[6],f}function j(){const t=c.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(m.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(R,{})}),t[0]=e):e=t[0],e}function w(){const t=c.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=$(e);let l;t[1]!==s?(l={org:s},t[1]=s,t[2]=l):l=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(j,{}),t[3]=o):o=t[3];let n;return t[4]!==l?(n=r.jsx(k,{to:"/$org",params:l,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:o}),t[4]=l,t[5]=n):n=t[5],n}function P(){const t=c.c(2),{setCenterEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function _(t){const e=c.c(3),{children:s}=t,{centerEl:l}=u();if(!l)return null;let o;return e[0]!==l||e[1]!==s?(o=h.createPortal(s,l),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function z(t){const e=c.c(5),{className:s}=t,{setTabsEl:l}=u();let o;e[0]!==s?(o=x("shrink-0 flex items-center",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function H(t){const e=c.c(3),{children:s}=t,{tabsEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function B(t){const e=c.c(5),{className:s}=t,{setTogglesEl:l}=u();let o;e[0]!==s?(o=x("contents",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function D(t){const e=c.c(3),{children:s}=t,{togglesEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function F(){const t=c.c(2),{setRightEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function G(t){const e=c.c(3),{children:s}=t,{rightEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}i.Provider=p;i.Header=L;i.LeftColumn=v;i.RightColumn=y;i.Logo=j;i.LogoLink=w;i.CenterSlot=P;i.Center=_;i.TabsSlot=z;i.Tabs=H;i.TogglesSlot=B;i.Toggles=D;i.RightSlot=F;i.Right=G;export{i as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as d,l as f,j as b}from"./index-CXy6rN6i.js";function x(l){const e=d.c(14);let n,t,s,o,r;e[0]!==l?({active:n,className:t,ref:o,type:r,...s}=l,e[0]=l,e[1]=n,e[2]=t,e[3]=s,e[4]=o,e[5]=r):(n=e[1],t=e[2],s=e[3],o=e[4],r=e[5]);const a=r===void 0?"button":r,u=n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let i;e[6]!==t||e[7]!==u?(i=f("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",u,t),e[6]=t,e[7]=u,e[8]=i):i=e[8];let c;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==a?(c=b.jsx("button",{ref:o,type:a,className:i,...s}),e[9]=s,e[10]=o,e[11]=i,e[12]=a,e[13]=c):c=e[13],c}export{x as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,D as I,K as T,q as b,
|
|
1
|
+
import{c as h,D as I,K as T,q as b,a6 as C,ac as k,j as o}from"./index-CXy6rN6i.js";import{i as N}from"./mcp-oauth-CXj7zg3h.js";import{B as x}from"./badge-B1dPfLuK.js";import{T as y,a as j,b as g,c as S}from"./tooltip-BRQCINXK.js";import{g as _}from"./types-ywta9rZ4.js";import{s as $}from"./Eye-Dn1AISrx.js";import{s as A}from"./Star01-GVe4t6O1.js";import{ap as w}from"./agent-icon-BjxA8YR3.js";function D(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=b,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>N({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const H=[{key:"readOnlyHint",label:"Read-only",Icon:$,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function M(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=_(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?H.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=S,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(P)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function P(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{M as T,D as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as c,U as S,ai as Z,a2 as J,a3 as Q,Z as H,T as ee,V as C,Y as $,a1 as te,W as G,_ as oe,$ as re,X as ne,dy as se,a0 as ae,c as j,l as ie}from"./index-CXy6rN6i.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[m,y]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>m?g.current?"delayed-open":"instant-open":"closed",[m]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,y(!0)},[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,y(!0),f.current=0},T)},[T,y]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:m,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,m={x:h.clientX,y:h.clientY},y=me(m,g.getBoundingClientRect()),w=Ce(m,y),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,m={x:T.clientX,y:T.clientY},y=i?.contains(g)||u?.contains(g),w=!we(m,l);y?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),ye=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ye,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function me(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=U,Oe=B,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ne as T,le as V,Ie as a,Me as b,Ae as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bk as p,bl as t,aF as y,s as a,c5 as q,o as s,aG as g,aD as u,aj as m,b6 as x,bi as O,c6 as ge,c7 as fe,c8 as B,c9 as j,ca as be,cb as ye,cc as $,cd as Se,ce as _e,cf as He,cg as Me,ch as ke,ci as Pe,cj as qe,ck as Te,bw as Ie,cl as Ee,cm as Le,cn as ze,co as De,cp as Ae,cq as Ue,cr as Ne,bv as Oe,r as te,c as F,j as b,cs as je,ct as Be,v as $e,l as oe}from"./index-CXy6rN6i.js";import{P as Fe}from"./use-mcp-client-CRWIqSWI.js";const le=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ve(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ke(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
|
|
2
2
|
`+i+r.slice(f)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const f=(d.index??0)+d[0].length;return r.slice(0,f)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -8,7 +8,7 @@ import{bm as p,bn as t,aG as y,s as a,c6 as q,o as s,aH as g,aE as u,al as m,b8
|
|
|
8
8
|
</head>`+r.slice(f)}return`<head>
|
|
9
9
|
`+i+`
|
|
10
10
|
</head>
|
|
11
|
-
`+r}const We=/^https?:\/\/(\*\.)?[a-zA-Z0-9._-]+(:\d+)?\/?$/;function N(r){return!r||r.length===0?[]:r.filter(e=>We.test(e))}function Ke(r){if(r.csp)return r.csp;const e=r.resourceCsp;if(!e)return le;const o=N(e.resourceDomains),i=N(e.connectDomains),n=N(e.frameDomains),l=N(e.baseUriDomains),c=o.length>0,d=i.length>0,h=n.length>0,v=l.length>0;if(!c&&!d&&!h&&!v)return le;const f=o.join(" ");return["default-src 'none'",c?`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${f}`:"script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",c?`style-src 'unsafe-inline' ${f}`:"style-src 'unsafe-inline'",c?`img-src * data: blob: ${f}`:"img-src * data: blob:",c?`media-src * data: blob: ${f}`:"media-src * data: blob:",c?`font-src data: ${f}`:"font-src data:",d?`connect-src ${i.join(" ")}`:"connect-src 'none'",h?`frame-src ${n.join(" ")}`:"frame-src 'none'","worker-src blob:","form-action 'none'",v?`base-uri ${l.join(" ")}`:"base-uri 'none'"].join("; ")}(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});class Ze extends
|
|
11
|
+
`+r}const We=/^https?:\/\/(\*\.)?[a-zA-Z0-9._-]+(:\d+)?\/?$/;function N(r){return!r||r.length===0?[]:r.filter(e=>We.test(e))}function Ke(r){if(r.csp)return r.csp;const e=r.resourceCsp;if(!e)return le;const o=N(e.resourceDomains),i=N(e.connectDomains),n=N(e.frameDomains),l=N(e.baseUriDomains),c=o.length>0,d=i.length>0,h=n.length>0,v=l.length>0;if(!c&&!d&&!h&&!v)return le;const f=o.join(" ");return["default-src 'none'",c?`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${f}`:"script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",c?`style-src 'unsafe-inline' ${f}`:"style-src 'unsafe-inline'",c?`img-src * data: blob: ${f}`:"img-src * data: blob:",c?`media-src * data: blob: ${f}`:"media-src * data: blob:",c?`font-src data: ${f}`:"font-src data:",d?`connect-src ${i.join(" ")}`:"connect-src 'none'",h?`frame-src ${n.join(" ")}`:"frame-src 'none'","worker-src blob:","form-action 'none'",v?`base-uri ${l.join(" ")}`:"base-uri 'none'"].join("; ")}(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});class Ze extends Fe{_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 n=i.shape.method.value;this._registeredMethods.add(n);let l=o;super.setNotificationHandler(i,c=>{let d=c.params;this.onEventDispatch(e,d),l.onHandler?.(d);for(let h of[...l.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 n=i.listeners.indexOf(o);n!==-1&&i.listeners.splice(n,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 ve="2026-01-26",Je="ui/notifications/tool-input-partial",Ye=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."),Qe=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."),Ge=y(Qe.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.).
|
|
@@ -46,7 +46,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
46
46
|
- omitted: host decides border`)});var de=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 ct=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:a().optional(),visibility:u(ct).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
47
47
|
- "model": Tool visible to and callable by the agent
|
|
48
48
|
- "app": Tool callable by the app from this server only`),csp:O().optional(),permissions:O().optional()});s({mimeTypes:u(a()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var dt=s({method:t("ui/download-file"),params:s({contents:u(p([ge,fe])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),pt=s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(B).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:a().describe("HTML content to load into the inner iframe."),sandbox:a().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ie.optional().describe("CSP configuration from resource metadata."),permissions:re.optional().describe("Sandbox permissions from resource metadata.")})});s({method:t("ui/notifications/tool-result"),params:j.describe("Standard MCP tool execution result.")});var xe=s({toolInfo:s({id:ye.optional().describe("JSON-RPC id of the tools/call request."),tool:be.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Ye.optional().describe("Current color theme preference."),styles:st.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:m().describe("Fixed container height in pixels.")}),s({maxHeight:p([m(),q()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:m().describe("Fixed container width in pixels.")}),s({maxWidth:p([m(),q()]).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:a().optional().describe("User's language and region preference in BCP 47 format."),timeZone:a().optional().describe("User's timezone in IANA format."),userAgent:a().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:m().describe("Top safe area inset in pixels."),right:m().describe("Right safe area inset in pixels."),bottom:m().describe("Bottom safe area inset in pixels."),left:m().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:xe.describe("Partial context update containing only changed fields.")});var ut=s({method:t("ui/update-model-context"),params:s({content:u(B).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y(a(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),ht=s({method:t("ui/initialize"),params:s({appInfo:$.describe("App identification (name and version)."),appCapabilities:at.describe("Features and capabilities this app provides."),protocolVersion:a().describe("Protocol version this app supports.")})});s({protocolVersion:a().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$.describe("Host application identification and version."),hostCapabilities:nt.describe("Features and capabilities provided by the host."),hostContext:xe.describe("Rich context about the host environment.")}).passthrough();class mt{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 n=Oe.safeParse(i.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",n.error.message,i):(console.error("Failed to parse message",n.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==Je&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var gt="ui/resourceUri";function ft(r){let e=r._meta?.ui?.resourceUri;if(e===void 0&&(e=r._meta?.[gt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var bt=[ve];class yt extends Ze{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,n)=>(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,n)))};eventSchemas={sizechange:tt,sandboxready:et,initialized:lt,requestteardown:rt,loggingmessage:Se};constructor(e,o,i,n){super(n),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=n?.hostContext||{},this.setRequestHandler(ht,l=>this._oninitialize(l)),this.setRequestHandler(_e,(l,c)=>(this.onping?.(l.params,c),{})),this.replaceRequestHandler(de,l=>({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(pt,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(Xe,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(dt,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(de,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(ut,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(He,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Me,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(ke,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(Pe,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(qe,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(Te,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:bt.includes(o)?o:ve,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let n of Object.keys(e)){let l=this._hostContext[n],c=e[n];vt(l,c)||(o[n]=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},it,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},Ie,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,n)=>this._client.request({method:"tools/call",params:i},j,{signal:n.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Ee,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,n)=>this._client.request({method:"resources/list",params:i},Le,{signal:n.signal}),this.onlistresourcetemplates=async(i,n)=>this._client.request({method:"resources/templates/list",params:i},ze,{signal:n.signal}),this.onreadresource=async(i,n)=>this._client.request({method:"resources/read",params:i},Ae,{signal:n.signal}),o.resources.listChanged&&this._client.setNotificationHandler(De,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,n)=>this._client.request({method:"prompts/list",params:i},Ue,{signal:n.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ne,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function vt(r,e){return JSON.stringify(r)===JSON.stringify(e)}(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var xt=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."),wt=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."),Ct=y(wt.describe(`Style variables for theming MCP apps.
|
|
49
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:a().optional().describe("User's language and region preference in BCP 47 format."),timeZone:a().optional().describe("User's timezone in IANA format."),userAgent:a().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:m().describe("Top safe area inset in pixels."),right:m().describe("Right safe area inset in pixels."),bottom:m().describe("Bottom safe area inset in pixels."),left:m().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:xe.describe("Partial context update containing only changed fields.")});var ut=s({method:t("ui/update-model-context"),params:s({content:u(B).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y(a(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),ht=s({method:t("ui/initialize"),params:s({appInfo:$.describe("App identification (name and version)."),appCapabilities:at.describe("Features and capabilities this app provides."),protocolVersion:a().describe("Protocol version this app supports.")})});s({protocolVersion:a().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$.describe("Host application identification and version."),hostCapabilities:nt.describe("Features and capabilities provided by the host."),hostContext:xe.describe("Rich context about the host environment.")}).passthrough();class mt{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 n=Oe.safeParse(i.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",n.error.message,i):(console.error("Failed to parse message",n.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==Je&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var gt="ui/resourceUri";function ft(r){let e=r._meta?.ui?.resourceUri;if(e===void 0&&(e=r._meta?.[gt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var bt=[ve];class yt extends Ze{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,n)=>(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,n)))};eventSchemas={sizechange:tt,sandboxready:et,initialized:lt,requestteardown:rt,loggingmessage:Se};constructor(e,o,i,n){super(n),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=n?.hostContext||{},this.setRequestHandler(ht,l=>this._oninitialize(l)),this.setRequestHandler(_e,(l,c)=>(this.onping?.(l.params,c),{})),this.replaceRequestHandler(de,l=>({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(pt,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(Xe,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(dt,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(de,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(ut,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(He,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Me,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(ke,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(Pe,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(qe,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(Te,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:bt.includes(o)?o:ve,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let n of Object.keys(e)){let l=this._hostContext[n],c=e[n];vt(l,c)||(o[n]=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},it,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},Ie,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,n)=>this._client.request({method:"tools/call",params:i},j,{signal:n.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Ee,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,n)=>this._client.request({method:"resources/list",params:i},Le,{signal:n.signal}),this.onlistresourcetemplates=async(i,n)=>this._client.request({method:"resources/templates/list",params:i},ze,{signal:n.signal}),this.onreadresource=async(i,n)=>this._client.request({method:"resources/read",params:i},De,{signal:n.signal}),o.resources.listChanged&&this._client.setNotificationHandler(Ae,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,n)=>this._client.request({method:"prompts/list",params:i},Ue,{signal:n.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ne,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function vt(r,e){return JSON.stringify(r)===JSON.stringify(e)}(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var xt=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."),wt=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."),Ct=y(wt.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.).
|
|
@@ -84,4 +84,4 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
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 Mt=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:a().optional(),visibility:u(Mt).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
85
85
|
- "model": Tool visible to and callable by the agent
|
|
86
86
|
- "app": Tool callable by the app from this server only`),csp:O().optional(),permissions:O().optional()});s({mimeTypes:u(a()).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([ge,fe])).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(B).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:a().describe("HTML content to load into the inner iframe."),sandbox:a().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 we=s({toolInfo:s({id:ye.optional().describe("JSON-RPC id of the tools/call request."),tool:be.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:xt.optional().describe("Current color theme preference."),styles:St.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:m().describe("Fixed container height in pixels.")}),s({maxHeight:p([m(),q()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:m().describe("Fixed container width in pixels.")}),s({maxWidth:p([m(),q()]).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:a().optional().describe("User's language and region preference in BCP 47 format."),timeZone:a().optional().describe("User's timezone in IANA format."),userAgent:a().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:m().describe("Top safe area inset in pixels."),right:m().describe("Right safe area inset in pixels."),bottom:m().describe("Bottom safe area inset in pixels."),left:m().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:we.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(B).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y(a(),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:$.describe("App identification (name and version)."),appCapabilities:Ht.describe("Features and capabilities this app provides."),protocolVersion:a().describe("Protocol version this app supports.")})});s({protocolVersion:a().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$.describe("Host application identification and version."),hostCapabilities:_t.describe("Features and capabilities provided by the host."),hostContext:we.describe("Rich context about the host environment.")}).passthrough();function kt(){let r=document.documentElement.getAttribute("data-theme");return r==="dark"||r==="light"?r:document.documentElement.classList.contains("dark")?"dark":"light"}const Pt=[["--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 qt(){if(typeof document>"u")return{};const r=getComputedStyle(document.documentElement),e={};for(const[o,i]of Pt){const n=r.getPropertyValue(o).trim();n&&(e[i]=n)}return{variables:e}}const Tt={name:"MCP Mesh",version:"1.0.0"},It={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Et=15e3;function Lt(){return typeof navigator>"u"?"en":navigator.language??"en"}function zt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function At(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function ue(r,e,o,i){return{theme:kt(),styles:qt(),displayMode:r,availableDisplayModes:["inline","fullscreen"],locale:Lt(),timeZone:zt(),platform:At(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const se=new Set;let he=!1;function Dt(){if(he||typeof document>"u")return;he=!0;const r=()=>se.forEach(e=>e());new MutationObserver(r).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r)}function Ut(r){return se.add(r),Dt(),()=>se.delete(r)}class Nt{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:n}=this.config;this.bridge.setHostContext(ue(e,i,o,n))}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 n of this.listeners)n()}}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)return;e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};let o=!1;e.onload=()=>{if(!this.disposed){if(!o){o=!0;return}this.set({height:this.config.minHeight,isLoading:!0,error:null}),this.connectBridge(e)}},this.connectBridge(e)};connectBridge(e){this.clearTimeout(),this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.close(),this.bridge=null);try{const{client:o,displayMode:i,maxHeight:n,toolInfo:l,orgId:c}=this.config,d=ue(i,l,n,c),h=new yt(o,Tt,It,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Ut(()=>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:n}=this.config;this.set({height:Math.max(i,Math.min(n,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 n=i.resource,l="blob"in n?new Blob([Uint8Array.from(atob(n.blob),h=>h.charCodeAt(0))],{type:n.mimeType}):new Blob([n.text??""],{type:n.mimeType}),c=URL.createObjectURL(l),d=document.createElement("a");d.href=c,d.download=n.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})},Et)}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 mt(o.contentWindow,o.contentWindow);e.connect(i).catch(n=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",n),this.set({error:n instanceof Error?n.message:"Connection failed",isLoading:!1}))})}}function Ot(r){const e=te.useRef(new Nt(r));te.useEffect(()=>{e.current.updateConfig(r)},[r]);const{height:o,isLoading:i,error:n}=te.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:n,iframeRef:e.current.attach}}const me=new Set;function jt(r){const e=r?.contents?.[0];return!e||!("text"in e)||!e.text?null:Fe(e.text,{resourceCsp:e._meta?.ui?.csp})}function Ce(r){const e=V.c(39),{html:o,uri:i,orgId:n,toolInfo:l,toolInput:c,toolResult:d,displayMode:h,minHeight:v,maxHeight:f,client:E,onMessage:F,onUpdateModelContext:W,onTeardown:K,onRequestDisplayMode:Z,className:C}=r,w=h===void 0?"inline":h,J=v===void 0?150:v,Y=f===void 0?600:f;i&&!me.has(i)&&(me.add(i),$e("mcp_app_opened",{resource_uri:i,display_mode:w,tool_name:l?.tool?.name??null}));let L;e[0]!==E||e[1]!==w||e[2]!==Y||e[3]!==J||e[4]!==F||e[5]!==Z||e[6]!==K||e[7]!==W||e[8]!==n||e[9]!==l||e[10]!==c||e[11]!==d?(L={client:E,displayMode:w,minHeight:J,maxHeight:Y,orgId:n,toolInfo:l,toolInput:c,toolResult:d,onMessage:F,onUpdateModelContext:W,onTeardown:K,onRequestDisplayMode:Z},e[0]=E,e[1]=w,e[2]=Y,e[3]=J,e[4]=F,e[5]=Z,e[6]=K,e[7]=W,e[8]=n,e[9]=l,e[10]=c,e[11]=d,e[12]=L):L=e[12];const{height:Q,isLoading:z,error:A,iframeRef:G}=Ot(L);if(!o)return null;if(A){let k;e[13]!==C?(k=oe("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",C),e[13]=C,e[14]=k):k=e[14];let P;e[15]!==A?(P=b.jsx("span",{className:"text-sm",children:A}),e[15]=A,e[16]=P):P=e[16];let U;return e[17]!==k||e[18]!==P?(U=b.jsx("div",{className:k,children:P}),e[17]=k,e[18]=P,e[19]=U):U=e[19],U}const Re=l?.tool.name;let R;e[20]!==C?(R=oe("relative w-full overflow-hidden rounded-lg",C),e[20]=C,e[21]=R):R=e[21];let S;e[22]!==w||e[23]!==Q?(S=w!=="fullscreen"?{height:`${Q}px`}:void 0,e[22]=w,e[23]=Q,e[24]=S):S=e[24];let _;e[25]!==z?(_=z&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[b.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),b.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[25]=z,e[26]=_):_=e[26];const X=z&&"invisible";let H;e[27]!==X?(H=oe("w-full h-full border-0",X),e[27]=X,e[28]=H):H=e[28];const ee=`MCP App: ${Re??i}`;let M;e[29]!==o||e[30]!==G||e[31]!==ee||e[32]!==H?(M=b.jsx("iframe",{ref:G,srcDoc:o,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:ee}),e[29]=o,e[30]=G,e[31]=ee,e[32]=H,e[33]=M):M=e[33];let D;return e[34]!==M||e[35]!==R||e[36]!==S||e[37]!==_?(D=b.jsxs("div",{className:R,style:S,children:[_,M]}),e[34]=M,e[35]=R,e[36]=S,e[37]=_,e[38]=D):D=e[38],D}function Bt(r){const e=V.c(13);let o,i,n,l;e[0]!==r?({resourceURI:l,orgSlug:n,connectionId:o,...i}=r,e[0]=r,e[1]=o,e[2]=i,e[3]=n,e[4]=l):(o=e[1],i=e[2],n=e[3],l=e[4]);let c;e[5]!==o||e[6]!==n||e[7]!==l?(c={orgSlug:n,connectionId:o,uri:l,staleTime:3e4},e[5]=o,e[6]=n,e[7]=l,e[8]=c):c=e[8];const d=je(c);let h;return e[9]!==i||e[10]!==d.data||e[11]!==l?(h=b.jsx(Ce,{html:d.data,uri:l,...i}),e[9]=i,e[10]=d.data,e[11]=l,e[12]=h):h=e[12],h}function $t(r){const e=V.c(10);let o,i;e[0]!==r?({resourceURI:i,...o}=r,e[0]=r,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let n;e[3]!==o.client||e[4]!==i?(n={client:o.client,uri:i,staleTime:3e4},e[3]=o.client,e[4]=i,e[5]=n):n=e[5];const{data:l}=Be(n),c=jt(l);let d;return e[6]!==o||e[7]!==c||e[8]!==i?(d=b.jsx(Ce,{html:c,uri:i,...o}),e[6]=o,e[7]=c,e[8]=i,e[9]=d):d=e[9],d}function Wt(r){const e=V.c(4);if(r.orgSlug&&r.connectionId){let i;return e[0]!==r?(i=b.jsx(Bt,{...r,orgSlug:r.orgSlug,connectionId:r.connectionId}),e[0]=r,e[1]=i):i=e[1],i}let o;return e[2]!==r?(o=b.jsx($t,{...r}),e[2]=r,e[3]=o):o=e[3],o}const Kt={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function Zt(r){if(!(r==null||typeof r!="object"))try{return ft({_meta:r})}catch{return}}export{Wt as M,Kt as a,Zt as g};
|
|
87
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:a().optional().describe("User's language and region preference in BCP 47 format."),timeZone:a().optional().describe("User's timezone in IANA format."),userAgent:a().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:m().describe("Top safe area inset in pixels."),right:m().describe("Right safe area inset in pixels."),bottom:m().describe("Bottom safe area inset in pixels."),left:m().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:we.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(B).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y(a(),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:$.describe("App identification (name and version)."),appCapabilities:Ht.describe("Features and capabilities this app provides."),protocolVersion:a().describe("Protocol version this app supports.")})});s({protocolVersion:a().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:$.describe("Host application identification and version."),hostCapabilities:_t.describe("Features and capabilities provided by the host."),hostContext:we.describe("Rich context about the host environment.")}).passthrough();function kt(){let r=document.documentElement.getAttribute("data-theme");return r==="dark"||r==="light"?r:document.documentElement.classList.contains("dark")?"dark":"light"}const Pt=[["--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 qt(){if(typeof document>"u")return{};const r=getComputedStyle(document.documentElement),e={};for(const[o,i]of Pt){const n=r.getPropertyValue(o).trim();n&&(e[i]=n)}return{variables:e}}const Tt={name:"MCP Mesh",version:"1.0.0"},It={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Et=15e3;function Lt(){return typeof navigator>"u"?"en":navigator.language??"en"}function zt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function Dt(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function ue(r,e,o,i){return{theme:kt(),styles:qt(),displayMode:r,availableDisplayModes:["inline","fullscreen"],locale:Lt(),timeZone:zt(),platform:Dt(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const se=new Set;let he=!1;function At(){if(he||typeof document>"u")return;he=!0;const r=()=>se.forEach(e=>e());new MutationObserver(r).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r)}function Ut(r){return se.add(r),At(),()=>se.delete(r)}class Nt{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:n}=this.config;this.bridge.setHostContext(ue(e,i,o,n))}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 n of this.listeners)n()}}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)return;e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};let o=!1;e.onload=()=>{if(!this.disposed){if(!o){o=!0;return}this.set({height:this.config.minHeight,isLoading:!0,error:null}),this.connectBridge(e)}},this.connectBridge(e)};connectBridge(e){this.clearTimeout(),this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.close(),this.bridge=null);try{const{client:o,displayMode:i,maxHeight:n,toolInfo:l,orgId:c}=this.config,d=ue(i,l,n,c),h=new yt(o,Tt,It,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Ut(()=>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:n}=this.config;this.set({height:Math.max(i,Math.min(n,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 n=i.resource,l="blob"in n?new Blob([Uint8Array.from(atob(n.blob),h=>h.charCodeAt(0))],{type:n.mimeType}):new Blob([n.text??""],{type:n.mimeType}),c=URL.createObjectURL(l),d=document.createElement("a");d.href=c,d.download=n.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})},Et)}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 mt(o.contentWindow,o.contentWindow);e.connect(i).catch(n=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",n),this.set({error:n instanceof Error?n.message:"Connection failed",isLoading:!1}))})}}function Ot(r){const e=te.useRef(new Nt(r));te.useEffect(()=>{e.current.updateConfig(r)},[r]);const{height:o,isLoading:i,error:n}=te.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:n,iframeRef:e.current.attach}}const me=new Set;function jt(r){const e=r?.contents?.[0];return!e||!("text"in e)||!e.text?null:Ve(e.text,{resourceCsp:e._meta?.ui?.csp})}function Ce(r){const e=F.c(39),{html:o,uri:i,orgId:n,toolInfo:l,toolInput:c,toolResult:d,displayMode:h,minHeight:v,maxHeight:f,client:E,onMessage:V,onUpdateModelContext:W,onTeardown:K,onRequestDisplayMode:Z,className:C}=r,w=h===void 0?"inline":h,J=v===void 0?150:v,Y=f===void 0?600:f;i&&!me.has(i)&&(me.add(i),$e("mcp_app_opened",{resource_uri:i,display_mode:w,tool_name:l?.tool?.name??null}));let L;e[0]!==E||e[1]!==w||e[2]!==Y||e[3]!==J||e[4]!==V||e[5]!==Z||e[6]!==K||e[7]!==W||e[8]!==n||e[9]!==l||e[10]!==c||e[11]!==d?(L={client:E,displayMode:w,minHeight:J,maxHeight:Y,orgId:n,toolInfo:l,toolInput:c,toolResult:d,onMessage:V,onUpdateModelContext:W,onTeardown:K,onRequestDisplayMode:Z},e[0]=E,e[1]=w,e[2]=Y,e[3]=J,e[4]=V,e[5]=Z,e[6]=K,e[7]=W,e[8]=n,e[9]=l,e[10]=c,e[11]=d,e[12]=L):L=e[12];const{height:Q,isLoading:z,error:D,iframeRef:G}=Ot(L);if(!o)return null;if(D){let k;e[13]!==C?(k=oe("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",C),e[13]=C,e[14]=k):k=e[14];let P;e[15]!==D?(P=b.jsx("span",{className:"text-sm",children:D}),e[15]=D,e[16]=P):P=e[16];let U;return e[17]!==k||e[18]!==P?(U=b.jsx("div",{className:k,children:P}),e[17]=k,e[18]=P,e[19]=U):U=e[19],U}const Re=l?.tool.name;let R;e[20]!==C?(R=oe("relative w-full overflow-hidden rounded-lg",C),e[20]=C,e[21]=R):R=e[21];let S;e[22]!==w||e[23]!==Q?(S=w!=="fullscreen"?{height:`${Q}px`}:void 0,e[22]=w,e[23]=Q,e[24]=S):S=e[24];let _;e[25]!==z?(_=z&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[b.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),b.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[25]=z,e[26]=_):_=e[26];const X=z&&"invisible";let H;e[27]!==X?(H=oe("w-full h-full border-0",X),e[27]=X,e[28]=H):H=e[28];const ee=`MCP App: ${Re??i}`;let M;e[29]!==o||e[30]!==G||e[31]!==ee||e[32]!==H?(M=b.jsx("iframe",{ref:G,srcDoc:o,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:ee}),e[29]=o,e[30]=G,e[31]=ee,e[32]=H,e[33]=M):M=e[33];let A;return e[34]!==M||e[35]!==R||e[36]!==S||e[37]!==_?(A=b.jsxs("div",{className:R,style:S,children:[_,M]}),e[34]=M,e[35]=R,e[36]=S,e[37]=_,e[38]=A):A=e[38],A}function Bt(r){const e=F.c(13);let o,i,n,l;e[0]!==r?({resourceURI:l,orgSlug:n,connectionId:o,...i}=r,e[0]=r,e[1]=o,e[2]=i,e[3]=n,e[4]=l):(o=e[1],i=e[2],n=e[3],l=e[4]);let c;e[5]!==o||e[6]!==n||e[7]!==l?(c={orgSlug:n,connectionId:o,uri:l,staleTime:3e4},e[5]=o,e[6]=n,e[7]=l,e[8]=c):c=e[8];const d=je(c);let h;return e[9]!==i||e[10]!==d.data||e[11]!==l?(h=b.jsx(Ce,{html:d.data,uri:l,...i}),e[9]=i,e[10]=d.data,e[11]=l,e[12]=h):h=e[12],h}function $t(r){const e=F.c(10);let o,i;e[0]!==r?({resourceURI:i,...o}=r,e[0]=r,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let n;e[3]!==o.client||e[4]!==i?(n={client:o.client,uri:i,staleTime:3e4},e[3]=o.client,e[4]=i,e[5]=n):n=e[5];const{data:l}=Be(n),c=jt(l);let d;return e[6]!==o||e[7]!==c||e[8]!==i?(d=b.jsx(Ce,{html:c,uri:i,...o}),e[6]=o,e[7]=c,e[8]=i,e[9]=d):d=e[9],d}function Wt(r){const e=F.c(4);if(r.orgSlug&&r.connectionId){let i;return e[0]!==r?(i=b.jsx(Bt,{...r,orgSlug:r.orgSlug,connectionId:r.connectionId}),e[0]=r,e[1]=i):i=e[1],i}let o;return e[2]!==r?(o=b.jsx($t,{...r}),e[2]=r,e[3]=o):o=e[3],o}const Kt={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function Zt(r){if(!(r==null||typeof r!="object"))try{return ft({_meta:r})}catch{return}}export{Wt as M,Kt as a,Zt as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,D as f,q as P,K as m,k as K}from"./index-
|
|
1
|
+
import{c as d,D as f,q as P,K as m,k as K}from"./index-CXy6rN6i.js";import{u as S,c as T}from"./studio-tools-C-Eel15b.js";function g(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await T(s,"AI_PROVIDER_KEY_LIST",{})}}function E(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:r}=P(l);return r}function R(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=g(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function p(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let r;e[3]!==s||e[4]!==i?(r=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let n;e[6]!==t||e[7]!==l||e[8]!==r?(n={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=n):n=e[9];const{data:a,isLoading:_}=K(n);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==t||e[7]!==l?(r={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=r):r=e[8];const{data:n}=P(r);let a;return e[9]!==n?.models?(a=n?.models??[],e[9]=n?.models,e[10]=a):a=e[10],a}export{g as a,p as b,E as c,A as d,R as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,D as U,K as T,k as I,m as x,d as y,t as m}from"./index-
|
|
1
|
+
import{c as D,D as U,K as T,k as I,m as x,d as y,t as m}from"./index-CXy6rN6i.js";import{S as z,u as J}from"./use-mcp-client-CRWIqSWI.js";import{u as k}from"./studio-tools-C-Eel15b.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=D.c(12),{org:s}=U(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],I(r)}function it(t){const e=D.c(9),{org:s}=U(),l=k();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],I(n)}function ot(t){const e=D.c(10),{org:s}=U(),l=k();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],I(o)}function at(t,e){const s=D.c(12),{org:l}=U(),a=k();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],I(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=D.c(64),{org:e}=U(),s=k(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const q=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const Q=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const j=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==q||t[57]!==j||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==Q?(M={create:q,update:Q,remove:j,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=q,t[57]=j,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=Q,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,D as m,k as g,K as p}from"./index-
|
|
1
|
+
import{c as u,D as m,k as g,K as p}from"./index-CXy6rN6i.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a}from"./differenceInSeconds-NQ4PDo0z.js";import{c as u,r as f}from"./index-
|
|
1
|
+
import{d as a}from"./differenceInSeconds-NQ4PDo0z.js";import{c as u,r as f}from"./index-CXy6rN6i.js";function p(r){const t=a(new Date,r);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function g(r){if(r==null||r==="")return null;const t=r instanceof Date?r.getTime():Date.parse(r);return Number.isFinite(t)?t:null}function h(r,t){const e=t-r;return e>0?e:0}function M(r){if(r<60)return`${r.toFixed(1)}s`;const t=Math.round(r%60*10)/10,e=t>=60?1:0;return`${Math.floor(r/60)+e}m ${(e?0:t).toFixed(1)}s`}const s=new Map;function i(r){let t=s.get(r);return t||(t={tick:0,subscribers:new Set,intervalId:null},s.set(r,t)),t}function l(r,t){const e=i(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.tick+=1;for(const n of e.subscribers)n()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function $(r){const t=u.c(3),e=r===void 0?6e4:r;let n,o;return t[0]!==e?(n=c=>l(e,c),o=()=>i(e).tick,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),f.useSyncExternalStore(n,o,m)}function m(){return 0}export{M as a,h as c,p as f,g as t,$ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q,c as v,m as b,d as F,
|
|
1
|
+
import{q,c as v,m as b,d as F,aK as x,t as _}from"./index-CXy6rN6i.js";function K(e,s,o){const t=[];if(e?.trim()){const n=e.trim(),r=o.map(a=>({field:[String(a)],operator:"contains",value:n}));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 n of s)t.push({field:[n.column],operator:"eq",value:n.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function Q(e,s,o){const t=e??o,n=s??"desc";return[{field:[String(t)],direction:n}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function k(e,s,o,t){const n=s.toUpperCase(),r=`COLLECTION_${n}_GET`;return{queryKey:x.collectionItem(t,e,"",n,o??""),queryFn:async()=>{if(!o)return{item:null};const a=await t.callTool({name:r,arguments:{id:o}});return O(a)},staleTime:6e4}}function j(e,s,o,t){const n=v.c(5);let r;n[0]!==t||n[1]!==s||n[2]!==o||n[3]!==e?(r=k(e,s,o,t),n[0]=t,n[1]=s,n[2]=o,n[3]=e,n[4]=r):r=n[4];const{data:a}=q(r);return a?.item??null}const D={structuredContent:{items:[]},isError:!1};function z(e,s,o,t={}){const{searchTerm:n,filters:r,sortKey:a,sortDirection:L,searchFields:S=["title","description"],defaultSortKey:h="updated_at",pageSize:g=100,additionalToolArgs:c}=t,l=s.toUpperCase(),f=`COLLECTION_${l}_LIST`,p=K(n,r,S),T=Q(a,L,h),u={...p&&{where:p},...T&&{orderBy:T},limit:g,offset:0,...c},m=JSON.stringify(u),C=x.collectionList(o,e,"",l,m),{data:w}=q({queryKey:C,queryFn:async()=>o?await o.callTool({name:f,arguments:u}):D,staleTime:3e4,retry:!1,select:d=>O(d??{})?.items??[]});return w}function G(e,s,o){const t=v.c(34),n=b();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,L=`COLLECTION_${a}_CREATE`,S=`COLLECTION_${a}_UPDATE`,h=`COLLECTION_${a}_DELETE`;let g;t[2]!==n||t[3]!==e||t[4]!==a?(g=()=>{n.invalidateQueries({predicate:E=>{const i=E.queryKey;return i[1]===e&&i[3]==="collection"&&i[4]===a}})},t[2]=n,t[3]=e,t[4]=a,t[5]=g):g=t[5];const c=g;let l;t[6]!==o||t[7]!==L?(l=async E=>{const i=await o.callTool({name:L,arguments:{data:E}});if(i.isError)throw new Error(Array.isArray(i.content)?i.content[0]?.text:String(i.content));return O(i).item},t[6]=o,t[7]=L,t[8]=l):l=t[8];let f;t[9]!==c?(f=()=>{c(),_.success("Item created successfully")},t[9]=c,t[10]=f):f=t[10];let p;t[11]!==l||t[12]!==f?(p={mutationFn:l,onSuccess:f,onError:B},t[11]=l,t[12]=f,t[13]=p):p=t[13];const T=F(p);let u;t[14]!==o||t[15]!==S?(u=async E=>{const{id:i,data:A}=E,U=await o.callTool({name:S,arguments:{id:i,data:A}});return O(U).item},t[14]=o,t[15]=S,t[16]=u):u=t[16];let m;t[17]!==c?(m=()=>{c(),_.success("Item updated successfully")},t[17]=c,t[18]=m):m=t[18];let C;t[19]!==u||t[20]!==m?(C={mutationFn:u,onSuccess:m,onError:R},t[19]=u,t[20]=m,t[21]=C):C=t[21];const w=F(C);let d;t[22]!==o||t[23]!==h?(d=async E=>{const i=await o.callTool({name:h,arguments:{id:E}});return O(i).item.id},t[22]=o,t[23]=h,t[24]=d):d=t[24];let y;t[25]!==c?(y=()=>{c(),_.success("Item deleted successfully")},t[25]=c,t[26]=y):y=t[26];let N;t[27]!==d||t[28]!==y?(N={mutationFn:d,onSuccess:y,onError:P},t[27]=d,t[28]=y,t[29]=N):N=t[29];const $=F(N);let I;return t[30]!==T||t[31]!==$||t[32]!==w?(I={create:T,update:w,delete:$},t[30]=T,t[31]=$,t[32]=w,t[33]=I):I=t[33],I}function P(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to delete item: ${s}`)}function R(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to update item: ${s}`)}function B(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to create item: ${s}`)}export{G as a,z as b,k as c,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,D as C}from"./index-
|
|
1
|
+
import{c as f,D as C}from"./index-CXy6rN6i.js";import{a as N,b as O,u as S}from"./use-collections-BhzLncHB.js";import{S as I,u as m}from"./use-mcp-client-CRWIqSWI.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.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 g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:I,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=m(a);return O(u.id,"CONNECTIONS",A,p)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:I,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=m(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:I,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=m(i);return N(o.id,"CONNECTIONS",n)}export{_ as a,x as b,E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,r as n}from"./index-
|
|
1
|
+
import{c as i,r as n}from"./index-CXy6rN6i.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),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{c as g}from"./index-CXy6rN6i.js";import{b as f}from"./use-virtual-mcp-7AWl-thI.js";import{k as p}from"./use-navigate-to-agent-DTqeD3lq.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 d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
package/dist/client/assets/{use-debounced-autosave-B4mbwJnu.js → use-debounced-autosave-DwyO4Yri.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-CXy6rN6i.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
|
package/dist/client/assets/{use-debounced-value-C6U3mliE.js → use-debounced-value-BGsbVLHA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r as n}from"./index-
|
|
1
|
+
import{c as m,r as n}from"./index-CXy6rN6i.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
|
package/dist/client/assets/{use-decopilot-events-CpQNzv3e.js → use-decopilot-events-B8-U5_6h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-CXy6rN6i.js";import{d as R,D as u}from"./decopilot-sse-pool-Chmwc1_x.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
|
package/dist/client/assets/{use-delete-connection-CqeuxO_6.js → use-delete-connection-yP5RphYi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,j as t,D as Q,m as J,r as M,t as F,
|
|
1
|
+
import{c as H,j as t,D as Q,m as J,r as M,t as F,bd as P,be as Y}from"./index-CXy6rN6i.js";import{c as I,b as L,d as R,A as q,e as U,g as k,a as K,f as $}from"./alert-dialog-DMWXmTGp.js";import{u as z}from"./studio-tools-C-Eel15b.js";function W(T){const e=H.c(41),{deleteState:s,cancelDelete:c,confirmDelete:i,confirmForceDelete:l}=T,N=s.mode==="deleting";let r;e[0]!==c?(r=w=>{w||c()},e[0]=c,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(I,{children:"Delete Connection?"}),e[2]=f):f=e[2];const S=s.mode==="deleting"&&s.connection.title;let u;e[3]!==S?(u=t.jsxs(L,{children:[f,t.jsxs(R,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:S}),"."]})]}),e[3]=S,e[4]=u):u=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(q,{children:"Cancel"}),e[5]=E):E=e[5];let h;e[6]!==i?(h=t.jsxs(U,{children:[E,t.jsx(k,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=i,e[7]=h):h=e[7];let n;e[8]!==u||e[9]!==h?(n=t.jsxs(K,{children:[u,h]}),e[8]=u,e[9]=h,e[10]=n):n=e[10];let o;e[11]!==N||e[12]!==r||e[13]!==n?(o=t.jsx($,{open:N,onOpenChange:r,children:n}),e[11]=N,e[12]=r,e[13]=n,e[14]=o):o=e[14];const a=s.mode==="force-deleting";let d;e[15]!==c?(d=w=>{w||c()},e[15]=c,e[16]=d):d=e[16];let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(I,{children:"Connection Used by Agents"}),e[17]=m):m=e[17];const _=s.mode==="force-deleting"&&s.connection.title;let g;e[18]!==_?(g=t.jsx("span",{className:"font-medium text-foreground",children:_}),e[18]=_,e[19]=g):g=e[19];const A=s.mode==="force-deleting"&&s.agentNames;let x;e[20]!==A?(x=t.jsx("span",{className:"font-medium text-foreground",children:A}),e[20]=A,e[21]=x):x=e[21];let C;e[22]!==g||e[23]!==x?(C=t.jsxs("p",{children:["The connection"," ",g," ","is currently used by the following agent(s):"," ",x,"."]}),e[22]=g,e[23]=x,e[24]=C):C=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=t.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]=O):O=e[25];let D;e[26]!==C?(D=t.jsxs(L,{children:[m,t.jsx(R,{asChild:!0,children:t.jsxs("div",{children:[C,O]})})]}),e[26]=C,e[27]=D):D=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(q,{children:"Cancel"}),e[28]=b):b=e[28];let j;e[29]!==l?(j=t.jsxs(U,{children:[b,t.jsx(k,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=j):j=e[30];let p;e[31]!==D||e[32]!==j?(p=t.jsxs(K,{children:[D,j]}),e[31]=D,e[32]=j,e[33]=p):p=e[33];let y;e[34]!==a||e[35]!==d||e[36]!==p?(y=t.jsx($,{open:a,onOpenChange:d,children:p}),e[34]=a,e[35]=d,e[36]=p,e[37]=y):y=e[37];let v;return e[38]!==y||e[39]!==o?(v=t.jsxs(t.Fragment,{children:[o,y]}),e[38]=y,e[39]=o,e[40]=v):v=e[40],v}function X({onSuccess:T}={}){const{org:e}=Q(),s=J(),c=z(),[i,l]=M.useState({mode:"idle"}),N=()=>{s.invalidateQueries({predicate:n=>{const o=n.queryKey;return o[1]===e.id&&o[3]==="collection"&&o[4]==="CONNECTIONS"}})},r=n=>{P(n),s.invalidateQueries({predicate:o=>o.queryKey[1]===Y&&o.queryKey[3]===n})},f=n=>{N(),r(n),F.success("Connection deleted successfully"),l({mode:"idle"}),T?.()};return{deleteState:i,requestDelete:n=>{l({mode:"deleting",connection:n})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(i.mode!=="deleting")return;const n=i.connection;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n.id}),f(n.id)}catch(o){const a=o instanceof Error?o.message:String(o),d=a.replace(/^Error:\s*/,"");try{const m=JSON.parse(d);if(m.code==="CONNECTION_IN_USE"&&m.agentNames){l({mode:"force-deleting",connection:n,agentNames:m.agentNames.map(_=>`"${_}"`).join(", ")});return}}catch{}F.error(`Failed to delete connection: ${a}`)}},confirmForceDelete:async()=>{if(i.mode!=="force-deleting")return;const n=i.connection.id;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n,force:!0}),f(n)}catch(o){const a=o instanceof Error?o.message:String(o);F.error(`Failed to delete connection: ${a}`)}}}}export{W as D,X as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,D as c,K as r,q as y,m as C,d,k as F}from"./index-
|
|
1
|
+
import{c as u,D as c,K as r,q as y,m as C,d,k as F}from"./index-CXy6rN6i.js";import{u as f}from"./studio-tools-C-Eel15b.js";function E(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=y(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],F(s)}function q(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_CREATE",{...a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}function _(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_DELETE",{id:a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}export{I as a,q as b,_ as c,E as u};
|
package/dist/client/assets/{use-infinite-scroll-BX1nHHVY.js → use-infinite-scroll-CkXtceVR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{as as d,dE as l,dF as v,r as i}from"./index-CXy6rN6i.js";var p=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,u=super.createResult(e,t),{isFetching:r,isRefetching:h,isError:a,isRefetchError:g}=u,s=n.fetchMeta?.fetchMore?.direction,o=a&&s==="forward",P=r&&s==="forward",c=a&&s==="backward",f=r&&s==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:o,isFetchingNextPage:P,isFetchPreviousPageError:c,isFetchingPreviousPage:f,isRefetchError:g&&!o&&!c,isRefetching:h&&!P&&!f}}};function b(e,t,n=!1,u){const r=i.useRef(null),h=i.useRef(null),a=i.useRef(e),g=i.useRef(t),s=i.useRef(n),o=i.useRef(u);a.current=e,g.current=t,s.current=n,o.current=u;const[P]=i.useState(()=>c=>{h.current=c,r.current&&(r.current.disconnect(),r.current=null),c&&queueMicrotask(()=>{if(h.current!==c)return;const f=new IntersectionObserver(R=>{R[0]?.isIntersecting&&g.current&&!s.current&&a.current()},{root:o.current?.current??null,rootMargin:"0px 0px 200px 0px"});f.observe(c),r.current=f})});return P}export{p as I,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,D as N,K as y,k as _,m as A,d as I,t as q}from"./index-
|
|
1
|
+
import{c as g,D as N,K as y,k as _,m as A,d as I,t as q}from"./index-CXy6rN6i.js";import{a as S}from"./use-capability-AkUZCu97.js";import{u as O}from"./studio-tools-C-Eel15b.js";function F(){const e=g.c(10),{org:r}=N(),u=O(),{capabilities:a,isPrivileged:c}=S(),d=c||!!a["members:manage"];let t;e[0]!==r.id?(t=y.organizationJoinRequests(r.id),e[0]=r.id,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=u,e[3]=s):s=e[3];const i=!!r.id&&d;let n;e[4]!==t||e[5]!==s||e[6]!==i?(n={queryKey:t,queryFn:s,enabled:i},e[4]=t,e[5]=s,e[6]=i,e[7]=n):n=e[7];const{data:l}=_(n);let o;return e[8]!==l?.requests?(o=l?.requests??[],e[8]=l?.requests,e[9]=o):o=e[9],o}function K(){const e=g.c(21),{org:r,locator:u}=N(),a=O(),c=A();let d;e[0]!==u||e[1]!==r||e[2]!==c?(d=()=>{c.invalidateQueries({queryKey:y.organizationJoinRequests(r.id)}),c.invalidateQueries({queryKey:y.members(u)})},e[0]=u,e[1]=r,e[2]=c,e[3]=d):d=e[3];const t=d;let s;e[4]!==a?(s=R=>a.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:R}),e[4]=a,e[5]=s):s=e[5];let i;e[6]!==t?(i=()=>{t(),q.success("Request approved")},e[6]=t,e[7]=i):i=e[7];let n;e[8]!==s||e[9]!==i?(n={mutationFn:s,onSuccess:i,onError:v},e[8]=s,e[9]=i,e[10]=n):n=e[10];const l=I(n);let o;e[11]!==a?(o=R=>a.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:R}),e[11]=a,e[12]=o):o=e[12];let f;e[13]!==t?(f=()=>{t(),q.success("Request denied")},e[13]=t,e[14]=f):f=e[14];let m;e[15]!==o||e[16]!==f?(m={mutationFn:o,onSuccess:f,onError:T},e[15]=o,e[16]=f,e[17]=m):m=e[17];const E=I(m);let p;return e[18]!==l||e[19]!==E?(p={approve:l,deny:E},e[18]=l,e[19]=E,e[20]=p):p=e[20],p}function T(e){return q.error(e instanceof Error?e.message:"Failed to deny")}function v(e){return q.error(e instanceof Error?e.message:"Failed to approve")}export{F as a,K as u};
|