@decocms/mesh 2.123.2 → 2.123.4

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.
Files changed (182) hide show
  1. package/dist/client/assets/{AlertCircle-BpvTeRWZ.js → AlertCircle-DiDJuuO7.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-KPbgj_fe.js → AlertOctagon-T8X2xR5Y.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-BQr7kJDW.js → AlertTriangle-BR7J9Jvh.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-6opPa7zy.js → ArrowLeft-CZ4ZZXqO.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Bt1al9WB.js → ArrowUp-CBTnQfpb.js} +1 -1
  6. package/dist/client/assets/{Check-COoTrHCh.js → Check-ebSdGxZp.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Dif3Jy99.js → CheckCircle-BX10u03U.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-B8UrJ9b0.js → CheckDone01-BKZeNjYI.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-BXTAAE0g.js → CheckVerified02-Bc-TzDsw.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-5ys0844E.js → ChevronDown-BxrIQ2Hg.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-B8put0eN.js → ChevronRight-D1zpPr9G.js} +1 -1
  12. package/dist/client/assets/{Clock-lQFxjk3U.js → Clock-ByTlM-Ae.js} +1 -1
  13. package/dist/client/assets/{Code01-BZ3OnS6C.js → Code01-62o0ASv5.js} +1 -1
  14. package/dist/client/assets/{Container-CYXpgUH-.js → Container-Cr2TCDTS.js} +1 -1
  15. package/dist/client/assets/{Copy01-RhM6GPKh.js → Copy01-CfVZSokb.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-DQ3l0uK3.js → Dataflow03-CEYvQeh9.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-CXUsxuDx.js → DotsHorizontal-D_wKOZTi.js} +1 -1
  18. package/dist/client/assets/{DotsVertical--UCmDvo-.js → DotsVertical-BNJZVkhj.js} +1 -1
  19. package/dist/client/assets/{Download01-RzJvHlJ-.js → Download01-CMusldak.js} +1 -1
  20. package/dist/client/assets/{Edit01-pUCJ7HNy.js → Edit01-BySGjbs-.js} +1 -1
  21. package/dist/client/assets/{Eye-Dk7SbACo.js → Eye-Wh_bq-Y4.js} +1 -1
  22. package/dist/client/assets/{File02-BuUCkwHe.js → File02-Drnn3tnJ.js} +1 -1
  23. package/dist/client/assets/{File06-BiAuw-uA.js → File06-CL04kImU.js} +1 -1
  24. package/dist/client/assets/{FilterLines-DAGdGqpc.js → FilterLines-DgwYDfry.js} +1 -1
  25. package/dist/client/assets/{Globe01-BW-Ba2wM.js → Globe01-BMVTN5_w.js} +1 -1
  26. package/dist/client/assets/{Globe02-JrHK1B-m.js → Globe02-BD3ZCWms.js} +1 -1
  27. package/dist/client/assets/{Grid01-B0TbJ6AU.js → Grid01-BWcrgmNx.js} +1 -1
  28. package/dist/client/assets/{Hash02-CjnFXmXE.js → Hash02-Dqi3bcQt.js} +1 -1
  29. package/dist/client/assets/{Home02-DygdOIOt.js → Home02-lTWiIHtK.js} +1 -1
  30. package/dist/client/assets/{Image01-CjAt3NIh.js → Image01-DcX1niB5.js} +1 -1
  31. package/dist/client/assets/{Inbox01-iihr_vaX.js → Inbox01-8_gDqife.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-DgqWMR4R.js → InfoCircle-BKPaDpeK.js} +1 -1
  33. package/dist/client/assets/{Key01-CMhaJPaL.js → Key01-CyWdmMm6.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-zi5yhvLt.js → LinkExternal01-DPNrtGWV.js} +1 -1
  35. package/dist/client/assets/{List-BIF-EvrZ.js → List-DqeEnxu3.js} +1 -1
  36. package/dist/client/assets/{Loading01-BdPk5R9C.js → Loading01-BZRHfswB.js} +1 -1
  37. package/dist/client/assets/{Lock01-CPquSRx9.js → Lock01-BDqkVPGz.js} +1 -1
  38. package/dist/client/assets/{Pin01-CR3q25pP.js → Pin01-BDMJN64-.js} +1 -1
  39. package/dist/client/assets/{Play-C4BzmLav.js → Play-BKXV9SNy.js} +1 -1
  40. package/dist/client/assets/{Plus-BJkQ4qvs.js → Plus-YlJja9E2.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-CMJUa0vf.js → RefreshCcw01-Ci0qepHw.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-CwUk_ICv.js → RefreshCw01-Sv3Ciq4-.js} +1 -1
  43. package/dist/client/assets/{Rows03-CaPKdXTG.js → Rows03-DjbwBGBI.js} +1 -1
  44. package/dist/client/assets/{Save01-pTgRxfLl.js → Save01-CUHpjboy.js} +1 -1
  45. package/dist/client/assets/{SearchMd-BkraDgIf.js → SearchMd-CdY2Qz31.js} +1 -1
  46. package/dist/client/assets/{Settings01-JN6f9_qk.js → Settings01-hHMZndAB.js} +1 -1
  47. package/dist/client/assets/{Shield01-MwzSK_IW.js → Shield01-BC6B_xBt.js} +1 -1
  48. package/dist/client/assets/{Terminal-D0agZcO6.js → Terminal-D2rGQta9.js} +1 -1
  49. package/dist/client/assets/{Tool01-VRdaPnbs.js → Tool01-8K3JOGke.js} +1 -1
  50. package/dist/client/assets/{Trash01-BS69Rn26.js → Trash01-DjSET-_p.js} +1 -1
  51. package/dist/client/assets/{Upload01-bzy9bCNi.js → Upload01-C0CPwbYb.js} +1 -1
  52. package/dist/client/assets/{Users03-13i8se4V.js → Users03-BiJcw06H.js} +1 -1
  53. package/dist/client/assets/{XCircle-Bnl7RwSj.js → XCircle-oJlXTAnn.js} +1 -1
  54. package/dist/client/assets/{XClose-CIsPKYhP.js → XClose-CNjsPY9p.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-eu9uGyuz.js → agent-connections-preview-CyTgEjXK.js} +1 -1
  56. package/dist/client/assets/{agent-detail-wValyywk.js → agent-detail-9DFcapAu.js} +1 -1
  57. package/dist/client/assets/{agents-BQf_kwYr.js → agents-4gtiAnuv.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-CTIXpfNf.js → alert-dialog-DG1mgLiN.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-Co8IiazS.js → auth-catchall-BSjXqHGj.js} +1 -1
  60. package/dist/client/assets/{avatar-CUhi-qzb.js → avatar-CLzAk7bk.js} +1 -1
  61. package/dist/client/assets/{badge-BAIkBZff.js → badge-zj5rJqFG.js} +1 -1
  62. package/dist/client/assets/{binder-DZp12Y3n.js → binder-Yx0eVQL7.js} +1 -1
  63. package/dist/client/assets/{breadcrumb-C2msqz1b.js → breadcrumb-p3FP4YzT.js} +1 -1
  64. package/dist/client/assets/{button-BpEnz7t9.js → button-BlFVi9O-.js} +1 -1
  65. package/dist/client/assets/{card-DILUA5lp.js → card-C5XZXHnb.js} +1 -1
  66. package/dist/client/assets/{chart-yT8TpKTO.js → chart-CECGc95G.js} +1 -1
  67. package/dist/client/assets/{checkbox-DsMm03Et.js → checkbox-C81GTltZ.js} +1 -1
  68. package/dist/client/assets/{circle-alert-ld-jNaFW.js → circle-alert-DTrbbil0.js} +1 -1
  69. package/dist/client/assets/{collection-detail-Bps6AdGb.js → collection-detail-DC6lEGsR.js} +1 -1
  70. package/dist/client/assets/{collection-tab-Cb2OKmOU.js → collection-tab-dYtQ3dOc.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-BcYBtIFU.js → collection-table-wrapper-D3UQPYYs.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-CJN7uriQ.js → collection-tabs-DXae7bMN.js} +1 -1
  73. package/dist/client/assets/{command-DFf8Hw6Q.js → command-C0Lk3OoX.js} +1 -1
  74. package/dist/client/assets/{connect-CjDjmgo0.js → connect-B0zgap2s.js} +1 -1
  75. package/dist/client/assets/{connection-card-Cxm32ifq.js → connection-card-Bfx8qlqL.js} +1 -1
  76. package/dist/client/assets/{connection-detail-3ns6XuoV.js → connection-detail-CFl60IV3.js} +1 -1
  77. package/dist/client/assets/{connections-DSBc-5jR.js → connections-40Z9p3na.js} +1 -1
  78. package/dist/client/assets/constants-0nWmzfAq.js +1 -0
  79. package/dist/client/assets/{constants-BoBHGSW8.js → constants-DS4O9R8r.js} +1 -1
  80. package/dist/client/assets/{context-KYYCma1O.js → context-CJpih0Aq.js} +2 -2
  81. package/dist/client/assets/{create-organization-dialog-pjo7W0nj.js → create-organization-dialog-BFIfEtVL.js} +1 -1
  82. package/dist/client/assets/{create-project-dialog-B6kkAgjA.js → create-project-dialog-D2mtQ7wt.js} +1 -1
  83. package/dist/client/assets/{deco-constants-DGRap-0f.js → deco-constants-B2fB4qCk.js} +1 -1
  84. package/dist/client/assets/{dialog-CKyGpmoE.js → dialog-BED3woG1.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-Df5G5zUr.js → dropdown-menu-Db2R0f6-.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-C7RtCIjV.js → dynamic-plugin-layout-BzLyvc2d.js} +1 -1
  87. package/dist/client/assets/{empty-state-BO_xpc7n.js → empty-state-CIZqXQMR.js} +1 -1
  88. package/dist/client/assets/{empty-state-CXRsSa_5.js → empty-state-DwKYfPjb.js} +1 -1
  89. package/dist/client/assets/{env-vars-editor-CWL7WVCl.js → env-vars-editor-CDWwUXgx.js} +1 -1
  90. package/dist/client/assets/{error-boundary-DKBJmhkm.js → error-boundary-DFWzxGF2.js} +1 -1
  91. package/dist/client/assets/{extract-connection-data-CVVFDhKc.js → extract-connection-data-1y_2LKN1.js} +1 -1
  92. package/dist/client/assets/{file-browser-DFvCuor8.js → file-browser-BLbb-Y8y.js} +2 -2
  93. package/dist/client/assets/{form-DW9viO4r.js → form-DdvC8UfL.js} +1 -1
  94. package/dist/client/assets/{grid-view-7qEPSoqU.js → grid-view-CqSeu3_O.js} +1 -1
  95. package/dist/client/assets/{home-BNkgmOcB.js → home-DlTcQ85K.js} +1 -1
  96. package/dist/client/assets/{index-ZJgHVjA9.js → index-6Tp9fsVX.js} +1 -1
  97. package/dist/client/assets/{index-42oFt7Vf.js → index-BG2jkRwM.js} +1 -1
  98. package/dist/client/assets/{index-CLnaj1R8.js → index-Bb5ajAZZ.js} +1 -1
  99. package/dist/client/assets/{index-C2ysDUMA.js → index-C5tdq0OE.js} +1 -1
  100. package/dist/client/assets/{index-DYSwonwp.js → index-CNFSBpm2.js} +1 -1
  101. package/dist/client/assets/{index-Dj3-TAFC.js → index-Chdo1wOf.js} +3 -3
  102. package/dist/client/assets/{index-LqsHIY-h.js → index-Cs9SJKB2.js} +1 -1
  103. package/dist/client/assets/{index-pyLbkMHd.js → index-D8_oQFvH.js} +1 -1
  104. package/dist/client/assets/{infiniteQueryObserver-CXT3S8iT.js → infiniteQueryObserver-DOxbID_2.js} +1 -1
  105. package/dist/client/assets/{input-BJdUVCMG.js → input-C2bYHqSZ.js} +1 -1
  106. package/dist/client/assets/{integration-icon-CitBcWGE.js → integration-icon-CHfvIBul.js} +1 -1
  107. package/dist/client/assets/{label-CLOKtxmE.js → label-Cz00Hk_C.js} +1 -1
  108. package/dist/client/assets/{layout-Bm2oJesN.js → layout-D8HdJww7.js} +1 -1
  109. package/dist/client/assets/{localstorage-keys-Bxhx_7VG.js → localstorage-keys-D6jY_B8O.js} +1 -1
  110. package/dist/client/assets/{login-C1DGsJab.js → login-B4sEC044.js} +1 -1
  111. package/dist/client/assets/{markdown-C6oZzbdV.js → markdown-W0glOUUc.js} +1 -1
  112. package/dist/client/assets/{mcp-oauth-BgGOZ6Yl.js → mcp-oauth-CxZiVIG0.js} +1 -1
  113. package/dist/client/assets/{mcp-server-card-Bs5CjNs8.js → mcp-server-card-MyE_33s4.js} +1 -1
  114. package/dist/client/assets/{mcp-server-detail-TYK4H4ys.js → mcp-server-detail-DPKP-AVk.js} +2 -2
  115. package/dist/client/assets/{members-Dtp6tHqv.js → members-C0wNcB0L.js} +1 -1
  116. package/dist/client/assets/{monitoring-D4yuvuET.js → monitoring-DnyUAZQs.js} +1 -1
  117. package/dist/client/assets/{monitoring-dashboard-edit-BhZoWvFY.js → monitoring-dashboard-edit-CeSLs60r.js} +1 -1
  118. package/dist/client/assets/{monitoring-dashboard-view-D3TquP25.js → monitoring-dashboard-view-CXYrse_E.js} +1 -1
  119. package/dist/client/assets/{oauth-callback-deuUTi00.js → oauth-callback-CtEIzTst.js} +1 -1
  120. package/dist/client/assets/{page-DOr5GIYN.js → page-BaeXPwI_.js} +1 -1
  121. package/dist/client/assets/{page-D2E5ZzCU.js → page-wIVLNXO6.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-TS8DmJJp.js → plugin-empty-state-C3dQRExn.js} +1 -1
  123. package/dist/client/assets/{plugin-empty-state-Bgs1lZLk.js → plugin-empty-state-CtOLvnau.js} +1 -1
  124. package/dist/client/assets/{plugin-header-BeCh7KII.js → plugin-header-BpYtnCvY.js} +1 -1
  125. package/dist/client/assets/{plugin-header-CBzycd5v.js → plugin-header-wMO8zy_s.js} +1 -1
  126. package/dist/client/assets/{popover-BvNaYtjG.js → popover-B4On8gSm.js} +1 -1
  127. package/dist/client/assets/{project-layout-DUPzxc2p.js → project-layout-1AjzWWMn.js} +1 -1
  128. package/dist/client/assets/{projects-list-BnTZ2oT-.js → projects-list-DNSZsINF.js} +1 -1
  129. package/dist/client/assets/{ranking-layout-CRWlaZ6i.js → ranking-layout-BgeMngBH.js} +1 -1
  130. package/dist/client/assets/{readme-viewer-BIh-4-st.js → readme-viewer-gb5hrmSg.js} +1 -1
  131. package/dist/client/assets/{registry-layout-DCY6UJG0.js → registry-layout-Cyki9u_h.js} +1 -1
  132. package/dist/client/assets/{registry-utils-fUWTJDy1.js → registry-utils-BL6Np0uD.js} +1 -1
  133. package/dist/client/assets/{reports-layout-D8otPyup.js → reports-layout-DImwy6ND.js} +1 -1
  134. package/dist/client/assets/{reset-password-B2xcsGcX.js → reset-password-ButVRXi9.js} +1 -1
  135. package/dist/client/assets/{resizable-B7M-KqaZ.js → resizable-DUdJ1A_O.js} +1 -1
  136. package/dist/client/assets/{save-actions-CnZBYHaQ.js → save-actions-BiCpAXjr.js} +1 -1
  137. package/dist/client/assets/{scroll-area-CK3Yk4ZG.js → scroll-area-C9Z4g4D3.js} +1 -1
  138. package/dist/client/assets/{select-D3Cqu_xI.js → select-DwyzrBGR.js} +1 -1
  139. package/dist/client/assets/{shell-layout-gULKyNae.js → shell-layout-BGf6BKNx.js} +1 -1
  140. package/dist/client/assets/{skeleton-BEJPNsmx.js → skeleton-DdrlSfda.js} +1 -1
  141. package/dist/client/assets/{spinner-DP-rnGOg.js → spinner-DeIV40-d.js} +1 -1
  142. package/dist/client/assets/{store-invite-7kH88tcd.js → store-invite-DHfus7Si.js} +1 -1
  143. package/dist/client/assets/{switch-Dc13mBjk.js → switch-BW_XeGpN.js} +1 -1
  144. package/dist/client/assets/{table-5zDBkIKt.js → table-N5hQy-1m.js} +1 -1
  145. package/dist/client/assets/{tasks-VFkq3Gln.js → tasks-CKkoq9mO.js} +1 -1
  146. package/dist/client/assets/{textarea-DQjt4TcB.js → textarea-B5CEImaf.js} +1 -1
  147. package/dist/client/assets/{time-range-picker-DlLbbTWq.js → time-range-picker-B3M_kZtN.js} +1 -1
  148. package/dist/client/assets/{toggle-group-7v5RUGzy.js → toggle-group-k8q-T2Qa.js} +1 -1
  149. package/dist/client/assets/{tools-list-CYXwR1B4.js → tools-list-TXvbi7bf.js} +1 -1
  150. package/dist/client/assets/{tooltip-jCrVkUGG.js → tooltip-BWW8lvJo.js} +1 -1
  151. package/dist/client/assets/{topbar-portal-BgsY0Tym.js → topbar-portal-m9wB0x-E.js} +1 -1
  152. package/dist/client/assets/{typewriter-title-CqQ7vz03.js → typewriter-title-DcVIzze1.js} +1 -1
  153. package/dist/client/assets/{use-binding-D1PhjEYd.js → use-binding-DT0OPEEL.js} +1 -1
  154. package/dist/client/assets/{use-connection-CU2MpSPl.js → use-connection-O4z2Mc_F.js} +1 -1
  155. package/dist/client/assets/{use-copy-52ScM36o.js → use-copy-Drx5AGFH.js} +1 -1
  156. package/dist/client/assets/{use-create-virtual-mcp-Dgc9LRMA.js → use-create-virtual-mcp-CZu2JnDv.js} +1 -1
  157. package/dist/client/assets/{use-deco-chat-open-DEcM1zJp.js → use-deco-chat-open-Qq9AtQ8h.js} +1 -1
  158. package/dist/client/assets/{use-install-from-registry-D0ma5MSu.js → use-install-from-registry-Dc84s0lp.js} +1 -1
  159. package/dist/client/assets/{use-list-state-CHfyM4gv.js → use-list-state-DQM_pDDC.js} +1 -1
  160. package/dist/client/assets/{use-llm-CeHDiSJa.js → use-llm-Z9GIoSzc.js} +1 -1
  161. package/dist/client/assets/{use-mcp-prompts-DKsdNnZ7.js → use-mcp-prompts-uD1aNW_g.js} +1 -1
  162. package/dist/client/assets/{use-mcp-tools-D1hnuDSz.js → use-mcp-tools-B8wkpbTs.js} +1 -1
  163. package/dist/client/assets/{use-mobile-Dn42c33D.js → use-mobile-ziAtnWz2.js} +1 -1
  164. package/dist/client/assets/{use-organization-settings-D7m45jWB.js → use-organization-settings-BJEr33WT.js} +1 -1
  165. package/dist/client/assets/{use-project-BPC08iXP.js → use-project-Dz1PHkz5.js} +1 -1
  166. package/dist/client/assets/{use-settings-modal-Ddi5OSQC.js → use-settings-modal-CYH_HZlL.js} +1 -1
  167. package/dist/client/assets/{use-view-mode-D6ejd-aW.js → use-view-mode-CRJUL6S-.js} +1 -1
  168. package/dist/client/assets/{use-virtual-mcp-BSB4fi0P.js → use-virtual-mcp-BateG3is.js} +1 -1
  169. package/dist/client/assets/useInfiniteQuery-BHuahm2t.js +1 -0
  170. package/dist/client/assets/{useMutation-DXvszu1D.js → useMutation-BTkDU0tp.js} +1 -1
  171. package/dist/client/assets/useQuery-C0AkqYB7.js +1 -0
  172. package/dist/client/assets/useSuspenseInfiniteQuery-DPaJK1nP.js +1 -0
  173. package/dist/client/assets/{workflow-tlR1uEKO.js → workflow-CTPlOYoh.js} +1 -1
  174. package/dist/client/index.html +1 -1
  175. package/dist/server/cli.js +211 -211
  176. package/dist/server/migrate.js +184 -184
  177. package/dist/server/server.js +190 -190
  178. package/package.json +1 -1
  179. package/dist/client/assets/constants-BU0VInXj.js +0 -1
  180. package/dist/client/assets/useInfiniteQuery-CrVQg4J6.js +0 -1
  181. package/dist/client/assets/useQuery-7VkeRbRj.js +0 -1
  182. package/dist/client/assets/useSuspenseInfiniteQuery-BUl5uhPk.js +0 -1
