decocms 4.22.1 → 4.22.3

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 (223) hide show
  1. package/dist/client/assets/{AlertCircle-hfr9WJXe.js → AlertCircle-CS_9RDbg.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-DBXurizV.js → ArrowUpRight-DvbKSlUB.js} +1 -1
  3. package/dist/client/assets/{Check-DhEV1E4F.js → Check-CUUu6fuS.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CbuPUNoj.js → CheckCircle-2nPR7mAJ.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BJvvkmIr.js → ChevronDown-SbVNxwJa.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-BP1EbKKr.js → ChevronRight-CcT_Yai8.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-CVqQKtsY.js → ChevronUp-DvAb8S9K.js} +1 -1
  8. package/dist/client/assets/{Circle-BnMDtDeu.js → Circle-Bk2OeGHv.js} +1 -1
  9. package/dist/client/assets/{Copy01-Cm6DymEJ.js → Copy01-DvnmgpBw.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BU3qKzJo.js → DotsVertical-BdQp-tpJ.js} +1 -1
  11. package/dist/client/assets/{Eye-CtocRVwR.js → Eye-_b_nmYda.js} +1 -1
  12. package/dist/client/assets/{FilterLines-XaejSF3d.js → FilterLines-Dgm9Ju0X.js} +1 -1
  13. package/dist/client/assets/{Globe01-CxIEuzOP.js → Globe01-BWEVPBr8.js} +1 -1
  14. package/dist/client/assets/{Globe04-DZ-Pm9xo.js → Globe04-wcXsSWcH.js} +1 -1
  15. package/dist/client/assets/{HardDrive-C2sIA93N.js → HardDrive-CCq9xvHa.js} +1 -1
  16. package/dist/client/assets/{Key01-D8bQG_zp.js → Key01-BXrc6Emy.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-C8PdEJOQ.js → LayoutLeft-BStzo30s.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-D58rAWvm.js → LinkExternal01-BuzymGhb.js} +1 -1
  19. package/dist/client/assets/{List-vf0HKUEp.js → List-BFtSkA22.js} +1 -1
  20. package/dist/client/assets/{Loading02-DejqZGnO.js → Loading02-Cc_XPeVS.js} +1 -1
  21. package/dist/client/assets/{Monitor01-CodDwsVO.js → Monitor01-BJSW7YEH.js} +1 -1
  22. package/dist/client/assets/{Palette-CgTelSEQ.js → Palette-BudWH9og.js} +1 -1
  23. package/dist/client/assets/{Play-Dh4_54hC.js → Play-tpQoZZ7-.js} +1 -1
  24. package/dist/client/assets/{Plus-DX9uB6jT.js → Plus-6nUvzb_a.js} +1 -1
  25. package/dist/client/assets/{SearchLg-D0ZqoPSb.js → SearchLg-uOXEhZpb.js} +1 -1
  26. package/dist/client/assets/{SearchMd-DWSBWjan.js → SearchMd-CxCfJ-k7.js} +1 -1
  27. package/dist/client/assets/{Settings02-CZ9vMUyw.js → Settings02-C4te5XIh.js} +1 -1
  28. package/dist/client/assets/{Shield01-DvUXE0jO.js → Shield01-DL0nLXwm.js} +1 -1
  29. package/dist/client/assets/{Star01-7qhyucrX.js → Star01-BMo746nc.js} +1 -1
  30. package/dist/client/assets/{Stars01-DN1mvd59.js → Stars01-CeLaUJek.js} +1 -1
  31. package/dist/client/assets/{Stars02-CFivD_f8.js → Stars02-CbNiaecd.js} +1 -1
  32. package/dist/client/assets/{Sun-CHp4Y1Dq.js → Sun-DdZgJrCs.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-sG-IqCt6.js → SwitchHorizontal01-BmduH4aR.js} +1 -1
  34. package/dist/client/assets/{Tool01-DGnLcysQ.js → Tool01-TTGB3OaR.js} +1 -1
  35. package/dist/client/assets/{Trash01-CAEn55T5.js → Trash01-D7DoI-Sm.js} +1 -1
  36. package/dist/client/assets/{Upload01-DKn5tYXN.js → Upload01-DK0nNkQH.js} +1 -1
  37. package/dist/client/assets/{User01-IYcmkjnc.js → User01-zyFcbX02.js} +1 -1
  38. package/dist/client/assets/{Users01-0WxprMle.js → Users01-DD6y7ZFy.js} +1 -1
  39. package/dist/client/assets/{Users03-DHP7OUDR.js → Users03-CbmB3ag4.js} +1 -1
  40. package/dist/client/assets/{X-BWG-JTku.js → X-qcmmBu7s.js} +1 -1
  41. package/dist/client/assets/{XCircle-C94QFqN0.js → XCircle-Bn7fkWKh.js} +1 -1
  42. package/dist/client/assets/{XClose-CQikaAXa.js → XClose-aB151tNh.js} +1 -1
  43. package/dist/client/assets/{Zap-DeHaXJHA.js → Zap-CKOdamGS.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-DBjTUciD.js → ZapSquare-BWJNUjCu.js} +1 -1
  45. package/dist/client/assets/{ZoomOut-DltoXGbL.js → ZoomOut-TFjut-PL.js} +1 -1
  46. package/dist/client/assets/{access-gate-CaRDuo1w.js → access-gate-BrC4x4bH.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-Dkbb81MA.js → add-section-modal-CMgGjfQy.js} +1 -1
  48. package/dist/client/assets/{agent-capabilities-BBWlBKsQ.js → agent-capabilities-B_99zpHP.js} +1 -1
  49. package/dist/client/assets/{agent-icon-CuxkxUe-.js → agent-icon-CPQk4YwJ.js} +1 -1
  50. package/dist/client/assets/{agents-list-BiXTIWXs.js → agents-list-nbmqgS_E.js} +1 -1
  51. package/dist/client/assets/{ai-providers-BQfoPc8M.js → ai-providers-D0wJFLuS.js} +1 -1
  52. package/dist/client/assets/{alert-BU-LVOFa.js → alert-CIXXRGUS.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-BLM89Cw2.js → alert-dialog-DmHjxQGj.js} +1 -1
  54. package/dist/client/assets/{app-editor-BxQrAgCs.js → app-editor-BsolX872.js} +1 -1
  55. package/dist/client/assets/{auth-By4coGKl.js → auth-D0kIsFu2.js} +1 -1
  56. package/dist/client/assets/{auth-catchall-CZA5Hfvu.js → auth-catchall-DqYoQiw7.js} +1 -1
  57. package/dist/client/assets/{auth-entry-HXEUnKNQ.js → auth-entry-D3jHJu3A.js} +1 -1
  58. package/dist/client/assets/{auth-split-layout-X0hXvUdh.js → auth-split-layout-CX7sxZli.js} +1 -1
  59. package/dist/client/assets/{authenticate-and-persist-oauth-1U_DESs3.js → authenticate-and-persist-oauth-DkNbTtTB.js} +1 -1
  60. package/dist/client/assets/{automation-list-row-BMTjAch1.js → automation-list-row-F_XkFIpJ.js} +1 -1
  61. package/dist/client/assets/{automation-runs-C8J9he9y.js → automation-runs-fA1ChIGW.js} +1 -1
  62. package/dist/client/assets/{automations-CJ9i_c9k.js → automations-mTaCH83G.js} +1 -1
  63. package/dist/client/assets/{avatar-BeEkEhV9.js → avatar-B8x-LJ3L.js} +1 -1
  64. package/dist/client/assets/{badge-EC_FS1hJ.js → badge-Du0UNTzb.js} +1 -1
  65. package/dist/client/assets/{block-document-zDNpXx1K.js → block-document-iNfCDN2P.js} +1 -1
  66. package/dist/client/assets/{brand-context-BkgDlw8b.js → brand-context-E2Z3Pmiz.js} +1 -1
  67. package/dist/client/assets/{breadcrumb-UZDdQrwI.js → breadcrumb-BShjlVDr.js} +1 -1
  68. package/dist/client/assets/{buckets-8plr1d-P.js → buckets-BT1sWv9w.js} +1 -1
  69. package/dist/client/assets/{bulk-category-panel-76hRbL0c.js → bulk-category-panel-CXG1IXf-.js} +1 -1
  70. package/dist/client/assets/{capability-load-error-6mU8gg9S.js → capability-load-error-DsHvqjTt.js} +1 -1
  71. package/dist/client/assets/{card-Cd_UT82w.js → card-CYX_RwBA.js} +1 -1
  72. package/dist/client/assets/{category-editor-CAmRTXwv.js → category-editor-DjMzIFH_.js} +1 -1
  73. package/dist/client/assets/{chat-context-BEYxfvRE.js → chat-context-Cemyx-UZ.js} +1 -1
  74. package/dist/client/assets/{checkbox-B7ovMLyf.js → checkbox-DZJkrzus.js} +1 -1
  75. package/dist/client/assets/{cli-auth-success-LMcjXaku.js → cli-auth-success-DOW9HsKN.js} +1 -1
  76. package/dist/client/assets/{collection-detail-D-KxR4bK.js → collection-detail-BMZKhngT.js} +1 -1
  77. package/dist/client/assets/{collection-display-button-DmoD5b6J.js → collection-display-button-BuAgDHrw.js} +1 -1
  78. package/dist/client/assets/{collection-search-_ltIvUcU.js → collection-search-DfgQYgyj.js} +1 -1
  79. package/dist/client/assets/{collection-table-wrapper-Cz2kpo8j.js → collection-table-wrapper-hkqvebTU.js} +1 -1
  80. package/dist/client/assets/{collection-tabs-ByJ2lCEV.js → collection-tabs-D3XeP_yy.js} +1 -1
  81. package/dist/client/assets/{command-D8TSS276.js → command-DN00KTSb.js} +1 -1
  82. package/dist/client/assets/{commerce-onboarding-BlroNemj.js → commerce-onboarding-yWSM0PQD.js} +1 -1
  83. package/dist/client/assets/{connect-desktop-dialog-D4NpUtWr.js → connect-desktop-dialog-DnC2R2Wo.js} +1 -1
  84. package/dist/client/assets/{connection-card-COLJGGyb.js → connection-card-BoKNDsqu.js} +1 -1
  85. package/dist/client/assets/{connection-detail-IEtqvqDx.js → connection-detail-C_252exw.js} +1 -1
  86. package/dist/client/assets/{connection-form-helpers-Bx2EyqE0.js → connection-form-helpers-DgmmJwTY.js} +1 -1
  87. package/dist/client/assets/{connections-CtMf6Y72.js → connections-BMIC4hHM.js} +1 -1
  88. package/dist/client/assets/{decopilot-CphvkEuu.js → decopilot-CETHa21a.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-tveLasMO.js → decopilot-sse-pool-C82Ujbm_.js} +1 -1
  90. package/dist/client/assets/{dialog-1PlbGnxl.js → dialog-CEOLT1ZZ.js} +1 -1
  91. package/dist/client/assets/{domain-settings-C5LwCZzv.js → domain-settings-BSIbwctC.js} +1 -1
  92. package/dist/client/assets/{drawer-D7F9J8H1.js → drawer-B-rufaJn.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-DgucD0Wn.js → dropdown-menu-CeNfEKAu.js} +1 -1
  94. package/dist/client/assets/{empty-state-CKmzL0iR.js → empty-state-BXO7rHQu.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-DXmsDXzN.js → extract-connection-data-Db76guDM.js} +1 -1
  96. package/dist/client/assets/{file-explorer-Dw7VTTo2.js → file-explorer-CLuX6xBf.js} +1 -1
  97. package/dist/client/assets/{file-type-icon-CjQ-i8Tj.js → file-type-icon-CxAOgcI2.js} +1 -1
  98. package/dist/client/assets/{files-4PjS2DE6.js → files-BjIbXeVM.js} +1 -1
  99. package/dist/client/assets/{form-DY5CJF6A.js → form-DtFQ7vfL.js} +1 -1
  100. package/dist/client/assets/{general-B1x-jxiu.js → general-DHyqePel.js} +1 -1
  101. package/dist/client/assets/{github-repo-picker-C928_gR2.js → github-repo-picker-DXC0Oul4.js} +1 -1
  102. package/dist/client/assets/{hooks-C98PDXkO.js → hooks-DLOVOtDp.js} +1 -1
  103. package/dist/client/assets/{index-ChDm4HPz.js → index-914V2fcS.js} +1 -1
  104. package/dist/client/assets/{index-D2iM60An.js → index-9ntojBLk.js} +1 -1
  105. package/dist/client/assets/{index-3pMCJF1F.js → index-B1FK7wQH.js} +1 -1
  106. package/dist/client/assets/{index-DPO0Ar5L.js → index-BNz3lima.js} +1 -1
  107. package/dist/client/assets/{index-D7F2qNe_.js → index-Blor2-rz.js} +1 -1
  108. package/dist/client/assets/{index-DBJUANyT.js → index-BlyuLoWx.js} +1 -1
  109. package/dist/client/assets/{index-BhywTD9L.js → index-Cs6NaxUB.js} +26 -26
  110. package/dist/client/assets/{index-CXhPz6Na.js → index-Cwr5cOYK.js} +1 -1
  111. package/dist/client/assets/{index-BeJ1yeue.js → index-D5RT2LDt.js} +1 -1
  112. package/dist/client/assets/{index-BnU8c8Ro.js → index-Ds2zXC-C.js} +1 -1
  113. package/dist/client/assets/{index-CCO5X6vK.js → index-Um2y51Zg.js} +1 -1
  114. package/dist/client/assets/{index-Du424YAy.js → index-g1gbVRQq.js} +1 -1
  115. package/dist/client/assets/{index-redirect-B-jN-fhS.js → index-redirect-D63CT2D1.js} +1 -1
  116. package/dist/client/assets/{index-BIvxcsMT.js → index-wvMNjAV0.js} +3 -3
  117. package/dist/client/assets/{index-Co62zZxD.js → index-yCHQGXJ7.js} +1 -1
  118. package/dist/client/assets/{input-C-5bkxwu.js → input-CtNQHwPy.js} +1 -1
  119. package/dist/client/assets/{integration-icon-DWcR_mMd.js → integration-icon-DvFXK2MU.js} +1 -1
  120. package/dist/client/assets/{invite-member-dialog-c6uPezaw.js → invite-member-dialog-CrMqsXT4.js} +1 -1
  121. package/dist/client/assets/{label-CuPUA6lI.js → label-B8KM3R_q.js} +1 -1
  122. package/dist/client/assets/{library-tab-B9PQjg9x.js → library-tab-DFX3AeS3.js} +1 -1
  123. package/dist/client/assets/{login-MwH_nULc.js → login-DxUhmOqI.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-BFb5Mr2N.js → mcp-oauth-DzrEuQr5.js} +1 -1
  125. package/dist/client/assets/{members-DMKRSesY.js → members-CPkTTkE0.js} +1 -1
  126. package/dist/client/assets/{monaco-editor-B_E6MYgL.js → monaco-editor-BgI79QTg.js} +1 -1
  127. package/dist/client/assets/{monitoring-stats-row-CDUo4bJg.js → monitoring-stats-row-CUczTxeX.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-CpqRc4mk.js → oauth-callback-DIyFvghE.js} +1 -1
  129. package/dist/client/assets/{oauth-callback-ai-provider-BEZ67TTl.js → oauth-callback-ai-provider-IS3SsI0k.js} +1 -1
  130. package/dist/client/assets/{onboarding-DY1XdIjP.js → onboarding-KfqNRkYy.js} +1 -1
  131. package/dist/client/assets/{org-install-_qYii8TY.js → org-install-CxT0tsIO.js} +1 -1
  132. package/dist/client/assets/{org-layout-CH6-dACM.js → org-layout-BQzjU6XX.js} +1 -1
  133. package/dist/client/assets/{organization-choice-q9IVQdh1.js → organization-choice-BI1DZkDU.js} +1 -1
  134. package/dist/client/assets/{page-seo-form-Dl3vlbYl.js → page-seo-form-D7JF4DTh.js} +1 -1
  135. package/dist/client/assets/page-seo-sheet-BzOt7DdS.js +1 -0
  136. package/dist/client/assets/{popover-BnhIWYgB.js → popover-Cvv98a2C.js} +1 -1
  137. package/dist/client/assets/{post-editor-BzHE5onr.js → post-editor-6_kkiUtL.js} +1 -1
  138. package/dist/client/assets/{primitives-B_yiwpb8.js → primitives-Bxk9aYw4.js} +1 -1
  139. package/dist/client/assets/{profile-q_xefMdi.js → profile-CZas9jg2.js} +1 -1
  140. package/dist/client/assets/project-app-view-xDz9FH-v.js +1 -0
  141. package/dist/client/assets/record-editor-C33gYIwT.js +1 -0
  142. package/dist/client/assets/registry-D8itHQYS.js +2 -0
  143. package/dist/client/assets/{registry-layout-CY97jFJ5.js → registry-layout-8sIvvJ4I.js} +1 -1
  144. package/dist/client/assets/{require-capability-B4CjdwjM.js → require-capability-CSyEuadx.js} +1 -1
  145. package/dist/client/assets/{required-auth-layout-B14liizk.js → required-auth-layout-CH2SPOr0.js} +1 -1
  146. package/dist/client/assets/{reset-password-xrDJRi-g.js → reset-password-CftvJ30J.js} +1 -1
  147. package/dist/client/assets/{roles-Bjp9hGjL.js → roles-b4IJFdUQ.js} +1 -1
  148. package/dist/client/assets/{scroll-area-CiGoarGm.js → scroll-area-CbuKwozG.js} +1 -1
  149. package/dist/client/assets/{search-input-CmJ7IuJz.js → search-input-BJJrtkoD.js} +1 -1
  150. package/dist/client/assets/{secrets-CuAdzo5u.js → secrets-xEL3iU0h.js} +1 -1
  151. package/dist/client/assets/{sections-editor-CDssHvQJ.js → sections-editor-I7PrxFXt.js} +1 -1
  152. package/dist/client/assets/{select-XC9B8kYb.js → select-DF6YoK_r.js} +1 -1
  153. package/dist/client/assets/{select-model-Bb4qdZ4V.js → select-model-nui66-pH.js} +1 -1
  154. package/dist/client/assets/{seo-editor-CBv7uxMZ.js → seo-editor-BJAI05hX.js} +1 -1
  155. package/dist/client/assets/{settings-layout-D8XYD_1r.js → settings-layout-urJbxzRN.js} +1 -1
  156. package/dist/client/assets/{settings-section-CZoUIOGy.js → settings-section-CngINngb.js} +1 -1
  157. package/dist/client/assets/{sheet-DMsXF2a5.js → sheet-DMc7DeSX.js} +1 -1
  158. package/dist/client/assets/{shell-controls-K02mDLgA.js → shell-controls-Bkd5dBPA.js} +1 -1
  159. package/dist/client/assets/{shell-layout-CX1dOlGj.js → shell-layout-CoG2R-A7.js} +1 -1
  160. package/dist/client/assets/{sidebar-BxApc71_.js → sidebar-yJWB-4vB.js} +1 -1
  161. package/dist/client/assets/{skeleton-CS6PjKeZ.js → skeleton-CEKyj6Ku.js} +1 -1
  162. package/dist/client/assets/{sso-DEuC0ilk.js → sso-C_CoNDtw.js} +1 -1
  163. package/dist/client/assets/{store-CW4k1iID.js → store-B3cr8RRQ.js} +1 -1
  164. package/dist/client/assets/store-registry-0mo75fzc.js +2 -0
  165. package/dist/client/assets/{studio-tools-DGpKprde.js → studio-tools-CEhEjTYq.js} +1 -1
  166. package/dist/client/assets/{switch-BofmoE_g.js → switch-CDv7wzZp.js} +1 -1
  167. package/dist/client/assets/{table-Cbxpe5u6.js → table-_yINUqfn.js} +1 -1
  168. package/dist/client/assets/{tabs-mPJyea1e.js → tabs-Cf3RVJ3Q.js} +1 -1
  169. package/dist/client/assets/{task-row-BrC9ZQiv.js → task-row-BVs0CmAg.js} +1 -1
  170. package/dist/client/assets/{task-status-MSiVemqS.js → task-status-VysJG0vN.js} +1 -1
  171. package/dist/client/assets/{textarea-BJ7uXt99.js → textarea-CDy5MusJ.js} +1 -1
  172. package/dist/client/assets/{toggle-group-CRVZDsng.js → toggle-group-Dtf2CWD1.js} +1 -1
  173. package/dist/client/assets/{toolbar-BIJJ6VS7.js → toolbar-DeO3vJmm.js} +1 -1
  174. package/dist/client/assets/{toolbar-icon-button-sU8FyquD.js → toolbar-icon-button-C4_ADEJH.js} +1 -1
  175. package/dist/client/assets/{tools-list-D-u8vbQL.js → tools-list-Cn_EK2iQ.js} +1 -1
  176. package/dist/client/assets/{tooltip-BGL3A5jy.js → tooltip-DlUY886I.js} +1 -1
  177. package/dist/client/assets/{types-DUULP3Cg.js → types-CvzpcJR1.js} +1 -1
  178. package/dist/client/assets/{use-ai-providers-CGMLoVgI.js → use-ai-providers-BJKmj4My.js} +1 -1
  179. package/dist/client/assets/{use-automations-eYq1QdPO.js → use-automations-BFGNyCFk.js} +1 -1
  180. package/dist/client/assets/{use-capability--pStQfW2.js → use-capability-DgzJJHkU.js} +1 -1
  181. package/dist/client/assets/{use-clock-tick-CF30qkon.js → use-clock-tick-BEBincp5.js} +1 -1
  182. package/dist/client/assets/{use-collections-DaNfbX0Q.js → use-collections-CjkVI8cV.js} +1 -1
  183. package/dist/client/assets/{use-connection-rw8Y5wYH.js → use-connection-ChjsmWTh.js} +1 -1
  184. package/dist/client/assets/{use-copy-CLk0PZni.js → use-copy-I4FalMZb.js} +1 -1
  185. package/dist/client/assets/{use-create-virtual-mcp-B_ygxy0B.js → use-create-virtual-mcp-BmL59nAp.js} +1 -1
  186. package/dist/client/assets/{use-debounced-autosave-Chq2pCXJ.js → use-debounced-autosave-DhGwNW9j.js} +1 -1
  187. package/dist/client/assets/{use-debounced-value-DarNUEml.js → use-debounced-value-CLg8LNax.js} +1 -1
  188. package/dist/client/assets/{use-decopilot-events-C4jxMeza.js → use-decopilot-events-uhlm9ZSC.js} +1 -1
  189. package/dist/client/assets/{use-delete-connection-GWWQ0NwP.js → use-delete-connection-CZmgFI8O.js} +1 -1
  190. package/dist/client/assets/{use-file-configs--8K7Ji7z.js → use-file-configs-aZ5m3Qj2.js} +1 -1
  191. package/dist/client/assets/{use-infinite-scroll-C2oRLreW.js → use-infinite-scroll-DI0qAEco.js} +1 -1
  192. package/dist/client/assets/{use-join-requests-n3oXhO9U.js → use-join-requests-CIrAIT4T.js} +1 -1
  193. package/dist/client/assets/{use-mcp-client-DbN0o_29.js → use-mcp-client-dBNHEL6c.js} +1 -1
  194. package/dist/client/assets/{use-mcp-prompts-k9BBdGe-.js → use-mcp-prompts-D2VFS_7Z.js} +1 -1
  195. package/dist/client/assets/{use-mcp-tools-BaQM5Bz7.js → use-mcp-tools-DX5g41Xz.js} +1 -1
  196. package/dist/client/assets/{use-members-CJvmy-r3.js → use-members-BeAV3T2H.js} +1 -1
  197. package/dist/client/assets/{use-mobile-CdswWdV_.js → use-mobile-7niVKoti.js} +1 -1
  198. package/dist/client/assets/{use-navigate-to-agent-yzOIB4ca.js → use-navigate-to-agent-C1tFWD13.js} +1 -1
  199. package/dist/client/assets/{use-org-auth-client-DQwimkN2.js → use-org-auth-client-CwSEkcA-.js} +1 -1
  200. package/dist/client/assets/{use-org-sso-DRbO1SYZ.js → use-org-sso-CXSE3hAV.js} +1 -1
  201. package/dist/client/assets/{use-organization-roles-CoVa3Svg.js → use-organization-roles-C8hy4d4V.js} +1 -1
  202. package/dist/client/assets/{use-organization-settings-B87409No.js → use-organization-settings-OjpRHnBI.js} +1 -1
  203. package/dist/client/assets/{use-registry-connections-DPvd05bN.js → use-registry-connections-BiMSB_yO.js} +1 -1
  204. package/dist/client/assets/{use-secrets-BfSDmFK4.js → use-secrets-sNifGUNT.js} +1 -1
  205. package/dist/client/assets/{use-status-sounds-DzIbcTbB.js → use-status-sounds-BjM7PTwu.js} +1 -1
  206. package/dist/client/assets/{use-view-mode-viB7TTSY.js → use-view-mode-C6xNmVYR.js} +1 -1
  207. package/dist/client/assets/{use-virtual-mcp-st0OLLtk.js → use-virtual-mcp-Cy-jA6Qm.js} +1 -1
  208. package/dist/client/assets/useInfiniteQuery-CcA0p7if.js +1 -0
  209. package/dist/client/assets/useSuspenseInfiniteQuery-DXVqJ8aq.js +1 -0
  210. package/dist/client/assets/{useSuspenseQueries-_jBEPc9k.js → useSuspenseQueries-Dg30S2DW.js} +1 -1
  211. package/dist/client/assets/{variant-calendar-BaDsfBeS.js → variant-calendar-DoCnqvSc.js} +1 -1
  212. package/dist/client/assets/{view-mode-toggle-BekCb9Y2.js → view-mode-toggle-BMDNQ_Ex.js} +1 -1
  213. package/dist/client/index.html +1 -1
  214. package/dist/server/cli.js +5 -2
  215. package/dist/server/server.js +1 -1
  216. package/package.json +1 -1
  217. package/dist/client/assets/page-seo-sheet-pnb4BjH1.js +0 -1
  218. package/dist/client/assets/project-app-view-BoTA9-Gv.js +0 -1
  219. package/dist/client/assets/record-editor-C6Mdc0zg.js +0 -1
  220. package/dist/client/assets/registry-BRcT-CVu.js +0 -2
  221. package/dist/client/assets/store-registry-C0XIPk1o.js +0 -2
  222. package/dist/client/assets/useInfiniteQuery-Cd0Nyb0J.js +0 -1
  223. package/dist/client/assets/useSuspenseInfiniteQuery-DO0pAzSF.js +0 -1
