decocms 4.57.0 → 4.57.2

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 (229) hide show
  1. package/dist/client/assets/{AlertCircle-D3cnzdFl.js → AlertCircle-DQCGvut8.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-BzN0CH-T.js → ArrowUp-D7T7n9iH.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-B2cD_HE5.js → ArrowUpRight-BEFV2vkA.js} +1 -1
  4. package/dist/client/assets/{Check-BNJ1r_ZZ.js → Check-BEeJ8fxa.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-CPOJ2Wp3.js → CheckCircle-CsSfP7Xf.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-DsnzNuQT.js → ChevronDown-BVsraXi6.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-BBhD0GlM.js → ChevronRight-D4jesAkw.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-D6Q_nkfA.js → ChevronUp-G9frUDJZ.js} +1 -1
  9. package/dist/client/assets/{Circle-fGxkuuPA.js → Circle-D3nky9aw.js} +1 -1
  10. package/dist/client/assets/{Copy01-BAu4Xj0C.js → Copy01-DyXaUHnt.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-Br5Af1Wu.js → DotsVertical-CkzUgpIb.js} +1 -1
  12. package/dist/client/assets/{Eye-wD3Z38PE.js → Eye-Z74BlA3H.js} +1 -1
  13. package/dist/client/assets/{FilterLines-C1ERT02r.js → FilterLines-Bu3ZCrw6.js} +1 -1
  14. package/dist/client/assets/{Globe01-V_BINrXN.js → Globe01-B0Trj5Ay.js} +1 -1
  15. package/dist/client/assets/{Globe04-DJkZKNzl.js → Globe04-oRfi9_O4.js} +1 -1
  16. package/dist/client/assets/{HardDrive-B6BAyJ6K.js → HardDrive-Dx7eQadd.js} +1 -1
  17. package/dist/client/assets/{Key01-BNxG1v7t.js → Key01-DlSVTdTy.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-BPk_1GqZ.js → LayoutLeft-CPcvIk6j.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-D-CtyHyW.js → LinkExternal01-8ULSUK9E.js} +1 -1
  20. package/dist/client/assets/{List-Dj203Ohe.js → List-BrdeiVAK.js} +1 -1
  21. package/dist/client/assets/{Loading02-C0IWV4cN.js → Loading02-CBukUc03.js} +1 -1
  22. package/dist/client/assets/{Monitor01-DssScNRk.js → Monitor01-YH69hLmg.js} +1 -1
  23. package/dist/client/assets/{Package-B-bqdvW9.js → Package-BC8j5O7T.js} +1 -1
  24. package/dist/client/assets/{Palette-BuGkGM46.js → Palette-COkzmwuD.js} +1 -1
  25. package/dist/client/assets/{Play-zCBN7tLX.js → Play-fRGAaRLr.js} +1 -1
  26. package/dist/client/assets/{Plus-Dt-omGh0.js → Plus-DZ8Y2lWX.js} +1 -1
  27. package/dist/client/assets/{SearchLg-BYQJRZCi.js → SearchLg-DCnLlGR7.js} +1 -1
  28. package/dist/client/assets/{SearchMd-B2Qjb6WW.js → SearchMd-BxmBL442.js} +1 -1
  29. package/dist/client/assets/{Settings02-Bz_0GS7s.js → Settings02-Bo6T9XLP.js} +1 -1
  30. package/dist/client/assets/{Shield01-ConpppPV.js → Shield01-CJ4mz5gK.js} +1 -1
  31. package/dist/client/assets/{Star01-B83Iv0lO.js → Star01-IZ68g_xa.js} +1 -1
  32. package/dist/client/assets/{Stars01-DJjxGHI-.js → Stars01-BBDTresZ.js} +1 -1
  33. package/dist/client/assets/{Stars02-BLMhiTWQ.js → Stars02-6a4XNIIU.js} +1 -1
  34. package/dist/client/assets/{Sun-De6X_9g6.js → Sun-CE4zZZrK.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-CUV7FeTc.js → SwitchHorizontal01-60hw4Alk.js} +1 -1
  36. package/dist/client/assets/{Tool01-DLcYbuFj.js → Tool01-B4Z7JhlQ.js} +1 -1
  37. package/dist/client/assets/{Tool02-Dr0ehMyZ.js → Tool02-BY98RBMi.js} +1 -1
  38. package/dist/client/assets/{Trash01-mZHwgp1-.js → Trash01-B9pw3Dz-.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-BNqORnzv.js → TrendUp01-C8HikdRN.js} +1 -1
  40. package/dist/client/assets/{Upload01-BuA9ot87.js → Upload01-DwHzJTDj.js} +1 -1
  41. package/dist/client/assets/{User01-MvOQlNju.js → User01-0_lYU3sr.js} +1 -1
  42. package/dist/client/assets/{Users01-BZSK_B1-.js → Users01-BA0tYZge.js} +1 -1
  43. package/dist/client/assets/{Users03-Y84iQse-.js → Users03-DGfmL8ng.js} +1 -1
  44. package/dist/client/assets/{X-YIvA-_pe.js → X-bCYPxEGT.js} +1 -1
  45. package/dist/client/assets/{XCircle-DKXe3k9J.js → XCircle-DP6KZoJI.js} +1 -1
  46. package/dist/client/assets/{XClose-D0NVkf_i.js → XClose-Cy2zn03A.js} +1 -1
  47. package/dist/client/assets/{Zap-CUvuhi9A.js → Zap-rVhVjFMk.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-CY37Lf7c.js → ZapSquare-CojtzYzX.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-r0vOUHRG.js → ZoomOut-HiEViCQt.js} +1 -1
  50. package/dist/client/assets/{access-gate-CKUqtBOJ.js → access-gate-CW4lpdxL.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-DKsF7sSJ.js → add-section-modal-CKPdN6QS.js} +1 -1
  52. package/dist/client/assets/{agent-capabilities-Cu56F_i8.js → agent-capabilities-Crp4S07c.js} +1 -1
  53. package/dist/client/assets/{agent-icon-Dr6P3HqV.js → agent-icon-B3Khwrxs.js} +1 -1
  54. package/dist/client/assets/{agents-list-DTSN7igj.js → agents-list-DwwU9Hnm.js} +1 -1
  55. package/dist/client/assets/{ai-providers-DxpvY8Xq.js → ai-providers-eeNsHUnH.js} +1 -1
  56. package/dist/client/assets/{alert-Co2xjw2G.js → alert-C5yvBlhG.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-CUjDTN7-.js → alert-dialog-DDJF6hNh.js} +1 -1
  58. package/dist/client/assets/app-editor-DAsGG8dk.js +1 -0
  59. package/dist/client/assets/{auth-catchall-BhV9DtTq.js → auth-catchall-B6qliEa1.js} +1 -1
  60. package/dist/client/assets/{auth-entry-diN8AkVl.js → auth-entry-mmqAi7ho.js} +1 -1
  61. package/dist/client/assets/{auth-C9iIe2kv.js → auth-iC_q9BIr.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-CTIiCZNr.js → auth-split-layout-CLn74vff.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-Vd9vmHjz.js → authenticate-and-persist-oauth-BNnoe036.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-BKO_piDp.js → automation-list-row-LFCTBiwF.js} +1 -1
  65. package/dist/client/assets/{automation-runs-BkFFieCy.js → automation-runs-Dx0I1hOP.js} +1 -1
  66. package/dist/client/assets/{automations-CG3sc3oG.js → automations-BjKfIDQh.js} +1 -1
  67. package/dist/client/assets/{autosend-C2rU-44v.js → autosend-BRQL6Rcu.js} +1 -1
  68. package/dist/client/assets/{avatar-ByOhaJol.js → avatar-Y-6cgdhP.js} +1 -1
  69. package/dist/client/assets/{badge-CRy062gb.js → badge-CDBU7Jnw.js} +1 -1
  70. package/dist/client/assets/{block-document-D6kqegv0.js → block-document-C3ckqHj2.js} +1 -1
  71. package/dist/client/assets/{brand-context-ClcJkWx2.js → brand-context-DAj-SFs1.js} +1 -1
  72. package/dist/client/assets/{breadcrumb-CCgTXuTu.js → breadcrumb-BcIGB1Or.js} +1 -1
  73. package/dist/client/assets/{buckets-D0CsHwti.js → buckets-BKE9WN4t.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-B7T2KgQ4.js → bulk-category-panel-B-LV8g2E.js} +1 -1
  75. package/dist/client/assets/{calendar-D1PPhgCr.js → calendar-D1uldZAa.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-DyrDJ9Cw.js → capability-load-error-DJ84c_wk.js} +1 -1
  77. package/dist/client/assets/{card-D2Pvx0lh.js → card-PDwkjkZo.js} +1 -1
  78. package/dist/client/assets/{category-editor-BLJq84ha.js → category-editor-CRZnesMJ.js} +1 -1
  79. package/dist/client/assets/{chat-context-DBk23W1i.js → chat-context-DHTaLNyE.js} +1 -1
  80. package/dist/client/assets/{checkbox-CsimGysH.js → checkbox-Gk-F98s7.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-wyohFT9U.js → cli-auth-success-Bf_4v7L8.js} +1 -1
  82. package/dist/client/assets/{collection-detail-AhzR3rVc.js → collection-detail-B_n2rihW.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-DnJY6tXW.js → collection-display-button-BHXd0hJ0.js} +1 -1
  84. package/dist/client/assets/{collection-search-Lq-ombG1.js → collection-search-C94-PhCw.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-CICgrqaH.js → collection-table-wrapper-Bu0j3VFq.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-CBCFNXb9.js → collection-tabs-BM-YDljB.js} +1 -1
  87. package/dist/client/assets/{command-CRwBEulT.js → command-D4Q48wPz.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-8Q9MJv_V.js → commerce-onboarding-nAX-PPzc.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-FisDgCiZ.js → connect-desktop-dialog-C-AzZ9uU.js} +1 -1
  90. package/dist/client/assets/{connection-card-B8REmMqc.js → connection-card-CmtTMlc6.js} +1 -1
  91. package/dist/client/assets/{connection-detail-Isvs_Mog.js → connection-detail-BxkxPzQa.js} +1 -1
  92. package/dist/client/assets/{connection-form-helpers-DDxVRT5Y.js → connection-form-helpers-ChroeVON.js} +1 -1
  93. package/dist/client/assets/{connections-Bnb7ogOq.js → connections-1FquVkUb.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-DNkKga7o.js → decopilot-sse-pool-Cb8qqxEJ.js} +1 -1
  95. package/dist/client/assets/{dialog-B61dhXu_.js → dialog-mPkr-RRK.js} +1 -1
  96. package/dist/client/assets/{domain-settings-DG8SxlKF.js → domain-settings-Bxn6YUIN.js} +1 -1
  97. package/dist/client/assets/{drawer-aoaMk7z8.js → drawer-B8TNUPgG.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-DLTuMo7E.js → dropdown-menu-B0v0032v.js} +1 -1
  99. package/dist/client/assets/{empty-state-Bq1aBwMS.js → empty-state-DpnHm9Ff.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-Dq1PTvcO.js → extract-connection-data-CrDh9fRV.js} +1 -1
  101. package/dist/client/assets/{file-explorer-CdNKEVa3.js → file-explorer-BdaIcZQu.js} +1 -1
  102. package/dist/client/assets/{file-type-icon-D1JH2mH0.js → file-type-icon-C6k5FmYJ.js} +1 -1
  103. package/dist/client/assets/{files-BV0jOFsW.js → files-DpxNGuGX.js} +1 -1
  104. package/dist/client/assets/{form-DfX3fOo3.js → form-h_6je5dw.js} +1 -1
  105. package/dist/client/assets/{general-Cdbz_ZZT.js → general-CzAYaKfe.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-BjJCs2f7.js → github-repo-picker-tThpI_5I.js} +1 -1
  107. package/dist/client/assets/{hooks-8jy8m2s-.js → hooks-Cb3Qy_Dc.js} +1 -1
  108. package/dist/client/assets/{index-BcVIiR-x.js → index-BeENLzbG.js} +1 -1
  109. package/dist/client/assets/{index-B5RXHgAk.js → index-BjHyzbtR.js} +1 -1
  110. package/dist/client/assets/{index-BYmL_rjk.js → index-Bl_XoHF-.js} +1 -1
  111. package/dist/client/assets/{index-DAhGVBZA.js → index-BtB12M4y.js} +1 -1
  112. package/dist/client/assets/{index-Db52B_Op.js → index-C0SPe6C9.js} +1 -1
  113. package/dist/client/assets/{index-DpV-oaZ2.js → index-D75hG9Mx.js} +1 -1
  114. package/dist/client/assets/{index-u-LoOG2E.js → index-D7lYswsa.js} +1 -1
  115. package/dist/client/assets/{index-JUbP3UvY.js → index-D8u7pwON.js} +1 -1
  116. package/dist/client/assets/{index-DY-Vjty1.js → index-DD5ljKuD.js} +5 -5
  117. package/dist/client/assets/{index-Xcp-N_U6.js → index-DSn_1D7b.js} +3 -3
  118. package/dist/client/assets/{index-Bc9IH_Rj.js → index-D_Pdja_K.js} +1 -1
  119. package/dist/client/assets/{index-CTnB5U8a.js → index-Dgo5nlaH.js} +1 -1
  120. package/dist/client/assets/{index-DjL-FWQx.js → index-el6kTH3I.js} +1 -1
  121. package/dist/client/assets/{index-C66OI8d8.js → index-icYCRExU.js} +1 -1
  122. package/dist/client/assets/{index-redirect-CzsTcMv8.js → index-redirect-6phzSyPm.js} +1 -1
  123. package/dist/client/assets/{input-DI99t5q0.js → input-nFXBUvLG.js} +1 -1
  124. package/dist/client/assets/{integration-icon-Bl-snMvi.js → integration-icon-CsT4Vm35.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-C8cOnhH8.js → invite-member-dialog-HImcbPYG.js} +1 -1
  126. package/dist/client/assets/{label-CJdiB8qx.js → label-BBor9OYw.js} +1 -1
  127. package/dist/client/assets/{layout-ChU0sWsc.js → layout-HBls_j3M.js} +1 -1
  128. package/dist/client/assets/{login-Chwnk_2V.js → login-C1z8WfZx.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-D7VV70lM.js → mcp-oauth-Cx2xXJpN.js} +1 -1
  130. package/dist/client/assets/{members-BiFgSS2L.js → members-DqxuSRlg.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-CUw7ibll.js → monaco-editor-Xh2wk8Tp.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-DPBzm0EO.js → monitoring-stats-row-DOoEOmXM.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-B8YqWEuy.js → oauth-callback-D6VCxkRw.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-CIfQW-Dv.js → oauth-callback-ai-provider-DYyPEDo4.js} +1 -1
  135. package/dist/client/assets/{onboarding-C2CmyZ-H.js → onboarding-DVl-fCKX.js} +1 -1
  136. package/dist/client/assets/{org-install-vh7tDZs5.js → org-install-BzILOYuY.js} +1 -1
  137. package/dist/client/assets/{org-layout-B3ZCbcLS.js → org-layout-laXMj9ba.js} +1 -1
  138. package/dist/client/assets/{organization-choice-dLEhT2u4.js → organization-choice-C1pQcp6T.js} +1 -1
  139. package/dist/client/assets/{orgs-DIH0d4UJ.js → orgs-Bc8QR1cA.js} +1 -1
  140. package/dist/client/assets/{page-seo-form-Bk60FWOG.js → page-seo-form-C6Pv2Hrd.js} +1 -1
  141. package/dist/client/assets/page-seo-sheet-Bug-S7y6.js +1 -0
  142. package/dist/client/assets/{popover-a3AYr8FM.js → popover-CgzT12BA.js} +1 -1
  143. package/dist/client/assets/{post-editor-XKYKP_M-.js → post-editor-BoWGvi2D.js} +1 -1
  144. package/dist/client/assets/{primitives-DVzORHOZ.js → primitives-CVV5R_ix.js} +1 -1
  145. package/dist/client/assets/{profile-kUHgERT8.js → profile-B7SVI-oN.js} +1 -1
  146. package/dist/client/assets/project-app-view-CKjkrpiR.js +1 -0
  147. package/dist/client/assets/record-editor-_6aJOrjd.js +1 -0
  148. package/dist/client/assets/registry-Ci8iRoo4.js +2 -0
  149. package/dist/client/assets/{registry-layout-FTw6ygVD.js → registry-layout-BSextZQo.js} +1 -1
  150. package/dist/client/assets/{reports-Dp7f1t1V.js → reports-BPMxCBex.js} +1 -1
  151. package/dist/client/assets/{require-capability-Dog37Thz.js → require-capability-DvnraaMn.js} +1 -1
  152. package/dist/client/assets/{required-auth-layout-DQu1LPap.js → required-auth-layout-D9qojMWR.js} +1 -1
  153. package/dist/client/assets/{reset-password-pxHxHgwr.js → reset-password-ClkV8uQd.js} +1 -1
  154. package/dist/client/assets/{roles-COf1M9cU.js → roles-BeLiefT1.js} +1 -1
  155. package/dist/client/assets/{search-input-DxSVOaMg.js → search-input-Dn0hSWZ5.js} +1 -1
  156. package/dist/client/assets/{secrets-WR9Wna8x.js → secrets-e4SIb0hm.js} +1 -1
  157. package/dist/client/assets/{sections-editor-D6a8uYU8.js → sections-editor-BxFAXK53.js} +1 -1
  158. package/dist/client/assets/{select-dRnqHBn4.js → select-CviXI9ki.js} +1 -1
  159. package/dist/client/assets/{select-model-DFDDErp_.js → select-model-BVeB6qMz.js} +1 -1
  160. package/dist/client/assets/{seo-editor-S7GOJ4X5.js → seo-editor-C2cy6kyj.js} +1 -1
  161. package/dist/client/assets/{settings-layout-BoMrG_Nj.js → settings-layout-iJMVXYnp.js} +1 -1
  162. package/dist/client/assets/{settings-section-a7bswDu8.js → settings-section-VSZi6AlU.js} +1 -1
  163. package/dist/client/assets/{shell-controls-BQne2jTL.js → shell-controls-D0LeXgkd.js} +1 -1
  164. package/dist/client/assets/{shell-layout-OOUrPqwN.js → shell-layout-CVOU9xRB.js} +1 -1
  165. package/dist/client/assets/{sidebar-C7Kgs7d6.js → sidebar-CmQSAjPL.js} +1 -1
  166. package/dist/client/assets/{skeleton-C0UA8wWi.js → skeleton-CcEQud32.js} +1 -1
  167. package/dist/client/assets/{sso-C6Qb0LPv.js → sso-C5qh7UXa.js} +1 -1
  168. package/dist/client/assets/{store-BcnLCCVE.js → store-f-uGRwHZ.js} +1 -1
  169. package/dist/client/assets/store-registry-3gItvs85.js +2 -0
  170. package/dist/client/assets/{studio-tools-wyYbyuHj.js → studio-tools-E9yDf3_0.js} +1 -1
  171. package/dist/client/assets/{switch-Cy9SN-e4.js → switch-QOV1_3MP.js} +1 -1
  172. package/dist/client/assets/{table-CenyJvQz.js → table-B6d_9e6u.js} +1 -1
  173. package/dist/client/assets/{tabs-YZu7Beta.js → tabs-BEnBthXe.js} +1 -1
  174. package/dist/client/assets/{textarea-QB4oL1jQ.js → textarea-Dl16KMAC.js} +1 -1
  175. package/dist/client/assets/{toggle-group-BXW4LXue.js → toggle-group-lOSgrtpS.js} +1 -1
  176. package/dist/client/assets/{toolbar-DEi9uqBh.js → toolbar-CC2Wp6FF.js} +1 -1
  177. package/dist/client/assets/{toolbar-icon-button-LzSRezP8.js → toolbar-icon-button-Dxmr2sEF.js} +1 -1
  178. package/dist/client/assets/{tools-list-BHNz7u8m.js → tools-list-C9rz13Xx.js} +1 -1
  179. package/dist/client/assets/{tooltip-DtvF0ixx.js → tooltip-M_e_krSv.js} +1 -1
  180. package/dist/client/assets/{types-DQj5nGgp.js → types-CqK4Iemy.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-B2Fv-cW3.js → use-ai-providers-CSQgALBc.js} +1 -1
  182. package/dist/client/assets/{use-automations-BY62J7aO.js → use-automations-B73FT1wm.js} +1 -1
  183. package/dist/client/assets/{use-capability-BaDqUcBw.js → use-capability-aTF0AI3e.js} +1 -1
  184. package/dist/client/assets/{use-clock-tick-4f6maey2.js → use-clock-tick-CCTl5Yxu.js} +1 -1
  185. package/dist/client/assets/{use-collections-CM6JRAhl.js → use-collections-Ce-cuEBy.js} +1 -1
  186. package/dist/client/assets/{use-connection-cd2aaVLL.js → use-connection-hkUuQBrT.js} +1 -1
  187. package/dist/client/assets/{use-copy-aTYwTsgd.js → use-copy-Dijkn7yI.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-BKaSFnSh.js → use-create-virtual-mcp-GoXz08-t.js} +1 -1
  189. package/dist/client/assets/{use-debounced-autosave-BTZkbhnw.js → use-debounced-autosave-jg3g3c9r.js} +1 -1
  190. package/dist/client/assets/{use-debounced-value-lP8dZ8tm.js → use-debounced-value-DaMxSpzh.js} +1 -1
  191. package/dist/client/assets/{use-decopilot-events-C1Ney9sB.js → use-decopilot-events-Cxs4WDOZ.js} +1 -1
  192. package/dist/client/assets/{use-delete-connection-BE3nGK36.js → use-delete-connection-BlA3-BWP.js} +1 -1
  193. package/dist/client/assets/{use-deployment-admin-DSWfyGE0.js → use-deployment-admin-D-vSLeTr.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-DdY_qwh8.js → use-file-configs-CQ4BSXsE.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-D3nTGgD9.js → use-infinite-scroll-D7VcwF5k.js} +1 -1
  196. package/dist/client/assets/{use-join-requests-qL0je9Tl.js → use-join-requests-BjfgTura.js} +1 -1
  197. package/dist/client/assets/{use-mcp-client-DWIZK6tn.js → use-mcp-client-B9awT5X_.js} +1 -1
  198. package/dist/client/assets/{use-mcp-prompts-ne91rAIM.js → use-mcp-prompts-EOAbT9yX.js} +1 -1
  199. package/dist/client/assets/{use-mcp-tools-fijJgXqm.js → use-mcp-tools-BzGw36c7.js} +1 -1
  200. package/dist/client/assets/{use-members-YYmJGXuB.js → use-members-NrGwwdtD.js} +1 -1
  201. package/dist/client/assets/{use-mobile-Dkgnu8T2.js → use-mobile-CkmVE_-7.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-cuyKflga.js → use-navigate-to-agent-B5-47yrA.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-C6wlTiiN.js → use-org-auth-client-BaKQjOSf.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-CwDM8XwI.js → use-org-sso-By_u0hEv.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-D5Ne1xhN.js → use-organization-roles-izeSBzjT.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-GpvuXm8t.js → use-organization-settings-C5RS8nea.js} +1 -1
  207. package/dist/client/assets/{use-registry-connections-BpBy3AfC.js → use-registry-connections-BqTrjEc0.js} +1 -1
  208. package/dist/client/assets/{use-secrets-Ba-Du0WQ.js → use-secrets-BXostql4.js} +1 -1
  209. package/dist/client/assets/{use-status-sounds-DkD3mqOb.js → use-status-sounds-CqFkTrqw.js} +1 -1
  210. package/dist/client/assets/{use-view-mode-BIP_tFk9.js → use-view-mode-CcTBUhei.js} +1 -1
  211. package/dist/client/assets/{use-virtual-mcp-h-le_2wx.js → use-virtual-mcp-CymLeNR8.js} +1 -1
  212. package/dist/client/assets/useInfiniteQuery-BqDEFx1l.js +1 -0
  213. package/dist/client/assets/{useRouterState-PFsDpT15.js → useRouterState-DMxFySuU.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-BnQw-mx8.js +1 -0
  215. package/dist/client/assets/{users-DUnaq5DP.js → users-KcJjBogC.js} +1 -1
  216. package/dist/client/assets/{variant-calendar-CfPHHrSP.js → variant-calendar-B64RcPST.js} +1 -1
  217. package/dist/client/assets/{view-mode-toggle-C4rBrCyP.js → view-mode-toggle-GEAV0tV-.js} +1 -1
  218. package/dist/client/index.html +1 -1
  219. package/dist/server/cli.js +446 -446
  220. package/dist/server/server.js +301 -301
  221. package/package.json +1 -1
  222. package/dist/client/assets/app-editor-9svW_gNG.js +0 -1
  223. package/dist/client/assets/page-seo-sheet-DiheWa_Y.js +0 -1
  224. package/dist/client/assets/project-app-view-CXA00X47.js +0 -1
  225. package/dist/client/assets/record-editor-D93p_T3n.js +0 -1
  226. package/dist/client/assets/registry-BqANW9QR.js +0 -2
  227. package/dist/client/assets/store-registry-DvN3Y3Us.js +0 -2
  228. package/dist/client/assets/useInfiniteQuery-BZ_T8fFy.js +0 -1
  229. package/dist/client/assets/useSuspenseInfiniteQuery-DVOYJu_p.js +0 -1
@@ -1 +1 @@
1
- import{a5 as ke,a as en,Z as un,M as mn,J as pn,j as e,B as J,t as X,r as le,n as hn,b as fn,i as Se,R as C,K as pe,c as xn,a2 as gn,Y as jn,l as vn,m as yn}from"./index-Xcp-N_U6.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Le}from"./connection-card-B8REmMqc.js";import{C as bn}from"./collection-search-Lq-ombG1.js";import{C as Nn}from"./collection-tabs-CBCFNXb9.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-Dq1PTvcO.js";import{e as sn,d as on,D as an,a as rn,f as An,c as Dn}from"./dialog-B61dhXu_.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Mn,e as Bn,f as On}from"./drawer-aoaMk7z8.js";import{u as Ln}from"./use-mobile-Dkgnu8T2.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-DfX3fOo3.js";import{I as Y}from"./input-DI99t5q0.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-dRnqHBn4.js";import{T as Kn}from"./textarea-QB4oL1jQ.js";import{b as cn}from"./use-connection-cd2aaVLL.js";import{n as Ie,i as Re}from"./Tool02-Dr0ehMyZ.js";import{s as $e}from"./Star01-B83Iv0lO.js";import{am as Hn}from"./agent-icon-Dr6P3HqV.js";import{s as Un}from"./XClose-D0NVkf_i.js";import{c as Xn,i as Ne,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-DDxVRT5Y.js";import{u as Ye}from"./use-infinite-scroll-D3nTGgD9.js";import{a as Ee}from"./authenticate-and-persist-oauth-Vd9vmHjz.js";import{B as we}from"./badge-CRy062gb.js";import{T as ze,a as Ke,b as He}from"./tooltip-DtvF0ixx.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DVOYJu_p.js";import{u as Jn}from"./use-mcp-client-DWIZK6tn.js";import{S as Zn}from"./constants-CaIX_f5U.js";import{i as Je}from"./Check-BNJ1r_ZZ.js";import{s as et}from"./Plus-Dt-omGh0.js";import{u as nt}from"./studio-tools-wyYbyuHj.js";import{u as tt}from"./use-ai-providers-B2Fv-cW3.js";function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Ln(),z=cn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),r=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Gn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,c=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",c=t.connection_token||null);const N=wn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Type *"}),e.jsxs(Rn,{value:t.value,onValueChange:t.onChange,children:[e.jsx($,{children:e.jsx($n,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(E,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"NPM Package *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Command *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Arguments"}),e.jsx($,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Working Directory"}),e.jsx($,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(E,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Environment Variables"}),e.jsx($,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(E,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"URL *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:x?.token?.label??"Token (optional)"}),e.jsx($,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Name *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Description"}),e.jsx($,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(E,{})]})})]});return D?e.jsx(Pn,{open:s,onOpenChange:K,children:e.jsxs(Tn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Vn,{children:k}),e.jsx(Mn,{className:"mt-1",children:H})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(On,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:k}),e.jsx(An,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(Dn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=xn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),r=le.useDeferredValue(y),K=y!==r;let b;n[0]!==r?(b=r.trim().toLowerCase(),n[0]=r,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=gn(jn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const c=Jn(a),j=r?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(c,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Cn(Xe),ln=new Set(Xe.filter(ct).map(rt)),xe=nn(),G=tn(xe,r),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),ce=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=_n(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),S(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,be=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&ce&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Re,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let re;n[61]!==ee||n[62]!==ae||n[63]!==ie?(re=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=re):re=n[64];let Ce;return n[65]!==Z||n[66]!==re?(Ce=e.jsxs(e.Fragment,{children:[Z,re]}),n[65]=Z,n[66]=re,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Kt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:c,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:r}=ke(),{data:K}=en.useSession(),b=cn(),k=hn(),H=fn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const c=a.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Ee({connectionId:v,orgId:r.id,orgSlug:r.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${r.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(c){console.error("Failed to add connection:",c),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!r||!K?.user?.id)){o(a.id);try{const c=In(a,r.id,K.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",N=!!c.connection_url,v=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(c),w=await Ee({connectionId:u,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,c.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,c.app_name??null,"new"),l(u)}catch(c){console.error("Failed to connect:",c),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(bn,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const c=await Ee({connectionId:a,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:c.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${c.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Ht(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(r=>r.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const r=Ze.get(s.id);P.current.get(s.id)&&r!=null&&l>r&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-r,previous_balance_cents:r,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Ut(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Xt(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function qt(s){return Ue(s).status==="attached"}function Gt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Wt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}export{Kt as A,Qt as a,Xt as b,qt as c,Gt as d,Wt as f,Ut as g,Ue as r,Ht as u};
1
+ import{a5 as ke,a as en,Z as un,M as mn,J as pn,j as e,B as J,t as X,r as le,n as hn,b as fn,i as Se,R as C,K as pe,c as xn,a2 as gn,Y as jn,l as vn,m as yn}from"./index-DSn_1D7b.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Le}from"./connection-card-CmtTMlc6.js";import{C as bn}from"./collection-search-C94-PhCw.js";import{C as Nn}from"./collection-tabs-BM-YDljB.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-CrDh9fRV.js";import{e as sn,d as on,D as an,a as rn,f as An,c as Dn}from"./dialog-mPkr-RRK.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Mn,e as Bn,f as On}from"./drawer-B8TNUPgG.js";import{u as Ln}from"./use-mobile-CkmVE_-7.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-h_6je5dw.js";import{I as Y}from"./input-nFXBUvLG.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-CviXI9ki.js";import{T as Kn}from"./textarea-Dl16KMAC.js";import{b as cn}from"./use-connection-hkUuQBrT.js";import{n as Ie,i as Re}from"./Tool02-BY98RBMi.js";import{s as $e}from"./Star01-IZ68g_xa.js";import{am as Hn}from"./agent-icon-B3Khwrxs.js";import{s as Un}from"./XClose-Cy2zn03A.js";import{c as Xn,i as Ne,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-ChroeVON.js";import{u as Ye}from"./use-infinite-scroll-D7VcwF5k.js";import{a as Ee}from"./authenticate-and-persist-oauth-BNnoe036.js";import{B as we}from"./badge-CDBU7Jnw.js";import{T as ze,a as Ke,b as He}from"./tooltip-M_e_krSv.js";import{u as Yn}from"./useSuspenseInfiniteQuery-BnQw-mx8.js";import{u as Jn}from"./use-mcp-client-B9awT5X_.js";import{S as Zn}from"./constants-CaIX_f5U.js";import{i as Je}from"./Check-BEeJ8fxa.js";import{s as et}from"./Plus-DZ8Y2lWX.js";import{u as nt}from"./studio-tools-E9yDf3_0.js";import{u as tt}from"./use-ai-providers-CSQgALBc.js";function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Ln(),z=cn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),r=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Gn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,c=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",c=t.connection_token||null);const N=wn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Type *"}),e.jsxs(Rn,{value:t.value,onValueChange:t.onChange,children:[e.jsx($,{children:e.jsx($n,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(E,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"NPM Package *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Command *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Arguments"}),e.jsx($,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Working Directory"}),e.jsx($,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(E,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Environment Variables"}),e.jsx($,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(E,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"URL *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:x?.token?.label??"Token (optional)"}),e.jsx($,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Name *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Description"}),e.jsx($,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(E,{})]})})]});return D?e.jsx(Pn,{open:s,onOpenChange:K,children:e.jsxs(Tn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Vn,{children:k}),e.jsx(Mn,{className:"mt-1",children:H})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(On,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:k}),e.jsx(An,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(Dn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=xn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),r=le.useDeferredValue(y),K=y!==r;let b;n[0]!==r?(b=r.trim().toLowerCase(),n[0]=r,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=gn(jn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const c=Jn(a),j=r?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(c,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Cn(Xe),ln=new Set(Xe.filter(ct).map(rt)),xe=nn(),G=tn(xe,r),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),ce=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=_n(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),S(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,be=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&ce&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Re,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let re;n[61]!==ee||n[62]!==ae||n[63]!==ie?(re=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=re):re=n[64];let Ce;return n[65]!==Z||n[66]!==re?(Ce=e.jsxs(e.Fragment,{children:[Z,re]}),n[65]=Z,n[66]=re,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Kt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:c,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:r}=ke(),{data:K}=en.useSession(),b=cn(),k=hn(),H=fn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const c=a.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Ee({connectionId:v,orgId:r.id,orgSlug:r.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${r.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(c){console.error("Failed to add connection:",c),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!r||!K?.user?.id)){o(a.id);try{const c=In(a,r.id,K.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",N=!!c.connection_url,v=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(c),w=await Ee({connectionId:u,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,c.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,c.app_name??null,"new"),l(u)}catch(c){console.error("Failed to connect:",c),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(bn,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const c=await Ee({connectionId:a,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:c.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${c.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Ht(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(r=>r.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const r=Ze.get(s.id);P.current.get(s.id)&&r!=null&&l>r&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-r,previous_balance_cents:r,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Ut(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Xt(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function qt(s){return Ue(s).status==="attached"}function Gt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Wt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}export{Kt as A,Qt as a,Xt as b,qt as c,Gt as d,Wt as f,Ut as g,Ue as r,Ht as u};