@@ -1 +1 @@
1
- import{a as A}from"./binder-DZp12Y3n.js";import{b7 as I,E as O,o as t,s as e,b8 as g,aj as c,b9 as l,ba as M,bb as D,bc as s,ak as C,bd as m,be as S,bf as n,bg as _,bh as k,bi as w,bj as B,bk as U,bl as v}from"./index-Dj3-TAFC.js";const G=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=I("assistant",G),W=[...F],y=k(()=>m([w(),e(),s(),S(),g(e(),y),c(y)])),h=g(e(),g(e(),y)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),R=t({type:n("text"),text:e().describe("The text content"),providerOptions:h}),j=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),q=e().describe("File data as URL string"),x=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:q,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:h}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:h}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:h}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Y=m([t({type:n("text"),value:e()}),t({type:n("json"),value:y}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:y}),t({type:n("content"),value:c(m([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),t({type:n("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),E=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:Y.describe("Result of the tool call"),result:_().describe("Unknown result of the tool call"),providerOptions:h}),H=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:S().optional().describe("Whether the result is an error or error message"),providerExecuted:S().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),X=m([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:h}),Q=t({role:n("user"),content:c(m([R,x])).describe("User message content parts (text or file)"),providerOptions:h}),ee=t({role:n("assistant"),content:c(m([R,x,J,z,E])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:h}),te=t({role:n("tool"),content:c(E).describe("Tool message content (tool results)"),providerOptions:h}),oe=m([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ne=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:m([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:S().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ie=t({content:c(m([j,$,K,V,H,X])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:D({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:M().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:g(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:g(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=t({supportedUrls:g(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ne}),se=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=I("llm",se,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ie},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:g(e(),_()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],L={LLMS:ce,WORKFLOW:U,WORKFLOW_EXECUTION:B,ASSISTANTS:W,MCP:pe};function ue(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return v(a.inputSchema)}catch(r){return console.error(`Failed to convert input schema for ${a.name}:`,r),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return v(a.outputSchema)}catch(r){return console.error(`Failed to convert output schema for ${a.name}:`,r),t({})}})():t({})}))}function me(o,a){const r=o.tools;if(!r||r.length===0)return!1;const i=r.map(p=>({name:p.name,inputSchema:p.inputSchema})),d=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return A(d).isImplementedBy(i)}function Ie({connections:o,binding:a}){const r=(()=>{if(a){if(typeof a=="string"){const i=a.toUpperCase(),d=L[i];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(L).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return ue(a)}})();return o?r?o.filter(i=>me(i,r)):o:[]}function he(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,r=[];for(const i of o){const d=i.name.match(a);d?.[1]&&r.push(d[1])}return r}function be(o){return!o||o.length===0?!1:o.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function fe(o,a){const i=o.find(u=>u.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(i&&typeof i=="object"&&"data"in i)return i.data;const b=o.find(u=>u.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(b&&typeof b=="object"&&"data"in b)return b.data;const T=o.find(u=>u.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(T&&typeof T=="object"&&"items"in T){const u=T.items;if(u.items)return u.items}}function ge(o,a){const r=a.toUpperCase();return{hasCreateTool:o.some(i=>i.name===`COLLECTION_${r}_CREATE`),hasUpdateTool:o.some(i=>i.name===`COLLECTION_${r}_UPDATE`),hasDeleteTool:o.some(i=>i.name===`COLLECTION_${r}_DELETE`)}}function Se(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const r=[];for(const i of a)try{const d=I(i.toLowerCase(),O,{readOnly:!0}),b=o.map(f=>({name:f.name,inputSchema:f.inputSchema})),p=d.map(f=>({name:f.name,inputSchema:f.inputSchema}));if(A(p).isImplementedBy(b)){const f=ge(o,i);r.push({name:i,displayName:he(i),schema:fe(o,i),...f})}}catch{}return r}function Oe(o){return Se(o?.tools??null)}function Ce(o){return o?o.filter(a=>P(a.tools).includes("REGISTRY_APP")||be(a.tools)):[]}export{Ie as a,Oe as b,me as c,Ce as u};
1
+ import{a as A}from"./binder-Yx0eVQL7.js";import{b7 as I,E as O,o as t,s as e,b8 as g,aj as c,b9 as l,ba as M,bb as D,bc as s,ak as C,bd as m,be as S,bf as n,bg as _,bh as k,bi as w,bj as B,bk as U,bl as v}from"./index-Chdo1wOf.js";const G=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=I("assistant",G),W=[...F],y=k(()=>m([w(),e(),s(),S(),g(e(),y),c(y)])),h=g(e(),g(e(),y)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),R=t({type:n("text"),text:e().describe("The text content"),providerOptions:h}),j=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),q=e().describe("File data as URL string"),x=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:q,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:h}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:h}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:h}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Y=m([t({type:n("text"),value:e()}),t({type:n("json"),value:y}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:y}),t({type:n("content"),value:c(m([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),t({type:n("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),E=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:Y.describe("Result of the tool call"),result:_().describe("Unknown result of the tool call"),providerOptions:h}),H=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:S().optional().describe("Whether the result is an error or error message"),providerExecuted:S().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),X=m([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:h}),Q=t({role:n("user"),content:c(m([R,x])).describe("User message content parts (text or file)"),providerOptions:h}),ee=t({role:n("assistant"),content:c(m([R,x,J,z,E])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:h}),te=t({role:n("tool"),content:c(E).describe("Tool message content (tool results)"),providerOptions:h}),oe=m([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ne=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:m([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:S().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ie=t({content:c(m([j,$,K,V,H,X])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:D({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:M().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:g(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:g(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=t({supportedUrls:g(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ne}),se=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=I("llm",se,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ie},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:g(e(),_()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],L={LLMS:ce,WORKFLOW:U,WORKFLOW_EXECUTION:B,ASSISTANTS:W,MCP:pe};function ue(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return v(a.inputSchema)}catch(r){return console.error(`Failed to convert input schema for ${a.name}:`,r),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return v(a.outputSchema)}catch(r){return console.error(`Failed to convert output schema for ${a.name}:`,r),t({})}})():t({})}))}function me(o,a){const r=o.tools;if(!r||r.length===0)return!1;const i=r.map(p=>({name:p.name,inputSchema:p.inputSchema})),d=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return A(d).isImplementedBy(i)}function Ie({connections:o,binding:a}){const r=(()=>{if(a){if(typeof a=="string"){const i=a.toUpperCase(),d=L[i];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(L).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return ue(a)}})();return o?r?o.filter(i=>me(i,r)):o:[]}function he(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,r=[];for(const i of o){const d=i.name.match(a);d?.[1]&&r.push(d[1])}return r}function be(o){return!o||o.length===0?!1:o.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function fe(o,a){const i=o.find(u=>u.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(i&&typeof i=="object"&&"data"in i)return i.data;const b=o.find(u=>u.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(b&&typeof b=="object"&&"data"in b)return b.data;const T=o.find(u=>u.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(T&&typeof T=="object"&&"items"in T){const u=T.items;if(u.items)return u.items}}function ge(o,a){const r=a.toUpperCase();return{hasCreateTool:o.some(i=>i.name===`COLLECTION_${r}_CREATE`),hasUpdateTool:o.some(i=>i.name===`COLLECTION_${r}_UPDATE`),hasDeleteTool:o.some(i=>i.name===`COLLECTION_${r}_DELETE`)}}function Se(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const r=[];for(const i of a)try{const d=I(i.toLowerCase(),O,{readOnly:!0}),b=o.map(f=>({name:f.name,inputSchema:f.inputSchema})),p=d.map(f=>({name:f.name,inputSchema:f.inputSchema}));if(A(p).isImplementedBy(b)){const f=ge(o,i);r.push({name:i,displayName:he(i),schema:fe(o,i),...f})}}catch{}return r}function Oe(o){return Se(o?.tools??null)}function Ce(o){return o?o.filter(a=>P(a.tools).includes("REGISTRY_APP")||be(a.tools)):[]}export{Ie as a,Oe as b,me as c,Ce as u};
@@ -1 +1 @@
1
- import{n as P,c as I,m as Q,t as L,u as x}from"./index-Dj3-TAFC.js";import{u as v}from"./useMutation-DXvszu1D.js";import{K,a as q,u as U}from"./constants-BoBHGSW8.js";function b(e,n,s){const t=[];if(e?.trim()){const o=e.trim(),r=s.map(i=>({field:[String(i)],operator:"contains",value:o}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const o of n)t.push({field:[o.column],operator:"eq",value:o.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(e,n,s){const t=e??s,o=n??"asc";return[{field:[String(t)],direction:o}]}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,n,s,t){const o=I.c(14);let r,i,u;if(o[0]!==t||o[1]!==n||o[2]!==s||o[3]!==e){const a=n.toUpperCase();r=`COLLECTION_${a}_GET`,u=P,i=K.collectionItem(t,e,"",a,s??""),o[0]=t,o[1]=n,o[2]=s,o[3]=e,o[4]=r,o[5]=i,o[6]=u}else r=o[4],i=o[5],u=o[6];let c;o[7]!==t||o[8]!==r||o[9]!==s?(c=async()=>{if(!s)return{item:null};const a=await t.callTool({name:r,arguments:{id:s}});return O(a)},o[7]=t,o[8]=r,o[9]=s,o[10]=c):c=o[10];let d;o[11]!==i||o[12]!==c?(d={queryKey:i,queryFn:c,staleTime:6e4},o[11]=i,o[12]=c,o[13]=d):d=o[13];const{data:p}=u(d);return p?.item??null}const B={structuredContent:{items:[]},isError:!1};function R(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=`COLLECTION_${a}_LIST`,f=b(o,r,c),y=D(i,u,d),C={...f&&{where:f},...y&&{orderBy:y},limit:p,offset:0},g=JSON.stringify(C),E=K.collectionList(s,e,"",a,g),{data:_}=P({queryKey:E,queryFn:async()=>s?await s.callTool({name:m,arguments:C}):B,staleTime:3e4,retry:!1,select:N=>O(N??{})?.items??[]});return _}function X(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=b(o,r,c),f=D(i,u,d),y={...m&&{where:m},...f&&{orderBy:f},limit:p,offset:0},C=JSON.stringify(y);return K.collectionList(e,s,"",a,C)}function j(e,n,s){const t=I.c(34),o=Q();let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=r,u=`COLLECTION_${i}_CREATE`,c=`COLLECTION_${i}_UPDATE`,d=`COLLECTION_${i}_DELETE`;let p;t[2]!==o||t[3]!==e||t[4]!==i?(p=()=>{o.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===e&&l[3]==="collection"&&l[4]===i}})},t[2]=o,t[3]=e,t[4]=i,t[5]=p):p=t[5];const a=p;let m;t[6]!==s||t[7]!==u?(m=async S=>{const l=await s.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=s,t[7]=u,t[8]=m):m=t[8];let f;t[9]!==a?(f=()=>{a(),L.success("Item created successfully")},t[9]=a,t[10]=f):f=t[10];let y;t[11]!==m||t[12]!==f?(y={mutationFn:m,onSuccess:f,onError:Y},t[11]=m,t[12]=f,t[13]=y):y=t[13];const C=v(y);let g;t[14]!==s||t[15]!==c?(g=async S=>{const{id:l,data:F}=S,M=await s.callTool({name:c,arguments:{id:l,data:F}});return O(M).item},t[14]=s,t[15]=c,t[16]=g):g=t[16];let E;t[17]!==a?(E=()=>{a(),L.success("Item updated successfully")},t[17]=a,t[18]=E):E=t[18];let _;t[19]!==g||t[20]!==E?(_={mutationFn:g,onSuccess:E,onError:J},t[19]=g,t[20]=E,t[21]=_):_=t[21];const N=v(_);let T;t[22]!==s||t[23]!==d?(T=async S=>{const l=await s.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=s,t[23]=d,t[24]=T):T=t[24];let h;t[25]!==a?(h=()=>{a(),L.success("Item deleted successfully")},t[25]=a,t[26]=h):h=t[26];let w;t[27]!==T||t[28]!==h?(w={mutationFn:T,onSuccess:h,onError:z},t[27]=T,t[28]=h,t[29]=w):w=t[29];const A=v(w);let $;return t[30]!==C||t[31]!==A||t[32]!==N?($={create:C,update:N,delete:A},t[30]=C,t[31]=A,t[32]=N,t[33]=$):$=t[33],$}function z(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to delete item: ${n}`)}function J(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to update item: ${n}`)}function Y(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to create item: ${n}`)}function Z(e){const n=I.c(4);let s;n[0]!==e?(s=e===void 0?{}:e,n[0]=e,n[1]=s):s=n[1];const t=s,{org:o}=x();let r;n[2]!==o.id?(r={connectionId:q,orgId:o.id},n[2]=o.id,n[3]=r):r=n[3];const i=U(r);return R(o.id,"CONNECTIONS",i,t)}function tt(e){const n=I.c(2),{org:s}=x();let t;n[0]!==s.id?(t={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=t):t=n[1];const o=U(t);return k(s.id,"CONNECTIONS",e,o)}function et(){const e=I.c(2),{org:n}=x();let s;e[0]!==n.id?(s={connectionId:q,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const t=U(s);return j(n.id,"CONNECTIONS",t)}export{B as E,D as a,X as b,b as c,k as d,R as e,tt as f,et as g,Z as h,j as u};
1
+ import{n as P,c as I,m as Q,t as L,u as x}from"./index-Chdo1wOf.js";import{u as v}from"./useMutation-BTkDU0tp.js";import{K,a as q,u as U}from"./constants-DS4O9R8r.js";function b(e,n,s){const t=[];if(e?.trim()){const o=e.trim(),r=s.map(i=>({field:[String(i)],operator:"contains",value:o}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const o of n)t.push({field:[o.column],operator:"eq",value:o.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(e,n,s){const t=e??s,o=n??"asc";return[{field:[String(t)],direction:o}]}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,n,s,t){const o=I.c(14);let r,i,u;if(o[0]!==t||o[1]!==n||o[2]!==s||o[3]!==e){const a=n.toUpperCase();r=`COLLECTION_${a}_GET`,u=P,i=K.collectionItem(t,e,"",a,s??""),o[0]=t,o[1]=n,o[2]=s,o[3]=e,o[4]=r,o[5]=i,o[6]=u}else r=o[4],i=o[5],u=o[6];let c;o[7]!==t||o[8]!==r||o[9]!==s?(c=async()=>{if(!s)return{item:null};const a=await t.callTool({name:r,arguments:{id:s}});return O(a)},o[7]=t,o[8]=r,o[9]=s,o[10]=c):c=o[10];let d;o[11]!==i||o[12]!==c?(d={queryKey:i,queryFn:c,staleTime:6e4},o[11]=i,o[12]=c,o[13]=d):d=o[13];const{data:p}=u(d);return p?.item??null}const B={structuredContent:{items:[]},isError:!1};function R(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=`COLLECTION_${a}_LIST`,f=b(o,r,c),y=D(i,u,d),C={...f&&{where:f},...y&&{orderBy:y},limit:p,offset:0},g=JSON.stringify(C),E=K.collectionList(s,e,"",a,g),{data:_}=P({queryKey:E,queryFn:async()=>s?await s.callTool({name:m,arguments:C}):B,staleTime:3e4,retry:!1,select:N=>O(N??{})?.items??[]});return _}function X(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=b(o,r,c),f=D(i,u,d),y={...m&&{where:m},...f&&{orderBy:f},limit:p,offset:0},C=JSON.stringify(y);return K.collectionList(e,s,"",a,C)}function j(e,n,s){const t=I.c(34),o=Q();let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=r,u=`COLLECTION_${i}_CREATE`,c=`COLLECTION_${i}_UPDATE`,d=`COLLECTION_${i}_DELETE`;let p;t[2]!==o||t[3]!==e||t[4]!==i?(p=()=>{o.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===e&&l[3]==="collection"&&l[4]===i}})},t[2]=o,t[3]=e,t[4]=i,t[5]=p):p=t[5];const a=p;let m;t[6]!==s||t[7]!==u?(m=async S=>{const l=await s.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=s,t[7]=u,t[8]=m):m=t[8];let f;t[9]!==a?(f=()=>{a(),L.success("Item created successfully")},t[9]=a,t[10]=f):f=t[10];let y;t[11]!==m||t[12]!==f?(y={mutationFn:m,onSuccess:f,onError:Y},t[11]=m,t[12]=f,t[13]=y):y=t[13];const C=v(y);let g;t[14]!==s||t[15]!==c?(g=async S=>{const{id:l,data:F}=S,M=await s.callTool({name:c,arguments:{id:l,data:F}});return O(M).item},t[14]=s,t[15]=c,t[16]=g):g=t[16];let E;t[17]!==a?(E=()=>{a(),L.success("Item updated successfully")},t[17]=a,t[18]=E):E=t[18];let _;t[19]!==g||t[20]!==E?(_={mutationFn:g,onSuccess:E,onError:J},t[19]=g,t[20]=E,t[21]=_):_=t[21];const N=v(_);let T;t[22]!==s||t[23]!==d?(T=async S=>{const l=await s.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=s,t[23]=d,t[24]=T):T=t[24];let h;t[25]!==a?(h=()=>{a(),L.success("Item deleted successfully")},t[25]=a,t[26]=h):h=t[26];let w;t[27]!==T||t[28]!==h?(w={mutationFn:T,onSuccess:h,onError:z},t[27]=T,t[28]=h,t[29]=w):w=t[29];const A=v(w);let $;return t[30]!==C||t[31]!==A||t[32]!==N?($={create:C,update:N,delete:A},t[30]=C,t[31]=A,t[32]=N,t[33]=$):$=t[33],$}function z(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to delete item: ${n}`)}function J(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to update item: ${n}`)}function Y(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to create item: ${n}`)}function Z(e){const n=I.c(4);let s;n[0]!==e?(s=e===void 0?{}:e,n[0]=e,n[1]=s):s=n[1];const t=s,{org:o}=x();let r;n[2]!==o.id?(r={connectionId:q,orgId:o.id},n[2]=o.id,n[3]=r):r=n[3];const i=U(r);return R(o.id,"CONNECTIONS",i,t)}function tt(e){const n=I.c(2),{org:s}=x();let t;n[0]!==s.id?(t={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=t):t=n[1];const o=U(t);return k(s.id,"CONNECTIONS",e,o)}function et(){const e=I.c(2),{org:n}=x();let s;e[0]!==n.id?(s={connectionId:q,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const t=U(s);return j(n.id,"CONNECTIONS",t)}export{B as E,D as a,X as b,b as c,k as d,R as e,tt as f,et as g,Z as h,j as u};
@@ -1 +1 @@
1
- import{r,c}from"./index-Dj3-TAFC.js";const l=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M5 12h14m0 0-7-7m7 7-7 7"}));l.displayName="ArrowRight";const d=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M10.5 9.002a2.248 2.248 0 0 1 4.369.75C14.869 11.25 12.62 12 12.62 12m.028 3h.01m-.16 5a8.5 8.5 0 1 0-8.056-5.783c.108.32.162.481.172.604a.899.899 0 0 1-.028.326c-.03.12-.098.245-.232.494l-1.636 3.027c-.233.432-.35.648-.324.815a.5.5 0 0 0 .234.35c.144.087.388.062.876.011l5.121-.529c.155-.016.233-.024.303-.021.07.002.12.009.187.024.069.016.155.05.329.116A8.478 8.478 0 0 0 12.5 20Z"}));d.displayName="MessageQuestionCircle";function h(){const e=c.c(3),[t,o]=r.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=async s=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},e[0]=i):i=e[0];const n=i;let a;return e[1]!==t?(a={handleCopy:n,copied:t},e[1]=t,e[2]=a):a=e[2],a}export{l as i,d as t,h as u};
1
+ import{r,c}from"./index-Chdo1wOf.js";const l=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M5 12h14m0 0-7-7m7 7-7 7"}));l.displayName="ArrowRight";const d=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M10.5 9.002a2.248 2.248 0 0 1 4.369.75C14.869 11.25 12.62 12 12.62 12m.028 3h.01m-.16 5a8.5 8.5 0 1 0-8.056-5.783c.108.32.162.481.172.604a.899.899 0 0 1-.028.326c-.03.12-.098.245-.232.494l-1.636 3.027c-.233.432-.35.648-.324.815a.5.5 0 0 0 .234.35c.144.087.388.062.876.011l5.121-.529c.155-.016.233-.024.303-.021.07.002.12.009.187.024.069.016.155.05.329.116A8.478 8.478 0 0 0 12.5 20Z"}));d.displayName="MessageQuestionCircle";function h(){const e=c.c(3),[t,o]=r.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=async s=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},e[0]=i):i=e[0];const n=i;let a;return e[1]!==t?(a={handleCopy:n,copied:t},e[1]=t,e[2]=a):a=e[2],a}export{l as i,d as t,h as u};
@@ -1 +1 @@
1
- import{c as p,u as C,b as f,O as m}from"./index-Dj3-TAFC.js";import{a as v}from"./use-virtual-mcp-BSB4fi0P.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=C(),c=f(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:m,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
1
+ import{c as p,u as C,b as f,O as m}from"./index-Chdo1wOf.js";import{a as v}from"./use-virtual-mcp-BateG3is.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=C(),c=f(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:m,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
@@ -1 +1 @@
1
- import{r as l,ao as Q,ap as M,j as c,ar as g,al as S,aw as L,ax as O,av as D,at as U,au as h,aq as X,c as m,as as ee,bn as te}from"./index-Dj3-TAFC.js";import{c as C}from"./button-BpEnz7t9.js";import{u as ae,L as ne}from"./localstorage-keys-Bxhx_7VG.js";const oe=({size:t=24,color:e="currentColor",...a})=>l.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},l.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));oe.displayName="ArrowsRight";const se=({size:t=24,color:e="currentColor",...a})=>l.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},l.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));se.displayName="Lightbulb02";var T="Tabs",[re]=O(T,[D]),F=D(),[ie,N]=re(T),V=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,onValueChange:o,defaultValue:s,orientation:r="horizontal",dir:i,activationMode:d="automatic",...f}=t,u=Q(i),[p,v]=M({prop:n,onChange:o,defaultProp:s??"",caller:T});return c.jsx(ie,{scope:a,baseId:S(),value:p,onValueChange:v,orientation:r,dir:u,activationMode:d,children:c.jsx(g.div,{dir:u,"data-orientation":r,...f,ref:e})})});V.displayName=T;var G="TabsList",B=l.forwardRef((t,e)=>{const{__scopeTabs:a,loop:n=!0,...o}=t,s=N(G,a),r=F(a);return c.jsx(X,{asChild:!0,...r,orientation:s.orientation,dir:s.dir,loop:n,children:c.jsx(g.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:e})})});B.displayName=G;var z="TabsTrigger",K=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,disabled:o=!1,...s}=t,r=N(z,a),i=F(a),d=W(r.baseId,n),f=Y(r.baseId,n),u=n===r.value;return c.jsx(U,{asChild:!0,...i,focusable:!o,active:u,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...s,ref:e,onMouseDown:h(t.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?r.onValueChange(n):p.preventDefault()}),onKeyDown:h(t.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&r.onValueChange(n)}),onFocus:h(t.onFocus,()=>{const p=r.activationMode!=="manual";!u&&!o&&p&&r.onValueChange(n)})})})});K.displayName=z;var q="TabsContent",H=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,forceMount:o,children:s,...r}=t,i=N(q,a),d=W(i.baseId,n),f=Y(i.baseId,n),u=n===i.value,p=l.useRef(u);return l.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),c.jsx(L,{present:o||u,children:({present:v})=>c.jsx(g.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:f,tabIndex:0,...r,ref:e,style:{...t.style,animationDuration:p.current?"0s":void 0},children:v&&s})})});H.displayName=q;function W(t,e){return`${t}-trigger-${e}`}function Y(t,e){return`${t}-content-${e}`}var le=V,ce=B,de=K,ue=H;function Ce(t){const e=m.c(10);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o===void 0?"pill":o;let r;e[4]!==a?(r=C("flex flex-col gap-2",a),e[4]=a,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r||e[8]!==s?(i=c.jsx(le,{"data-slot":"tabs","data-variant":s,className:r,...n}),e[6]=n,e[7]=r,e[8]=s,e[9]=i):i=e[9],i}function Te(t){const e=m.c(11);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o||"pill",r=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==r?(i=C(r,a),e[4]=a,e[5]=r,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==n||e[9]!==i?(d=c.jsx(ce,{"data-slot":"tabs-list","data-variant":s,className:i,...n}),e[7]=s,e[8]=n,e[9]=i,e[10]=d):d=e[10],d}function ye(t){const e=m.c(11);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o||"pill",r=s==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==r?(i=C(r,a),e[4]=a,e[5]=r,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==n||e[9]!==i?(d=c.jsx(de,{"data-slot":"tabs-trigger","data-variant":s,className:i,...n}),e[7]=s,e[8]=n,e[9]=i,e[10]=d):d=e[10],d}function Re(t){const e=m.c(8);let a,n;e[0]!==t?({className:a,...n}=t,e[0]=t,e[1]=a,e[2]=n):(a=e[1],n=e[2]);let o;e[3]!==a?(o=C("flex-1 outline-none h-full",a),e[3]=a,e[4]=o):o=e[4];let s;return e[5]!==n||e[6]!==o?(s=c.jsx(ue,{"data-slot":"tabs-content",className:o,...n}),e[5]=n,e[6]=o,e[7]=s):s=e[7],s}var y="Collapsible",[pe,Ne]=O(y),[fe,w]=pe(y),Z=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,open:n,defaultOpen:o,disabled:s,onOpenChange:r,...i}=t,[d,f]=M({prop:n,defaultProp:o??!1,onChange:r,caller:y});return c.jsx(fe,{scope:a,disabled:s,contentId:S(),open:d,onOpenToggle:l.useCallback(()=>f(u=>!u),[f]),children:c.jsx(g.div,{"data-state":E(d),"data-disabled":s?"":void 0,...i,ref:e})})});Z.displayName=y;var J="CollapsibleTrigger",_=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,...n}=t,o=w(J,a);return c.jsx(g.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":E(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:e,onClick:h(t.onClick,o.onOpenToggle)})});_.displayName=J;var j="CollapsibleContent",$=l.forwardRef((t,e)=>{const{forceMount:a,...n}=t,o=w(j,t.__scopeCollapsible);return c.jsx(L,{present:a||o.open,children:({present:s})=>c.jsx(be,{...n,ref:e,present:s})})});$.displayName=j;var be=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,present:n,children:o,...s}=t,r=w(j,a),[i,d]=l.useState(n),f=l.useRef(null),u=ee(e,f),p=l.useRef(0),v=p.current,A=l.useRef(0),I=A.current,R=r.open||i,k=l.useRef(R),x=l.useRef(void 0);return l.useEffect(()=>{const b=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(b)},[]),te(()=>{const b=f.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const P=b.getBoundingClientRect();p.current=P.height,A.current=P.width,k.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),d(n)}},[r.open,n]),c.jsx(g.div,{"data-state":E(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!R,...s,ref:u,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":I?`${I}px`:void 0,...t.style},children:R&&o})});function E(t){return t?"open":"closed"}var ve=Z,we=_,_e=$;function je(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx(ve,{"data-slot":"collapsible",...a}),e[2]=a,e[3]=n):n=e[3],n}function $e(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx(_,{"data-slot":"collapsible-trigger",...a}),e[2]=a,e[3]=n):n=e[3],n}function Ee(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx($,{"data-slot":"collapsible-content",...a}),e[2]=a,e[3]=n):n=e[3],n}function Ae(){const t=m.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ne.decoChatOpen(),t[0]=e):e=t[0];const[a,n]=ae(e,me);let o;return t[1]!==a||t[2]!==n?(o=[a,n],t[1]=a,t[2]=n,t[3]=o):o=t[3],o}function me(t){return!!(t??!0)}export{je as C,ve as R,ye as T,Te as a,Re as b,Ce as c,se as d,$e as e,Ee as f,we as g,_e as h,oe as i,Ne as j,Ae as u};
1
+ import{r as l,ao as Q,ap as M,j as c,ar as g,al as S,aw as L,ax as O,av as D,at as U,au as h,aq as X,c as m,as as ee,bn as te}from"./index-Chdo1wOf.js";import{c as C}from"./button-BlFVi9O-.js";import{u as ae,L as ne}from"./localstorage-keys-D6jY_B8O.js";const oe=({size:t=24,color:e="currentColor",...a})=>l.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},l.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));oe.displayName="ArrowsRight";const se=({size:t=24,color:e="currentColor",...a})=>l.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},l.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));se.displayName="Lightbulb02";var T="Tabs",[re]=O(T,[D]),F=D(),[ie,N]=re(T),V=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,onValueChange:o,defaultValue:s,orientation:r="horizontal",dir:i,activationMode:d="automatic",...f}=t,u=Q(i),[p,v]=M({prop:n,onChange:o,defaultProp:s??"",caller:T});return c.jsx(ie,{scope:a,baseId:S(),value:p,onValueChange:v,orientation:r,dir:u,activationMode:d,children:c.jsx(g.div,{dir:u,"data-orientation":r,...f,ref:e})})});V.displayName=T;var G="TabsList",B=l.forwardRef((t,e)=>{const{__scopeTabs:a,loop:n=!0,...o}=t,s=N(G,a),r=F(a);return c.jsx(X,{asChild:!0,...r,orientation:s.orientation,dir:s.dir,loop:n,children:c.jsx(g.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:e})})});B.displayName=G;var z="TabsTrigger",K=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,disabled:o=!1,...s}=t,r=N(z,a),i=F(a),d=W(r.baseId,n),f=Y(r.baseId,n),u=n===r.value;return c.jsx(U,{asChild:!0,...i,focusable:!o,active:u,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...s,ref:e,onMouseDown:h(t.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?r.onValueChange(n):p.preventDefault()}),onKeyDown:h(t.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&r.onValueChange(n)}),onFocus:h(t.onFocus,()=>{const p=r.activationMode!=="manual";!u&&!o&&p&&r.onValueChange(n)})})})});K.displayName=z;var q="TabsContent",H=l.forwardRef((t,e)=>{const{__scopeTabs:a,value:n,forceMount:o,children:s,...r}=t,i=N(q,a),d=W(i.baseId,n),f=Y(i.baseId,n),u=n===i.value,p=l.useRef(u);return l.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),c.jsx(L,{present:o||u,children:({present:v})=>c.jsx(g.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:f,tabIndex:0,...r,ref:e,style:{...t.style,animationDuration:p.current?"0s":void 0},children:v&&s})})});H.displayName=q;function W(t,e){return`${t}-trigger-${e}`}function Y(t,e){return`${t}-content-${e}`}var le=V,ce=B,de=K,ue=H;function Ce(t){const e=m.c(10);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o===void 0?"pill":o;let r;e[4]!==a?(r=C("flex flex-col gap-2",a),e[4]=a,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r||e[8]!==s?(i=c.jsx(le,{"data-slot":"tabs","data-variant":s,className:r,...n}),e[6]=n,e[7]=r,e[8]=s,e[9]=i):i=e[9],i}function Te(t){const e=m.c(11);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o||"pill",r=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==r?(i=C(r,a),e[4]=a,e[5]=r,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==n||e[9]!==i?(d=c.jsx(ce,{"data-slot":"tabs-list","data-variant":s,className:i,...n}),e[7]=s,e[8]=n,e[9]=i,e[10]=d):d=e[10],d}function ye(t){const e=m.c(11);let a,n,o;e[0]!==t?({className:a,variant:o,...n}=t,e[0]=t,e[1]=a,e[2]=n,e[3]=o):(a=e[1],n=e[2],o=e[3]);const s=o||"pill",r=s==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==r?(i=C(r,a),e[4]=a,e[5]=r,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==n||e[9]!==i?(d=c.jsx(de,{"data-slot":"tabs-trigger","data-variant":s,className:i,...n}),e[7]=s,e[8]=n,e[9]=i,e[10]=d):d=e[10],d}function Re(t){const e=m.c(8);let a,n;e[0]!==t?({className:a,...n}=t,e[0]=t,e[1]=a,e[2]=n):(a=e[1],n=e[2]);let o;e[3]!==a?(o=C("flex-1 outline-none h-full",a),e[3]=a,e[4]=o):o=e[4];let s;return e[5]!==n||e[6]!==o?(s=c.jsx(ue,{"data-slot":"tabs-content",className:o,...n}),e[5]=n,e[6]=o,e[7]=s):s=e[7],s}var y="Collapsible",[pe,Ne]=O(y),[fe,w]=pe(y),Z=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,open:n,defaultOpen:o,disabled:s,onOpenChange:r,...i}=t,[d,f]=M({prop:n,defaultProp:o??!1,onChange:r,caller:y});return c.jsx(fe,{scope:a,disabled:s,contentId:S(),open:d,onOpenToggle:l.useCallback(()=>f(u=>!u),[f]),children:c.jsx(g.div,{"data-state":E(d),"data-disabled":s?"":void 0,...i,ref:e})})});Z.displayName=y;var J="CollapsibleTrigger",_=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,...n}=t,o=w(J,a);return c.jsx(g.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":E(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:e,onClick:h(t.onClick,o.onOpenToggle)})});_.displayName=J;var j="CollapsibleContent",$=l.forwardRef((t,e)=>{const{forceMount:a,...n}=t,o=w(j,t.__scopeCollapsible);return c.jsx(L,{present:a||o.open,children:({present:s})=>c.jsx(be,{...n,ref:e,present:s})})});$.displayName=j;var be=l.forwardRef((t,e)=>{const{__scopeCollapsible:a,present:n,children:o,...s}=t,r=w(j,a),[i,d]=l.useState(n),f=l.useRef(null),u=ee(e,f),p=l.useRef(0),v=p.current,A=l.useRef(0),I=A.current,R=r.open||i,k=l.useRef(R),x=l.useRef(void 0);return l.useEffect(()=>{const b=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(b)},[]),te(()=>{const b=f.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const P=b.getBoundingClientRect();p.current=P.height,A.current=P.width,k.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),d(n)}},[r.open,n]),c.jsx(g.div,{"data-state":E(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!R,...s,ref:u,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":I?`${I}px`:void 0,...t.style},children:R&&o})});function E(t){return t?"open":"closed"}var ve=Z,we=_,_e=$;function je(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx(ve,{"data-slot":"collapsible",...a}),e[2]=a,e[3]=n):n=e[3],n}function $e(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx(_,{"data-slot":"collapsible-trigger",...a}),e[2]=a,e[3]=n):n=e[3],n}function Ee(t){const e=m.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let n;return e[2]!==a?(n=c.jsx($,{"data-slot":"collapsible-content",...a}),e[2]=a,e[3]=n):n=e[3],n}function Ae(){const t=m.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ne.decoChatOpen(),t[0]=e):e=t[0];const[a,n]=ae(e,me);let o;return t[1]!==a||t[2]!==n?(o=[a,n],t[1]=a,t[2]=n,t[3]=o):o=t[3],o}function me(t){return!!(t??!0)}export{je as C,ve as R,ye as T,Te as a,Re as b,Ce as c,se as d,$e as e,Ee as f,we as g,_e as h,oe as i,Ne as j,Ae as u};
@@ -1 +1 @@
1
- import{u as y,d as g,t as e}from"./index-Dj3-TAFC.js";import{u as C}from"./use-binding-D1PhjEYd.js";import{g as S,h as v}from"./use-connection-CU2MpSPl.js";import{e as B}from"./extract-connection-data-CVVFDhKc.js";import{f as I,c as P,e as _}from"./registry-utils-fUWTJDy1.js";function w(t){return t.startsWith("@")?t:`@${t}`}function F(){const{org:t}=y(),{data:s}=g.useSession(),i=S(),l=v(),u=C(l);return{installByBinding:async r=>{if(!t||!s?.user?.id){e.error("Not authenticated");return}const d=w(r),a=(await Promise.all(u.map(async o=>{const c=I(o.tools);if(!c)return null;try{const p=await P(o.id,t.id,c,{where:{appName:d}});return _(p??[])[0]??null}catch{return null}}))).find(o=>o!==null);if(!a){e.error(`MCP Server not found in registry: ${r}`);return}const n=B(a,t.id,s.user.id),m=n.connection_type==="STDIO",f=!!n.connection_url,h=m&&n.connection_headers&&typeof n.connection_headers=="object"&&"command"in n.connection_headers;if(!f&&!h){e.error("This MCP Server cannot be connected: no connection method available");return}return await i.create.mutateAsync(n),{id:n.id,connection:n}},isInstalling:i.create.isPending}}export{F as u};
1
+ import{u as y,d as g,t as e}from"./index-Chdo1wOf.js";import{u as C}from"./use-binding-DT0OPEEL.js";import{g as S,h as v}from"./use-connection-O4z2Mc_F.js";import{e as B}from"./extract-connection-data-1y_2LKN1.js";import{f as I,c as P,e as _}from"./registry-utils-BL6Np0uD.js";function w(t){return t.startsWith("@")?t:`@${t}`}function F(){const{org:t}=y(),{data:s}=g.useSession(),i=S(),l=v(),u=C(l);return{installByBinding:async r=>{if(!t||!s?.user?.id){e.error("Not authenticated");return}const d=w(r),a=(await Promise.all(u.map(async o=>{const c=I(o.tools);if(!c)return null;try{const p=await P(o.id,t.id,c,{where:{appName:d}});return _(p??[])[0]??null}catch{return null}}))).find(o=>o!==null);if(!a){e.error(`MCP Server not found in registry: ${r}`);return}const n=B(a,t.id,s.user.id),m=n.connection_type==="STDIO",f=!!n.connection_url,h=m&&n.connection_headers&&typeof n.connection_headers=="object"&&"command"in n.connection_headers;if(!f&&!h){e.error("This MCP Server cannot be connected: no connection method available");return}return await i.create.mutateAsync(n),{id:n.id,connection:n}},isInstalling:i.create.isPending}}export{F as u};
@@ -1 +1 @@
1
- import{c as w,u as C,K as D,j as u,r as K}from"./index-Dj3-TAFC.js";import{A as M}from"./avatar-CUhi-qzb.js";import{c as B}from"./button-BpEnz7t9.js";import{u as P}from"./useQuery-7VkeRbRj.js";import{a as k,u as A}from"./constants-BoBHGSW8.js";import{u as L}from"./use-view-mode-D6ejd-aW.js";function R(c){const e=w.c(11),{org:i}=C();let n;e[0]!==i.id?(n={connectionId:k,orgId:i.id},e[0]=i.id,e[1]=n):n=e[1];const o=A(n);let t;e[2]!==c?(t=D.user(c),e[2]=c,e[3]=t):t=e[3];let l;e[4]!==o||e[5]!==c?(l=async()=>{const y=await o.callTool({name:"USER_GET",arguments:{id:c}});return(y.structuredContent??y).user},e[4]=o,e[5]=c,e[6]=l):l=e[6];const f=!!c;let s;return e[7]!==t||e[8]!==l||e[9]!==f?(s={queryKey:t,queryFn:l,staleTime:3e5,retry:1,enabled:f},e[7]=t,e[8]=l,e[9]=f,e[10]=s):s=e[10],P(s)}function Y(c){const e=w.c(39),{id:i,size:n,showEmail:o,className:t}=c,l=n===void 0?"xs":n,f=o===void 0?!1:o,{data:s,isLoading:y,isError:N}=R(i);if(y){let a;e[0]!==t?(a=B("flex items-center gap-2",t),e[0]=t,e[1]=a):a=e[1];let r;e[2]!==l?(r=u.jsx(M.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=u.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=d):d=e[4];let m;e[5]!==f?(m=f&&u.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=f,e[6]=m):m=e[6];let p;e[7]!==m?(p=u.jsxs("div",{className:"flex flex-col gap-1",children:[d,m]}),e[7]=m,e[8]=p):p=e[8];let b;return e[9]!==a||e[10]!==r||e[11]!==p?(b=u.jsxs("div",{className:a,children:[r,p]}),e[9]=a,e[10]=r,e[11]=p,e[12]=b):b=e[12],b}if(N||!s){let a;e[13]!==t?(a=B("flex items-center gap-2",t),e[13]=t,e[14]=a):a=e[14];let r;e[15]!==l?(r=u.jsx(M,{shape:"circle",size:l,fallback:"?",muted:!0}),e[15]=l,e[16]=r):r=e[16];let d;e[17]===Symbol.for("react.memo_cache_sentinel")?(d=u.jsx("div",{className:"flex flex-col",children:u.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=d):d=e[17];let m;return e[18]!==a||e[19]!==r?(m=u.jsxs("div",{className:a,children:[r,d]}),e[18]=a,e[19]=r,e[20]=m):m=e[20],m}let v;e[21]!==t?(v=B("flex items-center gap-2",t),e[21]=t,e[22]=v):v=e[22];const j=s.image??void 0;let g;e[23]!==l||e[24]!==j||e[25]!==s.name?(g=u.jsx(M,{shape:"circle",size:l,url:j,fallback:s.name}),e[23]=l,e[24]=j,e[25]=s.name,e[26]=g):g=e[26];let x;e[27]!==s.name?(x=u.jsx("div",{className:"text-sm font-medium",children:s.name}),e[27]=s.name,e[28]=x):x=e[28];let S;e[29]!==f||e[30]!==s.email?(S=f&&u.jsx("div",{className:"text-xs text-muted-foreground",children:s.email}),e[29]=f,e[30]=s.email,e[31]=S):S=e[31];let h;e[32]!==x||e[33]!==S?(h=u.jsxs("div",{className:"flex flex-col",children:[x,S]}),e[32]=x,e[33]=S,e[34]=h):h=e[34];let F;return e[35]!==v||e[36]!==g||e[37]!==h?(F=u.jsxs("div",{className:v,children:[g,h]}),e[35]=v,e[36]=g,e[37]=h,e[38]=F):F=e[38],F}function q(c){const e=`deco-filters-${c}`,[i,n]=K.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[i,t=>{n(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function z(c){const e=w.c(7),[i,n]=K.useState(c),[o,t]=K.useState(c?"desc":null);let l;e[0]!==o||e[1]!==i?(l=y=>{i!==y?(n(y),t("asc")):o==="asc"?t("desc"):o==="desc"&&(n(void 0),t(null))},e[0]=o,e[1]=i,e[2]=l):l=e[2];const f=l;let s;return e[3]!==f||e[4]!==o||e[5]!==i?(s={sortKey:i,sortDirection:o,handleSort:f},e[3]=f,e[4]=o,e[5]=i,e[6]=s):s=e[6],s}function H(c){const e=w.c(20),{namespace:i,resource:n,defaultSortKey:o,defaultViewMode:t}=c,l=o===void 0?"title":o,f=t===void 0?"table":t,[s,y]=K.useState(""),N=K.useDeferredValue(s),v=`${i}-${n}`,[j,g]=q(v),x=`mesh-${n}-filter-visible-${i}`;let S;e[0]!==x?(S=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=S):S=e[1];const[h,F]=K.useState(S);let a;e[2]!==x?(a=T=>{F(T),globalThis.localStorage?.setItem(x,String(T))},e[2]=x,e[3]=a):a=e[3];const r=a;let d;e[4]!==h||e[5]!==r?(d=()=>{r(!h)},e[4]=h,e[5]=r,e[6]=d):d=e[6];const m=d,[p,b]=L(`mesh-${n}-${i}`,f),{sortKey:U,sortDirection:E,handleSort:V}=z(l),_=U;let $;return e[7]!==h||e[8]!==j||e[9]!==V||e[10]!==s||e[11]!==N||e[12]!==r||e[13]!==g||e[14]!==b||e[15]!==E||e[16]!==_||e[17]!==m||e[18]!==p?($={search:s,searchTerm:N,setSearch:y,filters:j,setFilters:g,filterBarVisible:h,setFilterBarVisible:r,toggleFilterBar:m,viewMode:p,setViewMode:b,sortKey:_,sortDirection:E,handleSort:V},e[7]=h,e[8]=j,e[9]=V,e[10]=s,e[11]=N,e[12]=r,e[13]=g,e[14]=b,e[15]=E,e[16]=_,e[17]=m,e[18]=p,e[19]=$):$=e[19],$}export{Y as U,H as u};
1
+ import{c as w,u as C,K as D,j as u,r as K}from"./index-Chdo1wOf.js";import{A as M}from"./avatar-CLzAk7bk.js";import{c as B}from"./button-BlFVi9O-.js";import{u as P}from"./useQuery-C0AkqYB7.js";import{a as k,u as A}from"./constants-DS4O9R8r.js";import{u as L}from"./use-view-mode-CRJUL6S-.js";function R(c){const e=w.c(11),{org:i}=C();let n;e[0]!==i.id?(n={connectionId:k,orgId:i.id},e[0]=i.id,e[1]=n):n=e[1];const o=A(n);let t;e[2]!==c?(t=D.user(c),e[2]=c,e[3]=t):t=e[3];let l;e[4]!==o||e[5]!==c?(l=async()=>{const y=await o.callTool({name:"USER_GET",arguments:{id:c}});return(y.structuredContent??y).user},e[4]=o,e[5]=c,e[6]=l):l=e[6];const f=!!c;let s;return e[7]!==t||e[8]!==l||e[9]!==f?(s={queryKey:t,queryFn:l,staleTime:3e5,retry:1,enabled:f},e[7]=t,e[8]=l,e[9]=f,e[10]=s):s=e[10],P(s)}function Y(c){const e=w.c(39),{id:i,size:n,showEmail:o,className:t}=c,l=n===void 0?"xs":n,f=o===void 0?!1:o,{data:s,isLoading:y,isError:N}=R(i);if(y){let a;e[0]!==t?(a=B("flex items-center gap-2",t),e[0]=t,e[1]=a):a=e[1];let r;e[2]!==l?(r=u.jsx(M.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=u.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=d):d=e[4];let m;e[5]!==f?(m=f&&u.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=f,e[6]=m):m=e[6];let p;e[7]!==m?(p=u.jsxs("div",{className:"flex flex-col gap-1",children:[d,m]}),e[7]=m,e[8]=p):p=e[8];let b;return e[9]!==a||e[10]!==r||e[11]!==p?(b=u.jsxs("div",{className:a,children:[r,p]}),e[9]=a,e[10]=r,e[11]=p,e[12]=b):b=e[12],b}if(N||!s){let a;e[13]!==t?(a=B("flex items-center gap-2",t),e[13]=t,e[14]=a):a=e[14];let r;e[15]!==l?(r=u.jsx(M,{shape:"circle",size:l,fallback:"?",muted:!0}),e[15]=l,e[16]=r):r=e[16];let d;e[17]===Symbol.for("react.memo_cache_sentinel")?(d=u.jsx("div",{className:"flex flex-col",children:u.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=d):d=e[17];let m;return e[18]!==a||e[19]!==r?(m=u.jsxs("div",{className:a,children:[r,d]}),e[18]=a,e[19]=r,e[20]=m):m=e[20],m}let v;e[21]!==t?(v=B("flex items-center gap-2",t),e[21]=t,e[22]=v):v=e[22];const j=s.image??void 0;let g;e[23]!==l||e[24]!==j||e[25]!==s.name?(g=u.jsx(M,{shape:"circle",size:l,url:j,fallback:s.name}),e[23]=l,e[24]=j,e[25]=s.name,e[26]=g):g=e[26];let x;e[27]!==s.name?(x=u.jsx("div",{className:"text-sm font-medium",children:s.name}),e[27]=s.name,e[28]=x):x=e[28];let S;e[29]!==f||e[30]!==s.email?(S=f&&u.jsx("div",{className:"text-xs text-muted-foreground",children:s.email}),e[29]=f,e[30]=s.email,e[31]=S):S=e[31];let h;e[32]!==x||e[33]!==S?(h=u.jsxs("div",{className:"flex flex-col",children:[x,S]}),e[32]=x,e[33]=S,e[34]=h):h=e[34];let F;return e[35]!==v||e[36]!==g||e[37]!==h?(F=u.jsxs("div",{className:v,children:[g,h]}),e[35]=v,e[36]=g,e[37]=h,e[38]=F):F=e[38],F}function q(c){const e=`deco-filters-${c}`,[i,n]=K.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[i,t=>{n(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function z(c){const e=w.c(7),[i,n]=K.useState(c),[o,t]=K.useState(c?"desc":null);let l;e[0]!==o||e[1]!==i?(l=y=>{i!==y?(n(y),t("asc")):o==="asc"?t("desc"):o==="desc"&&(n(void 0),t(null))},e[0]=o,e[1]=i,e[2]=l):l=e[2];const f=l;let s;return e[3]!==f||e[4]!==o||e[5]!==i?(s={sortKey:i,sortDirection:o,handleSort:f},e[3]=f,e[4]=o,e[5]=i,e[6]=s):s=e[6],s}function H(c){const e=w.c(20),{namespace:i,resource:n,defaultSortKey:o,defaultViewMode:t}=c,l=o===void 0?"title":o,f=t===void 0?"table":t,[s,y]=K.useState(""),N=K.useDeferredValue(s),v=`${i}-${n}`,[j,g]=q(v),x=`mesh-${n}-filter-visible-${i}`;let S;e[0]!==x?(S=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=S):S=e[1];const[h,F]=K.useState(S);let a;e[2]!==x?(a=T=>{F(T),globalThis.localStorage?.setItem(x,String(T))},e[2]=x,e[3]=a):a=e[3];const r=a;let d;e[4]!==h||e[5]!==r?(d=()=>{r(!h)},e[4]=h,e[5]=r,e[6]=d):d=e[6];const m=d,[p,b]=L(`mesh-${n}-${i}`,f),{sortKey:U,sortDirection:E,handleSort:V}=z(l),_=U;let $;return e[7]!==h||e[8]!==j||e[9]!==V||e[10]!==s||e[11]!==N||e[12]!==r||e[13]!==g||e[14]!==b||e[15]!==E||e[16]!==_||e[17]!==m||e[18]!==p?($={search:s,searchTerm:N,setSearch:y,filters:j,setFilters:g,filterBarVisible:h,setFilterBarVisible:r,toggleFilterBar:m,viewMode:p,setViewMode:b,sortKey:_,sortDirection:E,handleSort:V},e[7]=h,e[8]=j,e[9]=V,e[10]=s,e[11]=N,e[12]=r,e[13]=g,e[14]=b,e[15]=E,e[16]=_,e[17]=m,e[18]=p,e[19]=$):$=e[19],$}export{Y as U,H as u};
@@ -1 +1 @@
1
- import{c,u}from"./index-Dj3-TAFC.js";import{h as m,e as a}from"./use-connection-CU2MpSPl.js";import{j as p}from"./constants-BoBHGSW8.js";import{a as C}from"./use-binding-D1PhjEYd.js";function x(n,s){const o=c.c(5);let e;o[0]!==s?(e=s===void 0?{}:s,o[0]=s,o[1]=e):e=o[1];const r=e,{org:i}=u();let t;o[2]!==n||o[3]!==i.id?(t={connectionId:n,orgId:i.id},o[2]=n,o[3]=i.id,o[4]=t):t=o[4];const l=p(t);return a(n??"no-connection","LLM",l,r)}function j(){const n=c.c(2),s=m();let o;return n[0]!==s?(o={connections:s,binding:"LLMS"},n[0]=s,n[1]=o):o=n[1],C(o)}export{x as a,j as u};
1
+ import{c,u}from"./index-Chdo1wOf.js";import{h as m,e as a}from"./use-connection-O4z2Mc_F.js";import{j as p}from"./constants-DS4O9R8r.js";import{a as C}from"./use-binding-DT0OPEEL.js";function x(n,s){const o=c.c(5);let e;o[0]!==s?(e=s===void 0?{}:s,o[0]=s,o[1]=e):e=o[1];const r=e,{org:i}=u();let t;o[2]!==n||o[3]!==i.id?(t={connectionId:n,orgId:i.id},o[2]=n,o[3]=i.id,o[4]=t):t=o[4];const l=p(t);return a(n??"no-connection","LLM",l,r)}function j(){const n=c.c(2),s=m();let o;return n[0]!==s?(o={connections:s,binding:"LLMS"},n[0]=s,n[1]=o):o=n[1],C(o)}export{x as a,j as u};
@@ -1 +1 @@
1
- import{c as n,b2 as u,b3 as p,n as f}from"./index-Dj3-TAFC.js";import{u as m}from"./useQuery-7VkeRbRj.js";import{K as c}from"./constants-BoBHGSW8.js";async function y(o){if(!o.getServerCapabilities()?.resources)return{resources:[]};try{return await o.listResources()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{resources:[]};throw t}}async function R(o,e){return await o.readResource({uri:e})}function w(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function C(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}async function b(o){if(!o.getServerCapabilities()?.prompts)return{prompts:[]};try{return await o.listPrompts()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{prompts:[]};throw t}}async function L(o,e,t){if(!o.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await o.getPrompt({name:e,arguments:t??{}})}function T(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>b(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function g(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>b(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}export{y as a,g as b,w as c,C as d,L as g,b as l,R as r,T as u};
1
+ import{c as n,b2 as u,b3 as p,n as f}from"./index-Chdo1wOf.js";import{u as m}from"./useQuery-C0AkqYB7.js";import{K as c}from"./constants-DS4O9R8r.js";async function y(o){if(!o.getServerCapabilities()?.resources)return{resources:[]};try{return await o.listResources()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{resources:[]};throw t}}async function R(o,e){return await o.readResource({uri:e})}function w(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function C(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}async function b(o){if(!o.getServerCapabilities()?.prompts)return{prompts:[]};try{return await o.listPrompts()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{prompts:[]};throw t}}async function L(o,e,t){if(!o.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await o.getPrompt({name:e,arguments:t??{}})}function T(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>b(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function g(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>b(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}export{y as a,g as b,w as c,C as d,L as g,b as l,R as r,T as u};
@@ -1 +1 @@
1
- import{c as m,n as p}from"./index-Dj3-TAFC.js";import{u as q}from"./useQuery-7VkeRbRj.js";import{u as C}from"./useMutation-DXvszu1D.js";import{K as T}from"./constants-BoBHGSW8.js";function w(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function F(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function P(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function $(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function L(r){const e=m.c(8);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{L as a,$ as b,w as c,F as d,P as u};
1
+ import{c as m,n as p}from"./index-Chdo1wOf.js";import{u as q}from"./useQuery-C0AkqYB7.js";import{u as C}from"./useMutation-BTkDU0tp.js";import{K as T}from"./constants-DS4O9R8r.js";function w(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function F(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function P(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function $(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function L(r){const e=m.c(8);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{L as a,$ as b,w as c,F as d,P as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-Dj3-TAFC.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
1
+ import{c as m,r}from"./index-Chdo1wOf.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
@@ -1 +1 @@
1
- import{c as f,u as T,n as d,m as y,K as g}from"./index-Dj3-TAFC.js";import{u as _}from"./useMutation-DXvszu1D.js";import{a as p,u as A}from"./constants-BoBHGSW8.js";function D(e){const t=f.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=f.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const m=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return m.structuredContent??m},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
1
+ import{c as f,u as T,n as d,m as y,K as g}from"./index-Chdo1wOf.js";import{u as _}from"./useMutation-BTkDU0tp.js";import{a as p,u as A}from"./constants-DS4O9R8r.js";function D(e){const t=f.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=f.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const m=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return m.structuredContent??m},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
@@ -1 +1 @@
1
- import{K as m,c as C,n as T}from"./index-Dj3-TAFC.js";import{u as y}from"./useQuery-7VkeRbRj.js";import{u as f,a}from"./constants-BoBHGSW8.js";function S(t,s){const e=C.c(13);let r;e[0]!==t?(r={connectionId:a,orgId:t},e[0]=t,e[1]=r):r=e[1];const l=f(r);let u;e[2]!==t||e[3]!==s?(u=m.project(t,s),e[2]=t,e[3]=s,e[4]=u):u=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==s?(c=async()=>{const p=await l.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=l,e[6]=t,e[7]=s,e[8]=c):c=e[8];const o=!!t&&!!s;let n;return e[9]!==u||e[10]!==c||e[11]!==o?(n={queryKey:u,queryFn:c,enabled:o,staleTime:3e4},e[9]=u,e[10]=c,e[11]=o,e[12]=n):n=e[12],y(n)}function _(t,s){const e=f({connectionId:a,orgId:t}),r={queryKey:m.projects(t),queryFn:async()=>{const l=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(l.structuredContent??l).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return s?.suspense?T(r):y({...r,enabled:!!t})}export{S as a,_ as u};
1
+ import{K as m,c as C,n as T}from"./index-Chdo1wOf.js";import{u as y}from"./useQuery-C0AkqYB7.js";import{u as f,a}from"./constants-DS4O9R8r.js";function S(t,s){const e=C.c(13);let r;e[0]!==t?(r={connectionId:a,orgId:t},e[0]=t,e[1]=r):r=e[1];const l=f(r);let u;e[2]!==t||e[3]!==s?(u=m.project(t,s),e[2]=t,e[3]=s,e[4]=u):u=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==s?(c=async()=>{const p=await l.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=l,e[6]=t,e[7]=s,e[8]=c):c=e[8];const o=!!t&&!!s;let n;return e[9]!==u||e[10]!==c||e[11]!==o?(n={queryKey:u,queryFn:c,enabled:o,staleTime:3e4},e[9]=u,e[10]=c,e[11]=o,e[12]=n):n=e[12],y(n)}function _(t,s){const e=f({connectionId:a,orgId:t}),r={queryKey:m.projects(t),queryFn:async()=>{const l=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(l.structuredContent??l).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return s?.suspense?T(r):y({...r,enabled:!!t})}export{S as a,_ as u};
@@ -1 +1 @@
1
- import{r as S,c as j,b as C,a as v,e as $}from"./index-Dj3-TAFC.js";const b=({size:e=24,color:t="currentColor",...r})=>S.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},S.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));b.displayName="Building02";function k(e,t){return`project:${e}:${t}`}const x=new Set(["account.profile","account.preferences","account.experimental","org.general","org.plugins","org.billing"]);function E(e){if(!e)return!1;if(x.has(e))return!0;const t=e.split(":");return t.length===3&&t[0]==="project"&&!!t[1]&&(t[2]==="general"||t[2]==="plugins"||t[2]==="danger")}function M(e){if(!e.startsWith("project:"))return null;const[,t,r]=e.split(":");return!t||!r?null:{slug:t,sub:r}}function w(){const e=j.c(17),t=C();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const o=v(r);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const{org:s,project:n}=$(c);let i;e[2]!==o.settings?(i=E(o.settings)?o.settings:void 0,e[2]=o.settings,e[3]=i):i=e[3];const m=i,p=!!m;let a;e[4]!==t||e[5]!==s||e[6]!==n?(a=d=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{settings:d}})},e[4]=t,e[5]=s,e[6]=n,e[7]=a):a=e[7];const f=a;let l;e[8]!==t||e[9]!==s||e[10]!==n?(l=()=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{}})},e[8]=t,e[9]=s,e[10]=n,e[11]=l):l=e[11];const g=l,h=m??"account.preferences";let u;return e[12]!==g||e[13]!==p||e[14]!==f||e[15]!==h?(u={isOpen:p,activeSection:h,open:f,close:g},e[12]=g,e[13]=p,e[14]=f,e[15]=h,e[16]=u):u=e[16],u}export{k as a,M as p,b as t,w as u};
1
+ import{r as S,c as j,b as C,a as v,e as $}from"./index-Chdo1wOf.js";const b=({size:e=24,color:t="currentColor",...r})=>S.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},S.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));b.displayName="Building02";function k(e,t){return`project:${e}:${t}`}const x=new Set(["account.profile","account.preferences","account.experimental","org.general","org.plugins","org.billing"]);function E(e){if(!e)return!1;if(x.has(e))return!0;const t=e.split(":");return t.length===3&&t[0]==="project"&&!!t[1]&&(t[2]==="general"||t[2]==="plugins"||t[2]==="danger")}function M(e){if(!e.startsWith("project:"))return null;const[,t,r]=e.split(":");return!t||!r?null:{slug:t,sub:r}}function w(){const e=j.c(17),t=C();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const o=v(r);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const{org:s,project:n}=$(c);let i;e[2]!==o.settings?(i=E(o.settings)?o.settings:void 0,e[2]=o.settings,e[3]=i):i=e[3];const m=i,p=!!m;let a;e[4]!==t||e[5]!==s||e[6]!==n?(a=d=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{settings:d}})},e[4]=t,e[5]=s,e[6]=n,e[7]=a):a=e[7];const f=a;let l;e[8]!==t||e[9]!==s||e[10]!==n?(l=()=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{}})},e[8]=t,e[9]=s,e[10]=n,e[11]=l):l=e[11];const g=l,h=m??"account.preferences";let u;return e[12]!==g||e[13]!==p||e[14]!==f||e[15]!==h?(u={isOpen:p,activeSection:h,open:f,close:g},e[12]=g,e[13]=p,e[14]=f,e[15]=h,e[16]=u):u=e[16],u}export{k as a,M as p,b as t,w as u};
@@ -1 +1 @@
1
- import{c as p,r as f}from"./index-Dj3-TAFC.js";import{u as w}from"./use-mobile-Dn42c33D.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
1
+ import{c as p,r as f}from"./index-Chdo1wOf.js";import{u as w}from"./use-mobile-ziAtnWz2.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-Dj3-TAFC.js";import{e as a,u as C,d as I}from"./use-connection-CU2MpSPl.js";import{a as l,u}from"./constants-BoBHGSW8.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
1
+ import{c,u as r}from"./index-Chdo1wOf.js";import{e as a,u as C,d as I}from"./use-connection-O4z2Mc_F.js";import{a as l,u}from"./constants-DS4O9R8r.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-DOxbID_2.js";import{z as i}from"./index-Chdo1wOf.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{aV as l,aW as p,aX as n,aY as d,aZ as h,m as b,r as o,a_ as m,a$ as f}from"./index-Dj3-TAFC.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=b(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
1
+ import{aV as l,aW as p,aX as n,aY as d,aZ as h,m as b,r as o,a_ as m,a$ as f}from"./index-Chdo1wOf.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=b(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
@@ -0,0 +1 @@
1
+ import{z as u,a8 as s}from"./index-Chdo1wOf.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-DOxbID_2.js";import{z as u,B as n}from"./index-Chdo1wOf.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +1 @@
1
- import{r as N,u as w,d as q,b as G,j as t,O as B,c as L,aE as Q,m as J,K as W,t as A}from"./index-Dj3-TAFC.js";import{a as Z,u as V,e as Y}from"./constants-BoBHGSW8.js";import{C as X}from"./collection-tab-Cb2OKmOU.js";import{g as ee,h as te}from"./use-connection-CU2MpSPl.js";import{B as I}from"./button-BpEnz7t9.js";import{E as R}from"./empty-state-CXRsSa_5.js";import{E as ne}from"./error-boundary-DKBJmhkm.js";import{P as x}from"./index-ZJgHVjA9.js";import{B as F,a as M,b as z,c as T}from"./breadcrumb-C2msqz1b.js";import{a as se,b as ie}from"./use-binding-D1PhjEYd.js";import{i as oe}from"./AlertTriangle-BQr7kJDW.js";import{i as le}from"./Loading01-BdPk5R9C.js";import{s as re}from"./RefreshCcw01-CMJUa0vf.js";import{u as ae}from"./useMutation-DXvszu1D.js";import{e as ce}from"./Dataflow03-DQ3l0uK3.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-BcYBtIFU.js";import"./dropdown-menu-Df5G5zUr.js";import"./Check-COoTrHCh.js";import"./ChevronRight-B8put0eN.js";import"./ArrowUp-Bt1al9WB.js";import"./Grid01-B0TbJ6AU.js";import"./List-BIF-EvrZ.js";import"./tooltip-jCrVkUGG.js";import"./table-5zDBkIKt.js";import"./card-DILUA5lp.js";import"./integration-icon-CitBcWGE.js";import"./Container-CYXpgUH-.js";import"./Copy01-RhM6GPKh.js";import"./DotsVertical--UCmDvo-.js";import"./Edit01-pUCJ7HNy.js";import"./Eye-Dk7SbACo.js";import"./Trash01-BS69Rn26.js";import"./empty-state-BO_xpc7n.js";import"./Inbox01-iihr_vaX.js";import"./use-list-state-CHfyM4gv.js";import"./avatar-CUhi-qzb.js";import"./useQuery-7VkeRbRj.js";import"./use-view-mode-D6ejd-aW.js";import"./use-mobile-Dn42c33D.js";import"./constants-BU0VInXj.js";import"./alert-dialog-CTIXpfNf.js";import"./Plus-BJkQ4qvs.js";import"./layout-Bm2oJesN.js";import"./SearchMd-BkraDgIf.js";import"./input-BJdUVCMG.js";import"./binder-DZp12Y3n.js";const U=({size:n=24,color:e="currentColor",...i})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));U.displayName="Settings02";function de({title:n,description:e,wellKnownMcp:i,imageSrc:a,onConnected:o}){const c=ee(),{org:{slug:s}}=w(),{data:r}=q.useSession(),d=G(),[m,p]=N.useState(!1),l=async()=>{if(!(!i||!r?.user?.id)){p(!0);try{const f=await c.create.mutateAsync(i);o?.(f.id),d({to:"/$org/$project/mcps/$connectionId",params:{org:s,project:B,connectionId:f.id}})}finally{p(!1)}}},u=()=>{d({to:"/$org/$project/mcps",params:{org:s,project:B},search:{action:"create"}})};return t.jsx(R,{image:a?t.jsx("img",{src:a,alt:n,width:336,height:320,className:"max-w-full h-auto"}):null,title:n,description:e,actions:t.jsxs(t.Fragment,{children:[t.jsxs(I,{variant:"outline",onClick:l,disabled:m||!i,children:[i?.icon&&t.jsx("img",{src:i.icon,alt:"",className:"size-4"}),m?"Installing...":`Install ${i?.title||"MCP"}`]}),t.jsx(I,{variant:"outline",onClick:u,children:"Custom Connection"})]})})}function me(n){const e=L.c(35),{bindingName:i,collectionName:a,title:o,emptyState:c,wellKnownMcp:s}=n,{org:r}=w(),d=te();let m;e[0]!==d||e[1]!==i?(m={connections:d,binding:i},e[0]=d,e[1]=i,e[2]=m):m=e[2];const l=se(m)[0],u=ie(l);let f;if(e[3]!==a||e[4]!==u){let g;e[6]!==a?(g=$=>$.name.toLowerCase()===a.toLowerCase(),e[6]=a,e[7]=g):g=e[7],f=u.find(g),e[3]=a,e[4]=u,e[5]=f}else f=e[5];const S=f,[D,H]=N.useState(null),_=l&&S&&(l.id||D);let h;e[8]!==o?(h=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(M,{children:t.jsx(z,{children:t.jsx(T,{children:o})})})})})}),e[8]=o,e[9]=h):h=e[9];let j;e[10]!==l||e[11]!==r||e[12]!==o?(j=g=>{const{error:$,resetError:K}=g;return t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(oe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("h3",{className:"text-lg font-medium",children:["Failed to load ",o.toLowerCase()]}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:$?.message||"Unable to connect to the server. Please check that it is running and accessible."})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(I,{variant:"outline",onClick:K,children:[t.jsx(re,{className:"size-4"}),"Try again"]}),l&&t.jsx(I,{variant:"outline",asChild:!0,children:t.jsxs(Q,{to:"/$org/$project/mcps/$connectionId",params:{org:r.slug,project:B,connectionId:l.id},search:{tab:"settings"},children:[t.jsx(U,{className:"size-4"}),"Connection Settings"]})})]})]})},e[10]=l,e[11]=r,e[12]=o,e[13]=j):j=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),e[14]=k):k=e[14];let b;e[15]!==o?(b=o.toLowerCase(),e[15]=o,e[16]=b):b=e[16];let C;e[17]!==b?(C=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[k,t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",b,"..."]})]}),e[17]=b,e[18]=C):C=e[18];let y;e[19]!==S||e[20]!==l||e[21]!==c||e[22]!==r||e[23]!==_||e[24]!==s?(y=_?t.jsx(X,{connectionId:l.id,org:r.slug,activeCollection:S}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(de,{title:c.title,description:c.description,wellKnownMcp:s,imageSrc:c.imageSrc,onConnected:g=>{H(g)}})}),e[19]=S,e[20]=l,e[21]=c,e[22]=r,e[23]=_,e[24]=s,e[25]=y):y=e[25];let P;e[26]!==C||e[27]!==y?(P=t.jsx(N.Suspense,{fallback:C,children:y}),e[26]=C,e[27]=y,e[28]=P):P=e[28];let E;e[29]!==j||e[30]!==P?(E=t.jsx(x.Content,{children:t.jsx(ne,{fallback:j,children:P})}),e[29]=j,e[30]=P,e[31]=E):E=e[31];let v;return e[32]!==E||e[33]!==h?(v=t.jsxs(x,{children:[h,E]}),e[32]=E,e[33]=h,e[34]=v):v=e[34],v}function ue(){const n=L.c(12),{org:e,project:i}=w(),a=J();let o;n[0]!==e.id?(o={connectionId:Z,orgId:e.id},n[0]=e.id,n[1]=o):o=n[1];const c=V(o);let s;n[2]!==c||n[3]!==i?(s=async p=>{const l=i.enabledPlugins??[];if(l.includes(p))return;const u=[...l,p],f=await c.callTool({name:"PROJECT_UPDATE",arguments:{projectId:i.id,enabledPlugins:u}});return f.structuredContent??f},n[2]=c,n[3]=i,n[4]=s):s=n[4];let r;n[5]!==e.id||n[6]!==i||n[7]!==a?(r=()=>{a.invalidateQueries({queryKey:W.project(e.id,i.slug)}),a.invalidateQueries({queryKey:W.projects(e.id)})},n[5]=e.id,n[6]=i,n[7]=a,n[8]=r):r=n[8];let d;return n[9]!==s||n[10]!==r?(d={mutationFn:s,onSuccess:r,onError:pe},n[9]=s,n[10]=r,n[11]=d):d=n[11],ae(d)}function pe(n){A.error("Failed to enable plugin: "+(n instanceof Error?n.message:"Unknown error"))}function fe(n){const e=L.c(12),{pluginId:i,title:a,description:o,icon:c}=n,s=ue();let r;e[0]!==s||e[1]!==i?(r=async()=>{try{await s.mutateAsync(i),A.success("Plugin enabled!")}catch{}},e[0]=s,e[1]=i,e[2]=r):r=e[2];const d=r,m=c??null,p=s.isPending?"Enabling…":"Enable plugin";let l;e[3]!==s.isPending||e[4]!==d||e[5]!==p?(l=t.jsx(I,{onClick:d,disabled:s.isPending,children:p}),e[3]=s.isPending,e[4]=d,e[5]=p,e[6]=l):l=e[6];let u;return e[7]!==o||e[8]!==m||e[9]!==l||e[10]!==a?(u=t.jsx(R,{image:m,title:a,description:o,actions:l}),e[7]=o,e[8]=m,e[9]=l,e[10]=a,e[11]=u):u=e[11],u}const O="workflows";function at(){const n=L.c(3),{project:e}=w();if(!(e.enabledPlugins??[]).includes(O)){let c;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(M,{children:t.jsx(z,{children:t.jsx(T,{children:"Workflows"})})})})})}),n[0]=c):c=n[0];let s;return n[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs(x,{children:[c,t.jsx(x.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(fe,{pluginId:O,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(ce,{className:"size-8 text-muted-foreground"})})})})})]}),n[1]=s):s=n[1],s}let o;return n[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(me,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Run durable MCP tool calls in background."},wellKnownMcp:Y()}),n[2]=o):o=n[2],o}export{at as default};
1
+ import{r as N,u as w,d as q,b as G,j as t,O as B,c as L,aE as Q,m as J,K as W,t as A}from"./index-Chdo1wOf.js";import{a as Z,u as V,e as Y}from"./constants-DS4O9R8r.js";import{C as X}from"./collection-tab-dYtQ3dOc.js";import{g as ee,h as te}from"./use-connection-O4z2Mc_F.js";import{B as I}from"./button-BlFVi9O-.js";import{E as R}from"./empty-state-DwKYfPjb.js";import{E as ne}from"./error-boundary-DFWzxGF2.js";import{P as x}from"./index-6Tp9fsVX.js";import{B as F,a as M,b as z,c as T}from"./breadcrumb-p3FP4YzT.js";import{a as se,b as ie}from"./use-binding-DT0OPEEL.js";import{i as oe}from"./AlertTriangle-BR7J9Jvh.js";import{i as le}from"./Loading01-BZRHfswB.js";import{s as re}from"./RefreshCcw01-Ci0qepHw.js";import{u as ae}from"./useMutation-BTkDU0tp.js";import{e as ce}from"./Dataflow03-CEYvQeh9.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-D3UQPYYs.js";import"./dropdown-menu-Db2R0f6-.js";import"./Check-ebSdGxZp.js";import"./ChevronRight-D1zpPr9G.js";import"./ArrowUp-CBTnQfpb.js";import"./Grid01-BWcrgmNx.js";import"./List-DqeEnxu3.js";import"./tooltip-BWW8lvJo.js";import"./table-N5hQy-1m.js";import"./card-C5XZXHnb.js";import"./integration-icon-CHfvIBul.js";import"./Container-Cr2TCDTS.js";import"./Copy01-CfVZSokb.js";import"./DotsVertical-BNJZVkhj.js";import"./Edit01-BySGjbs-.js";import"./Eye-Wh_bq-Y4.js";import"./Trash01-DjSET-_p.js";import"./empty-state-CIZqXQMR.js";import"./Inbox01-8_gDqife.js";import"./use-list-state-DQM_pDDC.js";import"./avatar-CLzAk7bk.js";import"./useQuery-C0AkqYB7.js";import"./use-view-mode-CRJUL6S-.js";import"./use-mobile-ziAtnWz2.js";import"./constants-0nWmzfAq.js";import"./alert-dialog-DG1mgLiN.js";import"./Plus-YlJja9E2.js";import"./layout-D8HdJww7.js";import"./SearchMd-CdY2Qz31.js";import"./input-C2bYHqSZ.js";import"./binder-Yx0eVQL7.js";const U=({size:n=24,color:e="currentColor",...i})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));U.displayName="Settings02";function de({title:n,description:e,wellKnownMcp:i,imageSrc:a,onConnected:o}){const c=ee(),{org:{slug:s}}=w(),{data:r}=q.useSession(),d=G(),[m,p]=N.useState(!1),l=async()=>{if(!(!i||!r?.user?.id)){p(!0);try{const f=await c.create.mutateAsync(i);o?.(f.id),d({to:"/$org/$project/mcps/$connectionId",params:{org:s,project:B,connectionId:f.id}})}finally{p(!1)}}},u=()=>{d({to:"/$org/$project/mcps",params:{org:s,project:B},search:{action:"create"}})};return t.jsx(R,{image:a?t.jsx("img",{src:a,alt:n,width:336,height:320,className:"max-w-full h-auto"}):null,title:n,description:e,actions:t.jsxs(t.Fragment,{children:[t.jsxs(I,{variant:"outline",onClick:l,disabled:m||!i,children:[i?.icon&&t.jsx("img",{src:i.icon,alt:"",className:"size-4"}),m?"Installing...":`Install ${i?.title||"MCP"}`]}),t.jsx(I,{variant:"outline",onClick:u,children:"Custom Connection"})]})})}function me(n){const e=L.c(35),{bindingName:i,collectionName:a,title:o,emptyState:c,wellKnownMcp:s}=n,{org:r}=w(),d=te();let m;e[0]!==d||e[1]!==i?(m={connections:d,binding:i},e[0]=d,e[1]=i,e[2]=m):m=e[2];const l=se(m)[0],u=ie(l);let f;if(e[3]!==a||e[4]!==u){let g;e[6]!==a?(g=$=>$.name.toLowerCase()===a.toLowerCase(),e[6]=a,e[7]=g):g=e[7],f=u.find(g),e[3]=a,e[4]=u,e[5]=f}else f=e[5];const S=f,[D,H]=N.useState(null),_=l&&S&&(l.id||D);let h;e[8]!==o?(h=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(M,{children:t.jsx(z,{children:t.jsx(T,{children:o})})})})})}),e[8]=o,e[9]=h):h=e[9];let j;e[10]!==l||e[11]!==r||e[12]!==o?(j=g=>{const{error:$,resetError:K}=g;return t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(oe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("h3",{className:"text-lg font-medium",children:["Failed to load ",o.toLowerCase()]}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:$?.message||"Unable to connect to the server. Please check that it is running and accessible."})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(I,{variant:"outline",onClick:K,children:[t.jsx(re,{className:"size-4"}),"Try again"]}),l&&t.jsx(I,{variant:"outline",asChild:!0,children:t.jsxs(Q,{to:"/$org/$project/mcps/$connectionId",params:{org:r.slug,project:B,connectionId:l.id},search:{tab:"settings"},children:[t.jsx(U,{className:"size-4"}),"Connection Settings"]})})]})]})},e[10]=l,e[11]=r,e[12]=o,e[13]=j):j=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),e[14]=k):k=e[14];let b;e[15]!==o?(b=o.toLowerCase(),e[15]=o,e[16]=b):b=e[16];let C;e[17]!==b?(C=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[k,t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",b,"..."]})]}),e[17]=b,e[18]=C):C=e[18];let y;e[19]!==S||e[20]!==l||e[21]!==c||e[22]!==r||e[23]!==_||e[24]!==s?(y=_?t.jsx(X,{connectionId:l.id,org:r.slug,activeCollection:S}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(de,{title:c.title,description:c.description,wellKnownMcp:s,imageSrc:c.imageSrc,onConnected:g=>{H(g)}})}),e[19]=S,e[20]=l,e[21]=c,e[22]=r,e[23]=_,e[24]=s,e[25]=y):y=e[25];let P;e[26]!==C||e[27]!==y?(P=t.jsx(N.Suspense,{fallback:C,children:y}),e[26]=C,e[27]=y,e[28]=P):P=e[28];let E;e[29]!==j||e[30]!==P?(E=t.jsx(x.Content,{children:t.jsx(ne,{fallback:j,children:P})}),e[29]=j,e[30]=P,e[31]=E):E=e[31];let v;return e[32]!==E||e[33]!==h?(v=t.jsxs(x,{children:[h,E]}),e[32]=E,e[33]=h,e[34]=v):v=e[34],v}function ue(){const n=L.c(12),{org:e,project:i}=w(),a=J();let o;n[0]!==e.id?(o={connectionId:Z,orgId:e.id},n[0]=e.id,n[1]=o):o=n[1];const c=V(o);let s;n[2]!==c||n[3]!==i?(s=async p=>{const l=i.enabledPlugins??[];if(l.includes(p))return;const u=[...l,p],f=await c.callTool({name:"PROJECT_UPDATE",arguments:{projectId:i.id,enabledPlugins:u}});return f.structuredContent??f},n[2]=c,n[3]=i,n[4]=s):s=n[4];let r;n[5]!==e.id||n[6]!==i||n[7]!==a?(r=()=>{a.invalidateQueries({queryKey:W.project(e.id,i.slug)}),a.invalidateQueries({queryKey:W.projects(e.id)})},n[5]=e.id,n[6]=i,n[7]=a,n[8]=r):r=n[8];let d;return n[9]!==s||n[10]!==r?(d={mutationFn:s,onSuccess:r,onError:pe},n[9]=s,n[10]=r,n[11]=d):d=n[11],ae(d)}function pe(n){A.error("Failed to enable plugin: "+(n instanceof Error?n.message:"Unknown error"))}function fe(n){const e=L.c(12),{pluginId:i,title:a,description:o,icon:c}=n,s=ue();let r;e[0]!==s||e[1]!==i?(r=async()=>{try{await s.mutateAsync(i),A.success("Plugin enabled!")}catch{}},e[0]=s,e[1]=i,e[2]=r):r=e[2];const d=r,m=c??null,p=s.isPending?"Enabling…":"Enable plugin";let l;e[3]!==s.isPending||e[4]!==d||e[5]!==p?(l=t.jsx(I,{onClick:d,disabled:s.isPending,children:p}),e[3]=s.isPending,e[4]=d,e[5]=p,e[6]=l):l=e[6];let u;return e[7]!==o||e[8]!==m||e[9]!==l||e[10]!==a?(u=t.jsx(R,{image:m,title:a,description:o,actions:l}),e[7]=o,e[8]=m,e[9]=l,e[10]=a,e[11]=u):u=e[11],u}const O="workflows";function at(){const n=L.c(3),{project:e}=w();if(!(e.enabledPlugins??[]).includes(O)){let c;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(M,{children:t.jsx(z,{children:t.jsx(T,{children:"Workflows"})})})})})}),n[0]=c):c=n[0];let s;return n[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs(x,{children:[c,t.jsx(x.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(fe,{pluginId:O,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(ce,{className:"size-8 text-muted-foreground"})})})})})]}),n[1]=s):s=n[1],s}let o;return n[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(me,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Run durable MCP tool calls in background."},wellKnownMcp:Y()}),n[2]=o):o=n[2],o}export{at as default};
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title>MCP Mesh</title>
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <script type="module" crossorigin src="/assets/index-Dj3-TAFC.js"></script>
6
+ <script type="module" crossorigin src="/assets/index-Chdo1wOf.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/assets/index-BHAz67cr.css">
8
8
  </head>
9
9
  <body>