@@ -1 +1 @@
1
- import{D as Ie,a as en,z as un,p as mn,n as pn,j as n,B as Y,t as K,r as re,m as hn,b as fn,i as we,v as C,K as me,c as xn,C as gn,L as jn,l as vn,k as yn}from"./index-BIvxcsMT.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Oe}from"./connection-card-COLJGGyb.js";import{C as bn}from"./collection-search-_ltIvUcU.js";import{C as Nn}from"./collection-tabs-ByJ2lCEV.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-DXmsDXzN.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-1PlbGnxl.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Bn,e as Ln,f as Mn}from"./drawer-D7F9J8H1.js";import{u as On}from"./use-mobile-CdswWdV_.js";import{F as B,b as L,c as M,d as O,e as $,a as Qe}from"./form-DY5CJF6A.js";import{I as W}from"./input-C-5bkxwu.js";import{d as $n,S as En,a as Rn,b as zn,c as ue}from"./select-XC9B8kYb.js";import{T as Hn}from"./textarea-BJ7uXt99.js";import{b as rn}from"./use-connection-rw8Y5wYH.js";import{n as Se,c as $e}from"./XCircle-C94QFqN0.js";import{s as Ee}from"./Star01-7qhyucrX.js";import{ab as Kn}from"./agent-icon-CuxkxUe-.js";import{s as Un}from"./XClose-CQikaAXa.js";import{c as Xn,i as be,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-Bx2EyqE0.js";import{u as Ye}from"./use-infinite-scroll-C2oRLreW.js";import{a as Re}from"./authenticate-and-persist-oauth-1U_DESs3.js";import{B as Ne}from"./badge-EC_FS1hJ.js";import{T as ze,a as He,b as Ke}from"./tooltip-BGL3A5jy.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DO0pAzSF.js";import{u as Jn}from"./use-mcp-client-DbN0o_29.js";import{S as Zn}from"./constants-C8_Swa4x.js";import{i as Je}from"./Check-DhEV1E4F.js";import{s as et}from"./Plus-DX9uB6jT.js";import{u as nt}from"./studio-tools-DGpKprde.js";import{u as tt}from"./use-ai-providers-CGMLoVgI.js";function st({open:t,onOpenChange:e,onCreated:m}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:w}=un(),D=On(),E=rn(),d=nn(),R=tn(d,"").items,a=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:[]}}),x=a.watch("ui_type"),S=a.watch("connection_url"),F=a.watch("npx_package"),f=be({uiType:x,connectionUrl:S??"",npxPackage:F??""})??We({uiType:x,connectionUrl:S??"",registryItems:R}),r=s=>{const u=s.trim();if(!u)return;const o=!!a.formState.dirtyFields.title,c=!!a.formState.dirtyFields.description,j=!!a.formState.dirtyFields.env_vars,y=l=>{if(l&&(!o&&!a.getValues("title").trim()&&l.title&&a.setValue("title",l.title,{shouldDirty:!1}),!c&&!(a.getValues("description")??"").trim()&&l.description&&a.setValue("description",l.description,{shouldDirty:!1}),!j&&l.envVarKeys?.length)){const N=a.getValues("env_vars")??[],q=new Set(N.map(V=>V.key)),pe=l.envVarKeys.filter(V=>!q.has(V));pe.length>0&&a.setValue("env_vars",[...N,...pe.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},g=Gn(u);if(g&&w){a.setValue("ui_type","NPX",{shouldDirty:!0}),a.setValue("npx_package",g.packageName,{shouldDirty:!0}),a.setValue("connection_url","",{shouldDirty:!0}),a.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:g.packageName}));return}if(u.startsWith("http://")||u.startsWith("https://")){const l=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";a.setValue("ui_type",l,{shouldDirty:!0}),a.setValue("connection_url",u,{shouldDirty:!0}),y(be({uiType:l,connectionUrl:u})??We({uiType:l,connectionUrl:u,registryItems:R}));return}x==="NPX"&&y(be({uiType:"NPX",npxPackage:u}))},z=s=>{s||a.reset(),e(s)},b=async s=>{let u,o=null,c=null,j=null;s.ui_type==="NPX"?(u="STDIO",o="",j=Qn(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(u="STDIO",o="",j=Wn(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(u=s.ui_type,o=s.connection_url||"",c=s.connection_token||null);const y=wn("conn");try{await E.create.mutateAsync({id:y,title:s.title,description:s.description||null,connection_type:u,connection_url:o,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.id,icon:s.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"}),a.reset(),e(!1),m?.(y)}catch{K.error("Failed to create connection")}},k="Create Connection",I="Create a custom connection in your organization. Fill in the details below.",U=a.formState.isSubmitting?"Saving...":"Create Connection",P=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(B,{control:a.control,name:"ui_type",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Type *"}),n.jsxs($n,{value:s.value,onValueChange:s.onChange,children:[n.jsx(O,{children:n.jsx(En,{children:n.jsx(Rn,{})})}),n.jsxs(zn,{children:[n.jsx(ue,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ue,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ue,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),w&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ue,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Kn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx($,{})]})}),x==="NPX"&&n.jsx(B,{control:a.control,name:"npx_package",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"NPM Package *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...s,value:s.value??"",onPaste:u=>{const o=u.clipboardData.getData("text");o&&(u.preventDefault(),a.setValue("npx_package",o.trim(),{shouldDirty:!0}),r(o))},onBlur:u=>{r(u.target.value),s.onBlur()}})}),n.jsx($,{})]})}),x==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(B,{control:a.control,name:"stdio_command",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Command *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"node, bun, python...",...s,value:s.value??""})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"stdio_args",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Arguments"}),n.jsx(O,{children:n.jsx(W,{placeholder:"arg1 arg2 --flag value",...s,value:s.value??""})}),n.jsx($,{})]})})]}),n.jsx(B,{control:a.control,name:"stdio_cwd",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Working Directory"}),n.jsx(O,{children:n.jsx(W,{placeholder:"/path/to/project (optional)",...s,value:s.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx($,{})]})})]}),(x==="NPX"||x==="STDIO")&&n.jsx(B,{control:a.control,name:"env_vars",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Environment Variables"}),n.jsx(O,{children:n.jsx(qn,{value:s.value??[],onChange:s.onChange})}),n.jsx($,{})]})}),x!=="NPX"&&x!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(B,{control:a.control,name:"connection_url",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"URL *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"https://example.com/mcp",...s,value:s.value??"",onPaste:u=>{const o=u.clipboardData.getData("text");o&&(u.preventDefault(),a.setValue("connection_url",o.trim(),{shouldDirty:!0}),r(o))},onBlur:u=>{r(u.target.value),s.onBlur()}})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"connection_token",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:f?.token?.label??"Token (optional)"}),n.jsx(O,{children:n.jsx(W,{type:"password",placeholder:f?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...s,value:s.value??""})}),f?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.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"})]})]}),n.jsx($,{})]})})]}),n.jsx(B,{control:a.control,name:"title",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Name *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"My Connection",...s})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"description",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Description"}),n.jsx(O,{children:n.jsx(Hn,{placeholder:"A brief description of this connection",rows:3,...s,value:s.value??""})}),n.jsx($,{})]})})]});return D?n.jsx(Pn,{open:t,onOpenChange:z,children:n.jsxs(Tn,{className:"max-h-[90vh]",children:[n.jsx(Fn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Vn,{children:k}),n.jsx(Bn,{className:"mt-1",children:I})]}),n.jsx(Ln,{asChild:!0,children:n.jsx(Y,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Un,{size:16})})})]})}),n.jsx(Qe,{...a,children:n.jsxs("form",{onSubmit:a.handleSubmit(b),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:P}),n.jsx(Mn,{children:n.jsx(Y,{type:"submit",disabled:a.formState.isSubmitting,className:"w-full",children:U})})]})})]})}):n.jsx(sn,{open:t,onOpenChange:z,children:n.jsxs(on,{className:"sm:max-w-[525px]",children:[n.jsxs(an,{children:[n.jsx(cn,{children:k}),n.jsx(An,{children:I})]}),n.jsx(Qe,{...a,children:n.jsxs("form",{onSubmit:a.handleSubmit(b),children:[n.jsx("div",{className:"py-4",children:P}),n.jsxs(Dn,{children:[n.jsx(Y,{type:"button",variant:"outline",onClick:()=>z(!1),children:"Cancel"}),n.jsx(Y,{type:"submit",disabled:a.formState.isSubmitting,className:"min-w-40",children:U})]})]})})]})})}function ot(t){const e=xn.c(73),{mode:m,agentId:v,addedConnectionIds:h,onAdd:w,onCloneAndAdd:D,onConnectAndAdd:E,connectingItemId:d,search:_,onCreateConnection:R,onBrowseNavigate:a,defaultTab:x}=t,S=m===void 0?"add":m,F=x===void 0?"connected":x,{org:f}=Ie(),r=re.useDeferredValue(_),z=_!==r,b=r.trim().toLowerCase();let k;e[0]!==F?(k=i=>i??F,e[0]=F,e[1]=k):k=e[1];const[I,U]=gn(jn.connectionsTab(f.slug)+(F==="all"?":home-modal":":agent-modal"),k);let P;e[2]!==I||e[3]!==U?(P=i=>{i!==I&&C("connections_dialog_tab_changed",{to_tab:i}),U(i)},e[2]=I,e[3]=U,e[4]=P):P=e[4];const s=P;let u;e[5]!==f.id||e[6]!==f.slug?(u={connectionId:Zn,orgId:f.id,orgSlug:f.slug},e[5]=f.id,e[6]=f.slug,e[7]=u):u=e[7];const o=Jn(u);let c,j,y;if(e[8]!==o||e[9]!==r||e[10]!==f.id){y=r?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:r.trim()},{field:["description"],operator:"contains",value:r.trim()}]}:void 0;const i={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},p=JSON.stringify(i);j=Yn,c=me.collectionListInfinite(o,f.id,"","CONNECTIONS",p),e[8]=o,e[9]=r,e[10]=f.id,e[11]=c,e[12]=j,e[13]=y}else c=e[11],j=e[12],y=e[13];let g;e[14]!==o||e[15]!==y?(g=async i=>{const{pageParam:p}=i,H=p===void 0?0:p;return(await o.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:H}})).structuredContent},e[14]=o,e[15]=y,e[16]=g):g=e[16];let l;e[17]!==c||e[18]!==g?(l={queryKey:c,queryFn:g,initialPageParam:0,getNextPageParam:dt,staleTime:3e4},e[17]=c,e[18]=g,e[19]=l):l=e[19];const{data:N,fetchNextPage:q,hasNextPage:pe,isFetchingNextPage:V}=j(l),Xe=N?.pages.flatMap(lt)??[],he=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),fe=nn(),G=tn(fe,r),ke=Ye(G.loadMore,G.hasMore,G.isLoadingMore),Ae=Ye(q,pe??!1,V),T=I==="all"||!!b,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!b)return!0;const H=i._meta?.["mcp.mesh"];return[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,H?.friendly_name,H?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(b)}):[],le=qe.filter(it),de=qe.filter(at);let xe;e[20]!==h?(xe=i=>i.some(p=>h.has(p.id)),e[20]=h,e[21]=xe):xe=e[21];const De=xe;let ge;e[22]!==h||e[23]!==v||e[24]!==d||e[25]!==De||e[26]!==S||e[27]!==w||e[28]!==a||e[29]!==D?(ge=(i,p,H,ie,X)=>{const Ce=De(X),ce=X.find(Q=>!h.has(Q.id)),A=X[0];if(S==="browse"){const Q=_n(A);return n.jsx(Oe,{connection:{title:p,icon:H,description:X.length>1?`${X.length} instances`:ie??void 0},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:X.length}),a?.(Q)}},i)}return n.jsx(Oe,{connection:{title:p,icon:H,description:ie},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Added"]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),v&&C("agent_connection_attached",{agent_id:v,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),w(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},e[22]=h,e[23]=v,e[24]=d,e[25]=De,e[26]=S,e[27]=w,e[28]=a,e[29]=D,e[30]=ge):ge=e[30];const je=ge;let ve;e[31]!==d||e[32]!==S||e[33]!==E?(ve=i=>{const p=i._meta?.["mcp.mesh"],H=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",ie=i.server?.description||i.description||null,X=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,Ce=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return n.jsx(Oe,{connection:{title:H,description:ie,icon:X},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(Ke,{children:"Built and maintained by Deco"})]}),!A&&Ce&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(Ke,{children:"Built and maintained by the official vendor"})]}),!A&&!Ce&&ce&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(Ke,{children:"Verified by the Deco team"})]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),E(i)},children:d===i.id?n.jsx(we,{size:14,className:"animate-spin"}):S==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},e[31]=d,e[32]=S,e[33]=E,e[34]=ve):ve=e[34];const Ge=ve,Pe=!b&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:I,onTabChange:i=>s(i)}),n.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),R()},children:[n.jsx(et,{size:12}),"Custom Connection"]})]}),Te=z&&"opacity-50 pointer-events-none";let J;e[35]!==Te?(J=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),e[35]=Te,e[36]=J):J=e[36];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;e[37]!==je?(ye=i=>{if(i.type==="group")return je(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},e[37]=je,e[38]=ye):ye=e[38];const Fe=he.map(ye);let Z;e[39]!==Ae?(Z=n.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=Z):Z=e[40];let ee;e[41]!==V?(ee=V&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=ee):ee=e[42];const Ve=T&&le.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx($e,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Be=T&&le.map(Ge),Le=T&&de.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge);let ne;e[43]!==ke||e[44]!==fe||e[45]!==T?(ne=T&&fe.length>0&&n.jsx("div",{ref:ke,className:"col-span-full h-1"}),e[43]=ke,e[44]=fe,e[45]=T,e[46]=ne):ne=e[46];let te;e[47]!==G.isLoadingMore||e[48]!==T?(te=T&&G.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=G.isLoadingMore,e[48]=T,e[49]=te):te=e[49];let se;e[50]!==Fe||e[51]!==Z||e[52]!==ee||e[53]!==Ve||e[54]!==Be||e[55]!==Le||e[56]!==Me||e[57]!==ne||e[58]!==te?(se=n.jsxs("div",{className:dn,children:[Fe,Z,ee,Ve,Be,Le,Me,ne,te]}),e[50]=Fe,e[51]=Z,e[52]=ee,e[53]=Ve,e[54]=Be,e[55]=Le,e[56]=Me,e[57]=ne,e[58]=te,e[59]=se):se=e[59];let oe;e[60]!==I||e[61]!==he.length||e[62]!==de||e[63]!==_||e[64]!==le?(oe=he.length===0&&le.length===0&&de.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:I==="connected"?"No connections yet":"No connections available"}),e[60]=I,e[61]=he.length,e[62]=de,e[63]=_,e[64]=le,e[65]=oe):oe=e[65];let ae;e[66]!==J||e[67]!==se||e[68]!==oe?(ae=n.jsxs("div",{className:J,children:[se,oe]}),e[66]=J,e[67]=se,e[68]=oe,e[69]=ae):ae=e[69];let _e;return e[70]!==Pe||e[71]!==ae?(_e=n.jsxs(n.Fragment,{children:[Pe,ae]}),e[70]=Pe,e[71]=ae,e[72]=_e):_e=e[72],_e}function at(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function it(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ct(t){return t.app_name}function rt(t){return t.app_name}function lt(t){return t?.items??[]}function dt(t,e){if(t?.hasMore)return e.reduce(ut,0)}function ut(t,e){return t+(e?.items?.length??0)}function zt({open:t,onOpenChange:e,defaultTab:m,initialSearch:v="",...h}){const w=h.mode??"add",D="agentId"in h?h.agentId:void 0,E="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,d="onAdd"in h&&h.onAdd?h.onAdd:o=>{},_=(o,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:o,app_name:c,mode:j})},[R,a]=re.useState(null),[x,S]=re.useState(v),[F,f]=re.useState(!1),{org:r}=Ie(),{data:z}=en.useSession(),b=rn(),k=hn(),I=fn(),U=o=>{e(!1),I({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o}})},P=()=>{k.invalidateQueries({predicate:o=>{const c=o.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},s=async o=>{a(o.app_name??o.id);try{const j=`${o.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,g=(await b.create.mutateAsync({title:j,description:o.description??null,connection_type:o.connection_type,connection_url:o.connection_url??null,connection_token:null,icon:o.icon??null,app_name:o.app_name??null,app_id:o.app_id??null,connection_headers:o.connection_headers??null})).id,l=await Re({connectionId:g,orgId:r.id,orgSlug:r.slug,persistFallback:N=>b.update.mutateAsync({id:g,data:{connection_token:N}}).then(()=>{})});if(l.ran&&!l.ok){C("connection_oauth_failed",{connection_id:g,flow:"clone",error:l.error??"no_token"}),K.error(`Authentication failed: ${l.error??"no token received"}`),await b.delete.mutateAsync(g);return}if(l.ran){C("connection_oauth_succeeded",{connection_id:g,flow:"clone"});const N=new URL(`/api/${r.slug}/mcp/${g}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(N.href,null)}),P()}_(g,o.app_name??null,"clone"),d(g)}catch(c){console.error("Failed to add connection:",c),K.error("Failed to add connection")}finally{a(null)}},u=async o=>{if(!(!r||!z?.user?.id)){a(o.id);try{const c=In(o,r.id,z.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",y=!!c.connection_url,g=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!y&&!g){K.error("This MCP Server cannot be connected: no connection method available"),a(null);return}const{id:l}=await b.create.mutateAsync(c),N=await Re({connectionId:l,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:l,data:{connection_token:q}}).then(()=>{})});if(N.ran&&!N.ok){C("connection_oauth_failed",{connection_id:l,flow:"connect_new",error:N.error??"no_token"}),K.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. (${N.error??"no token received"})`}),_(l,c.app_name??null,"new"),d(l);return}if(N.ran){C("connection_oauth_succeeded",{connection_id:l,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${l}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(q.href,null)}),P(),K.success("Connected and authenticated")}else K.success("Connected");_(l,c.app_name??null,"new"),d(l)}catch(c){console.error("Failed to connect:",c),K.error("Failed to connect")}finally{a(null)}}};return n.jsxs(sn,{open:t,onOpenChange:e,children:[n.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(cn,{className:"text-base font-semibold",children:w==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(bn,{value:x,onChange:S,placeholder:"Search connections..."})}),n.jsx(re.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(ot,{mode:w,agentId:D,addedConnectionIds:E,onAdd:d,onCloneAndAdd:s,onConnectAndAdd:u,connectingItemId:R,search:x,onCreateConnection:()=>f(!0),onBrowseNavigate:U,defaultTab:m})})]}),n.jsx(st,{open:F,onOpenChange:f,onCreated:async o=>{f(!1);const c=await Re({connectionId:o,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:o,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:o,flow:"custom_create",error:c.error??"no_token"}),K.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"})`}),_(o,null,"custom"),d(o),e(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:o,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${o}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(j.href,null)}),P()}_(o,null,"custom"),d(o),e(!1)}})]})}const Ze=new Map;function Ht(){const{org:t}=Ie(),e=nt(),m=tt(),v=m.find(r=>r.providerId==="deco"),{data:h,isLoading:w,refetch:D,isFetching:E}=yn({queryKey:me.aiProviderCredits(t.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=h?.balanceCents??null,_=d!=null?d/100:null,R=re.useRef(new Map);if(d!=null){const r=Ze.get(t.id);R.current.get(t.id)&&r!=null&&d>r&&C("credits_topped_up_detected",{organization_id:t.id,delta_cents:d-r,previous_balance_cents:r,new_balance_cents:d}),Ze.set(t.id,d),R.current.set(t.id,!0)}const a=!!v,x=d!=null&&d>0,S=d!=null&&d===0,F=d!=null&&d===200,f=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:a,decoKeyId:v?.id??null,balanceCents:d,balanceDollars:_,hasCredits:x,isZeroBalance:S,isInitialFreeCredit:F,hasOnlyDecoProvider:f,isLoading:w,isFetching:E,refetch:D}}function Ue(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const m=e.connectionId;return!!m&&!!t?.connections?.some(w=>w.connection_id===m)?{status:"attached",repo:e,connectionId:m}:!!m||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function Kt(t){const e=Ue(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Ut(t){if(typeof t!="object"||t===null)return!1;const m=t.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(t){return Ue(t).status==="attached"}function qt(t){const e=Ue(t).status;return e==="attached"||e==="detached"}function Gt(t){const e=new Set;for(const m of t??[]){const v=m.metadata?.liveAgentId;typeof v=="string"&&v&&e.add(m.id)}return e}function Qt(t,e){if(!t)return null;const m=t.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const v=(e??[]).find(h=>h.metadata?.liveAgentId===t.id);return v?{mode:"live",targetId:v.id}:null}function Wt(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}export{zt as A,Kt as a,Xt as b,Ut as c,qt as d,Qt as f,Gt as g,Wt as h,Ue as r,Ht as u};
1
+ import{D as Ie,a as en,z as un,p as mn,n as pn,j as n,B as Y,t as K,r as re,m as hn,b as fn,i as we,v as C,K as me,c as xn,C as gn,L as jn,l as vn,k as yn}from"./index-wvMNjAV0.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Oe}from"./connection-card-BoKNDsqu.js";import{C as bn}from"./collection-search-DfgQYgyj.js";import{C as Nn}from"./collection-tabs-D3XeP_yy.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-Db76guDM.js";import{e as sn,d as on,c as an,a as cn,b as An,D as Dn}from"./dialog-CEOLT1ZZ.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Bn,e as Ln,f as Mn}from"./drawer-B-rufaJn.js";import{u as On}from"./use-mobile-7niVKoti.js";import{F as B,b as L,c as M,d as O,e as $,a as Qe}from"./form-DtFQ7vfL.js";import{I as W}from"./input-CtNQHwPy.js";import{d as $n,S as En,a as Rn,b as zn,c as ue}from"./select-DF6YoK_r.js";import{T as Hn}from"./textarea-CDy5MusJ.js";import{b as rn}from"./use-connection-ChjsmWTh.js";import{n as Se,c as $e}from"./XCircle-Bn7fkWKh.js";import{s as Ee}from"./Star01-BMo746nc.js";import{ab as Kn}from"./agent-icon-CPQk4YwJ.js";import{s as Un}from"./XClose-aB151tNh.js";import{c as Xn,i as be,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-DgmmJwTY.js";import{u as Ye}from"./use-infinite-scroll-DI0qAEco.js";import{a as Re}from"./authenticate-and-persist-oauth-DkNbTtTB.js";import{B as Ne}from"./badge-Du0UNTzb.js";import{T as ze,a as He,b as Ke}from"./tooltip-DlUY886I.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DXVqJ8aq.js";import{u as Jn}from"./use-mcp-client-dBNHEL6c.js";import{S as Zn}from"./constants-C8_Swa4x.js";import{i as Je}from"./Check-CUUu6fuS.js";import{s as et}from"./Plus-6nUvzb_a.js";import{u as nt}from"./studio-tools-CEhEjTYq.js";import{u as tt}from"./use-ai-providers-BJKmj4My.js";function st({open:t,onOpenChange:e,onCreated:m}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:w}=un(),D=On(),E=rn(),d=nn(),R=tn(d,"").items,a=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:[]}}),x=a.watch("ui_type"),S=a.watch("connection_url"),F=a.watch("npx_package"),f=be({uiType:x,connectionUrl:S??"",npxPackage:F??""})??We({uiType:x,connectionUrl:S??"",registryItems:R}),r=s=>{const u=s.trim();if(!u)return;const o=!!a.formState.dirtyFields.title,c=!!a.formState.dirtyFields.description,j=!!a.formState.dirtyFields.env_vars,y=l=>{if(l&&(!o&&!a.getValues("title").trim()&&l.title&&a.setValue("title",l.title,{shouldDirty:!1}),!c&&!(a.getValues("description")??"").trim()&&l.description&&a.setValue("description",l.description,{shouldDirty:!1}),!j&&l.envVarKeys?.length)){const N=a.getValues("env_vars")??[],q=new Set(N.map(V=>V.key)),pe=l.envVarKeys.filter(V=>!q.has(V));pe.length>0&&a.setValue("env_vars",[...N,...pe.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},g=Gn(u);if(g&&w){a.setValue("ui_type","NPX",{shouldDirty:!0}),a.setValue("npx_package",g.packageName,{shouldDirty:!0}),a.setValue("connection_url","",{shouldDirty:!0}),a.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:g.packageName}));return}if(u.startsWith("http://")||u.startsWith("https://")){const l=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";a.setValue("ui_type",l,{shouldDirty:!0}),a.setValue("connection_url",u,{shouldDirty:!0}),y(be({uiType:l,connectionUrl:u})??We({uiType:l,connectionUrl:u,registryItems:R}));return}x==="NPX"&&y(be({uiType:"NPX",npxPackage:u}))},z=s=>{s||a.reset(),e(s)},b=async s=>{let u,o=null,c=null,j=null;s.ui_type==="NPX"?(u="STDIO",o="",j=Qn(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(u="STDIO",o="",j=Wn(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(u=s.ui_type,o=s.connection_url||"",c=s.connection_token||null);const y=wn("conn");try{await E.create.mutateAsync({id:y,title:s.title,description:s.description||null,connection_type:u,connection_url:o,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.id,icon:s.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"}),a.reset(),e(!1),m?.(y)}catch{K.error("Failed to create connection")}},k="Create Connection",I="Create a custom connection in your organization. Fill in the details below.",U=a.formState.isSubmitting?"Saving...":"Create Connection",P=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(B,{control:a.control,name:"ui_type",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Type *"}),n.jsxs($n,{value:s.value,onValueChange:s.onChange,children:[n.jsx(O,{children:n.jsx(En,{children:n.jsx(Rn,{})})}),n.jsxs(zn,{children:[n.jsx(ue,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ue,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ue,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),w&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ue,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Kn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx($,{})]})}),x==="NPX"&&n.jsx(B,{control:a.control,name:"npx_package",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"NPM Package *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...s,value:s.value??"",onPaste:u=>{const o=u.clipboardData.getData("text");o&&(u.preventDefault(),a.setValue("npx_package",o.trim(),{shouldDirty:!0}),r(o))},onBlur:u=>{r(u.target.value),s.onBlur()}})}),n.jsx($,{})]})}),x==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(B,{control:a.control,name:"stdio_command",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Command *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"node, bun, python...",...s,value:s.value??""})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"stdio_args",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Arguments"}),n.jsx(O,{children:n.jsx(W,{placeholder:"arg1 arg2 --flag value",...s,value:s.value??""})}),n.jsx($,{})]})})]}),n.jsx(B,{control:a.control,name:"stdio_cwd",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Working Directory"}),n.jsx(O,{children:n.jsx(W,{placeholder:"/path/to/project (optional)",...s,value:s.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx($,{})]})})]}),(x==="NPX"||x==="STDIO")&&n.jsx(B,{control:a.control,name:"env_vars",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Environment Variables"}),n.jsx(O,{children:n.jsx(qn,{value:s.value??[],onChange:s.onChange})}),n.jsx($,{})]})}),x!=="NPX"&&x!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(B,{control:a.control,name:"connection_url",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"URL *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"https://example.com/mcp",...s,value:s.value??"",onPaste:u=>{const o=u.clipboardData.getData("text");o&&(u.preventDefault(),a.setValue("connection_url",o.trim(),{shouldDirty:!0}),r(o))},onBlur:u=>{r(u.target.value),s.onBlur()}})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"connection_token",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:f?.token?.label??"Token (optional)"}),n.jsx(O,{children:n.jsx(W,{type:"password",placeholder:f?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...s,value:s.value??""})}),f?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.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"})]})]}),n.jsx($,{})]})})]}),n.jsx(B,{control:a.control,name:"title",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Name *"}),n.jsx(O,{children:n.jsx(W,{placeholder:"My Connection",...s})}),n.jsx($,{})]})}),n.jsx(B,{control:a.control,name:"description",render:({field:s})=>n.jsxs(L,{children:[n.jsx(M,{children:"Description"}),n.jsx(O,{children:n.jsx(Hn,{placeholder:"A brief description of this connection",rows:3,...s,value:s.value??""})}),n.jsx($,{})]})})]});return D?n.jsx(Pn,{open:t,onOpenChange:z,children:n.jsxs(Tn,{className:"max-h-[90vh]",children:[n.jsx(Fn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Vn,{children:k}),n.jsx(Bn,{className:"mt-1",children:I})]}),n.jsx(Ln,{asChild:!0,children:n.jsx(Y,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Un,{size:16})})})]})}),n.jsx(Qe,{...a,children:n.jsxs("form",{onSubmit:a.handleSubmit(b),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:P}),n.jsx(Mn,{children:n.jsx(Y,{type:"submit",disabled:a.formState.isSubmitting,className:"w-full",children:U})})]})})]})}):n.jsx(sn,{open:t,onOpenChange:z,children:n.jsxs(on,{className:"sm:max-w-[525px]",children:[n.jsxs(an,{children:[n.jsx(cn,{children:k}),n.jsx(An,{children:I})]}),n.jsx(Qe,{...a,children:n.jsxs("form",{onSubmit:a.handleSubmit(b),children:[n.jsx("div",{className:"py-4",children:P}),n.jsxs(Dn,{children:[n.jsx(Y,{type:"button",variant:"outline",onClick:()=>z(!1),children:"Cancel"}),n.jsx(Y,{type:"submit",disabled:a.formState.isSubmitting,className:"min-w-40",children:U})]})]})})]})})}function ot(t){const e=xn.c(73),{mode:m,agentId:v,addedConnectionIds:h,onAdd:w,onCloneAndAdd:D,onConnectAndAdd:E,connectingItemId:d,search:_,onCreateConnection:R,onBrowseNavigate:a,defaultTab:x}=t,S=m===void 0?"add":m,F=x===void 0?"connected":x,{org:f}=Ie(),r=re.useDeferredValue(_),z=_!==r,b=r.trim().toLowerCase();let k;e[0]!==F?(k=i=>i??F,e[0]=F,e[1]=k):k=e[1];const[I,U]=gn(jn.connectionsTab(f.slug)+(F==="all"?":home-modal":":agent-modal"),k);let P;e[2]!==I||e[3]!==U?(P=i=>{i!==I&&C("connections_dialog_tab_changed",{to_tab:i}),U(i)},e[2]=I,e[3]=U,e[4]=P):P=e[4];const s=P;let u;e[5]!==f.id||e[6]!==f.slug?(u={connectionId:Zn,orgId:f.id,orgSlug:f.slug},e[5]=f.id,e[6]=f.slug,e[7]=u):u=e[7];const o=Jn(u);let c,j,y;if(e[8]!==o||e[9]!==r||e[10]!==f.id){y=r?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:r.trim()},{field:["description"],operator:"contains",value:r.trim()}]}:void 0;const i={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},p=JSON.stringify(i);j=Yn,c=me.collectionListInfinite(o,f.id,"","CONNECTIONS",p),e[8]=o,e[9]=r,e[10]=f.id,e[11]=c,e[12]=j,e[13]=y}else c=e[11],j=e[12],y=e[13];let g;e[14]!==o||e[15]!==y?(g=async i=>{const{pageParam:p}=i,H=p===void 0?0:p;return(await o.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:H}})).structuredContent},e[14]=o,e[15]=y,e[16]=g):g=e[16];let l;e[17]!==c||e[18]!==g?(l={queryKey:c,queryFn:g,initialPageParam:0,getNextPageParam:dt,staleTime:3e4},e[17]=c,e[18]=g,e[19]=l):l=e[19];const{data:N,fetchNextPage:q,hasNextPage:pe,isFetchingNextPage:V}=j(l),Xe=N?.pages.flatMap(lt)??[],he=Cn(Xe),ln=new Set(Xe.filter(rt).map(ct)),fe=nn(),G=tn(fe,r),ke=Ye(G.loadMore,G.hasMore,G.isLoadingMore),Ae=Ye(q,pe??!1,V),T=I==="all"||!!b,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!b)return!0;const H=i._meta?.["mcp.mesh"];return[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,H?.friendly_name,H?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(b)}):[],le=qe.filter(it),de=qe.filter(at);let xe;e[20]!==h?(xe=i=>i.some(p=>h.has(p.id)),e[20]=h,e[21]=xe):xe=e[21];const De=xe;let ge;e[22]!==h||e[23]!==v||e[24]!==d||e[25]!==De||e[26]!==S||e[27]!==w||e[28]!==a||e[29]!==D?(ge=(i,p,H,ie,X)=>{const Ce=De(X),ce=X.find(Q=>!h.has(Q.id)),A=X[0];if(S==="browse"){const Q=_n(A);return n.jsx(Oe,{connection:{title:p,icon:H,description:X.length>1?`${X.length} instances`:ie??void 0},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:X.length}),a?.(Q)}},i)}return n.jsx(Oe,{connection:{title:p,icon:H,description:ie},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&n.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Je,{size:11})," Added"]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),v&&C("agent_connection_attached",{agent_id:v,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),w(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},e[22]=h,e[23]=v,e[24]=d,e[25]=De,e[26]=S,e[27]=w,e[28]=a,e[29]=D,e[30]=ge):ge=e[30];const je=ge;let ve;e[31]!==d||e[32]!==S||e[33]!==E?(ve=i=>{const p=i._meta?.["mcp.mesh"],H=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",ie=i.server?.description||i.description||null,X=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,Ce=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return n.jsx(Oe,{connection:{title:H,description:ie,icon:X},fallbackIcon:n.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(Ke,{children:"Built and maintained by Deco"})]}),!A&&Ce&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(Ke,{children:"Built and maintained by the official vendor"})]}),!A&&!Ce&&ce&&n.jsxs(ze,{children:[n.jsx(He,{asChild:!0,children:n.jsx(Ne,{variant:"outline",size:"icon",children:n.jsx($e,{})})}),n.jsx(Ke,{children:"Verified by the Deco team"})]}),n.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:Q=>{Q.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),E(i)},children:d===i.id?n.jsx(we,{size:14,className:"animate-spin"}):S==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},e[31]=d,e[32]=S,e[33]=E,e[34]=ve):ve=e[34];const Ge=ve,Pe=!b&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:I,onTabChange:i=>s(i)}),n.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),R()},children:[n.jsx(et,{size:12}),"Custom Connection"]})]}),Te=z&&"opacity-50 pointer-events-none";let J;e[35]!==Te?(J=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),e[35]=Te,e[36]=J):J=e[36];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;e[37]!==je?(ye=i=>{if(i.type==="group")return je(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},e[37]=je,e[38]=ye):ye=e[38];const Fe=he.map(ye);let Z;e[39]!==Ae?(Z=n.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=Z):Z=e[40];let ee;e[41]!==V?(ee=V&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=ee):ee=e[42];const Ve=T&&le.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx($e,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Be=T&&le.map(Ge),Le=T&&de.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge);let ne;e[43]!==ke||e[44]!==fe||e[45]!==T?(ne=T&&fe.length>0&&n.jsx("div",{ref:ke,className:"col-span-full h-1"}),e[43]=ke,e[44]=fe,e[45]=T,e[46]=ne):ne=e[46];let te;e[47]!==G.isLoadingMore||e[48]!==T?(te=T&&G.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=G.isLoadingMore,e[48]=T,e[49]=te):te=e[49];let se;e[50]!==Fe||e[51]!==Z||e[52]!==ee||e[53]!==Ve||e[54]!==Be||e[55]!==Le||e[56]!==Me||e[57]!==ne||e[58]!==te?(se=n.jsxs("div",{className:dn,children:[Fe,Z,ee,Ve,Be,Le,Me,ne,te]}),e[50]=Fe,e[51]=Z,e[52]=ee,e[53]=Ve,e[54]=Be,e[55]=Le,e[56]=Me,e[57]=ne,e[58]=te,e[59]=se):se=e[59];let oe;e[60]!==I||e[61]!==he.length||e[62]!==de||e[63]!==_||e[64]!==le?(oe=he.length===0&&le.length===0&&de.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:I==="connected"?"No connections yet":"No connections available"}),e[60]=I,e[61]=he.length,e[62]=de,e[63]=_,e[64]=le,e[65]=oe):oe=e[65];let ae;e[66]!==J||e[67]!==se||e[68]!==oe?(ae=n.jsxs("div",{className:J,children:[se,oe]}),e[66]=J,e[67]=se,e[68]=oe,e[69]=ae):ae=e[69];let _e;return e[70]!==Pe||e[71]!==ae?(_e=n.jsxs(n.Fragment,{children:[Pe,ae]}),e[70]=Pe,e[71]=ae,e[72]=_e):_e=e[72],_e}function at(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function it(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ct(t){return t.app_name}function rt(t){return t.app_name}function lt(t){return t?.items??[]}function dt(t,e){if(t?.hasMore)return e.reduce(ut,0)}function ut(t,e){return t+(e?.items?.length??0)}function zt({open:t,onOpenChange:e,defaultTab:m,initialSearch:v="",...h}){const w=h.mode??"add",D="agentId"in h?h.agentId:void 0,E="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,d="onAdd"in h&&h.onAdd?h.onAdd:o=>{},_=(o,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:o,app_name:c,mode:j})},[R,a]=re.useState(null),[x,S]=re.useState(v),[F,f]=re.useState(!1),{org:r}=Ie(),{data:z}=en.useSession(),b=rn(),k=hn(),I=fn(),U=o=>{e(!1),I({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o}})},P=()=>{k.invalidateQueries({predicate:o=>{const c=o.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},s=async o=>{a(o.app_name??o.id);try{const j=`${o.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,g=(await b.create.mutateAsync({title:j,description:o.description??null,connection_type:o.connection_type,connection_url:o.connection_url??null,connection_token:null,icon:o.icon??null,app_name:o.app_name??null,app_id:o.app_id??null,connection_headers:o.connection_headers??null})).id,l=await Re({connectionId:g,orgId:r.id,orgSlug:r.slug,persistFallback:N=>b.update.mutateAsync({id:g,data:{connection_token:N}}).then(()=>{})});if(l.ran&&!l.ok){C("connection_oauth_failed",{connection_id:g,flow:"clone",error:l.error??"no_token"}),K.error(`Authentication failed: ${l.error??"no token received"}`),await b.delete.mutateAsync(g);return}if(l.ran){C("connection_oauth_succeeded",{connection_id:g,flow:"clone"});const N=new URL(`/api/${r.slug}/mcp/${g}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(N.href,null)}),P()}_(g,o.app_name??null,"clone"),d(g)}catch(c){console.error("Failed to add connection:",c),K.error("Failed to add connection")}finally{a(null)}},u=async o=>{if(!(!r||!z?.user?.id)){a(o.id);try{const c=In(o,r.id,z.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",y=!!c.connection_url,g=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!y&&!g){K.error("This MCP Server cannot be connected: no connection method available"),a(null);return}const{id:l}=await b.create.mutateAsync(c),N=await Re({connectionId:l,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:l,data:{connection_token:q}}).then(()=>{})});if(N.ran&&!N.ok){C("connection_oauth_failed",{connection_id:l,flow:"connect_new",error:N.error??"no_token"}),K.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. (${N.error??"no token received"})`}),_(l,c.app_name??null,"new"),d(l);return}if(N.ran){C("connection_oauth_succeeded",{connection_id:l,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${l}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(q.href,null)}),P(),K.success("Connected and authenticated")}else K.success("Connected");_(l,c.app_name??null,"new"),d(l)}catch(c){console.error("Failed to connect:",c),K.error("Failed to connect")}finally{a(null)}}};return n.jsxs(sn,{open:t,onOpenChange:e,children:[n.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(cn,{className:"text-base font-semibold",children:w==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(bn,{value:x,onChange:S,placeholder:"Search connections..."})}),n.jsx(re.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(ot,{mode:w,agentId:D,addedConnectionIds:E,onAdd:d,onCloneAndAdd:s,onConnectAndAdd:u,connectingItemId:R,search:x,onCreateConnection:()=>f(!0),onBrowseNavigate:U,defaultTab:m})})]}),n.jsx(st,{open:F,onOpenChange:f,onCreated:async o=>{f(!1);const c=await Re({connectionId:o,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:o,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:o,flow:"custom_create",error:c.error??"no_token"}),K.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"})`}),_(o,null,"custom"),d(o),e(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:o,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${o}`,window.location.origin);await k.invalidateQueries({queryKey:me.isMCPAuthenticated(j.href,null)}),P()}_(o,null,"custom"),d(o),e(!1)}})]})}const Ze=new Map;function Ht(){const{org:t}=Ie(),e=nt(),m=tt(),v=m.find(r=>r.providerId==="deco"),{data:h,isLoading:w,refetch:D,isFetching:E}=yn({queryKey:me.aiProviderCredits(t.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=h?.balanceCents??null,_=d!=null?d/100:null,R=re.useRef(new Map);if(d!=null){const r=Ze.get(t.id);R.current.get(t.id)&&r!=null&&d>r&&C("credits_topped_up_detected",{organization_id:t.id,delta_cents:d-r,previous_balance_cents:r,new_balance_cents:d}),Ze.set(t.id,d),R.current.set(t.id,!0)}const a=!!v,x=d!=null&&d>0,S=d!=null&&d===0,F=d!=null&&d===200,f=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:a,decoKeyId:v?.id??null,balanceCents:d,balanceDollars:_,hasCredits:x,isZeroBalance:S,isInitialFreeCredit:F,hasOnlyDecoProvider:f,isLoading:w,isFetching:E,refetch:D}}function Ue(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const m=e.connectionId;return!!m&&!!t?.connections?.some(w=>w.connection_id===m)?{status:"attached",repo:e,connectionId:m}:!!m||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function Kt(t){const e=Ue(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Ut(t){if(typeof t!="object"||t===null)return!1;const m=t.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(t){return Ue(t).status==="attached"}function qt(t){const e=Ue(t).status;return e==="attached"||e==="detached"}function Gt(t){const e=new Set;for(const m of t??[]){const v=m.metadata?.liveAgentId;typeof v=="string"&&v&&e.add(m.id)}return e}function Qt(t,e){if(!t)return null;const m=t.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const v=(e??[]).find(h=>h.metadata?.liveAgentId===t.id);return v?{mode:"live",targetId:v.id}:null}function Wt(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}export{zt as A,Kt as a,Xt as b,Ut as c,qt as d,Qt as f,Gt as g,Wt as h,Ue as r,Ht as u};