decocms 4.170.7 → 4.170.9

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-CulgZ8QJ.js → AlertCircle-CHFZ773r.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CjNWeGy-.js → AreaChart-BK9sBtmA.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BNlXyeba.js → ArrowUp-Co6hwP9k.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-LKpl92jJ.js → ArrowUpRight-CVWOgsar.js} +1 -1
  5. package/dist/client/assets/{Check-BARPKH4i.js → Check-DvAWeoRK.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-D1nzBDyQ.js → CheckCircle-DVdK5I5R.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-DWFAk7Sj.js → ChevronDown-Cys4B-Xp.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-D2we6V0w.js → ChevronRight-DU0gCvHM.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BUAALiuR.js → ChevronUp-CVMiBsfT.js} +1 -1
  10. package/dist/client/assets/{Copy01-BfeEcGku.js → Copy01-C3rvOxxw.js} +1 -1
  11. package/dist/client/assets/{CpuChip01-T6rvb3sG.js → CpuChip01-DTMBA_aU.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-B-CRgbLm.js → DotsVertical-DUfr5uYb.js} +1 -1
  13. package/dist/client/assets/{Eye-BCIudvRR.js → Eye-BA9ORYU9.js} +1 -1
  14. package/dist/client/assets/{FilterLines-P6wvStsn.js → FilterLines-OjoX86te.js} +1 -1
  15. package/dist/client/assets/{HardDrive-BTCEoaQS.js → HardDrive-D0Bl23sc.js} +1 -1
  16. package/dist/client/assets/{Key01-BgjJ_7Tp.js → Key01-BD6IhaYe.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-BXm6OADq.js → LayoutLeft-D1bh0f_y.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-BSoFyTEM.js → LinkExternal01-CE6Qpb3q.js} +1 -1
  19. package/dist/client/assets/{LogOut01-BFFFOC3O.js → LogOut01-Hm292w_y.js} +1 -1
  20. package/dist/client/assets/{Monitor01-vTIk29qo.js → Monitor01-KSx6XnkC.js} +1 -1
  21. package/dist/client/assets/{Palette-Bj8tHSPy.js → Palette-HQphsc_F.js} +1 -1
  22. package/dist/client/assets/{Play-C7jD9LUn.js → Play-CJk0JSei.js} +1 -1
  23. package/dist/client/assets/{Plus-C0UcTMnT.js → Plus-Bx_apeTF.js} +1 -1
  24. package/dist/client/assets/{SearchLg-CmIsAQ3X.js → SearchLg-CWCh5XHx.js} +1 -1
  25. package/dist/client/assets/{SearchMd-D9uAX6WE.js → SearchMd-CReJyxHL.js} +1 -1
  26. package/dist/client/assets/{Settings02-DlOlugQT.js → Settings02-gcHFeitz.js} +1 -1
  27. package/dist/client/assets/{Shield01-CL48sD_B.js → Shield01-BrHWAi-h.js} +1 -1
  28. package/dist/client/assets/{Star01-3tCE1-gw.js → Star01-5ik2X7vd.js} +1 -1
  29. package/dist/client/assets/{Stars01-9A2GWUug.js → Stars01-F4_vwtUD.js} +1 -1
  30. package/dist/client/assets/{Stars02-DDwOVsF7.js → Stars02-DRV4akQx.js} +1 -1
  31. package/dist/client/assets/{Sun-JQjP1oZn.js → Sun-D0vy3hGs.js} +1 -1
  32. package/dist/client/assets/{SwitchHorizontal01-Dhz2JYYr.js → SwitchHorizontal01-DT22ZPa0.js} +1 -1
  33. package/dist/client/assets/{Tool01-CdS8kLw-.js → Tool01-CsxsVm1W.js} +1 -1
  34. package/dist/client/assets/{Tool02-BBoyH47I.js → Tool02-Bpm50ZZ_.js} +1 -1
  35. package/dist/client/assets/{Trash01-CbhzcTt3.js → Trash01-CNXDui60.js} +1 -1
  36. package/dist/client/assets/{TrendUp01-CbREjIPK.js → TrendUp01-aUksKP8R.js} +1 -1
  37. package/dist/client/assets/{Upload01-BdeHM4jD.js → Upload01-D_GFYeSB.js} +1 -1
  38. package/dist/client/assets/{User01-onkDisHt.js → User01-Cd8KKkJM.js} +1 -1
  39. package/dist/client/assets/{Users01-LJDrZYeK.js → Users01-Dr6zEaVM.js} +1 -1
  40. package/dist/client/assets/{Users03-DlmIRsEe.js → Users03-4DXCR6UI.js} +1 -1
  41. package/dist/client/assets/{X-Bnb6DHrx.js → X-Q2mn-EjA.js} +1 -1
  42. package/dist/client/assets/{XCircle-BN8DdobH.js → XCircle-1dc_62JO.js} +1 -1
  43. package/dist/client/assets/{XClose-BvANZj6r.js → XClose-DaZvKNvT.js} +1 -1
  44. package/dist/client/assets/{Zap-BAm5KmZ-.js → Zap-DucXoTMf.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-ISMHG_Ar.js → ZapSquare-BpC-SM-F.js} +1 -1
  46. package/dist/client/assets/{access-gate-B3wLJ69M.js → access-gate-BgWr2EKH.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-BnhGEfv-.js → add-section-modal-DYu5fH-A.js} +1 -1
  48. package/dist/client/assets/{agent-icon-DtkqR39Z.js → agent-icon-CUwIl1dx.js} +1 -1
  49. package/dist/client/assets/agents-list-D8gCJF8j.js +1 -0
  50. package/dist/client/assets/{ai-providers-C4NY0EwA.js → ai-providers-DRL27bTU.js} +1 -1
  51. package/dist/client/assets/{alert-CHK1X07R.js → alert-CqE0M4lM.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-CK85XiHH.js → alert-dialog-agINb_kM.js} +1 -1
  53. package/dist/client/assets/{app-editor-Cj7ZjZIH.js → app-editor-Dp8RhwO3.js} +1 -1
  54. package/dist/client/assets/{auth-catchall-DdjpG5hQ.js → auth-catchall-BGeI0JdI.js} +1 -1
  55. package/dist/client/assets/{auth-entry-DjFBaL_w.js → auth-entry-Ck0L1lFr.js} +1 -1
  56. package/dist/client/assets/{auth-CUkNJsYC.js → auth-r7Bj124T.js} +1 -1
  57. package/dist/client/assets/{auth-split-layout-Bz3Ntgbd.js → auth-split-layout-D0oJmEKR.js} +1 -1
  58. package/dist/client/assets/{authenticate-and-persist-oauth--qKVSpxv.js → authenticate-and-persist-oauth-BmlbQc1t.js} +1 -1
  59. package/dist/client/assets/{automation-list-row-CX3W9QjV.js → automation-list-row-B9dQtOte.js} +1 -1
  60. package/dist/client/assets/{automation-runs-B8ZpZPVI.js → automation-runs-pMsnP0Y2.js} +1 -1
  61. package/dist/client/assets/{automations-Bzc-usOW.js → automations-DjCSg8x_.js} +1 -1
  62. package/dist/client/assets/{avatar-aQxHuIYg.js → avatar-BzgEwXbY.js} +1 -1
  63. package/dist/client/assets/{badge-CoVICL7-.js → badge-Bs2_9beB.js} +1 -1
  64. package/dist/client/assets/{block-document-Ddgx5l89.js → block-document-CpwjZL6Q.js} +1 -1
  65. package/dist/client/assets/{brand-context-DV2evLJc.js → brand-context-BVIq9zug.js} +1 -1
  66. package/dist/client/assets/{buckets-CO8ytaDl.js → buckets-CiG2hVtx.js} +1 -1
  67. package/dist/client/assets/{bulk-category-panel-Z-ncC8dg.js → bulk-category-panel-DuJB6eG_.js} +1 -1
  68. package/dist/client/assets/{calendar-CPOzEjNP.js → calendar-f12tBA6s.js} +1 -1
  69. package/dist/client/assets/{capability-load-error-DEcgvDg0.js → capability-load-error-B3ulBg7u.js} +1 -1
  70. package/dist/client/assets/{card-DkOcnaGU.js → card-Abbjp7o9.js} +1 -1
  71. package/dist/client/assets/{category-editor-D7hycPUc.js → category-editor-C34vqGHA.js} +1 -1
  72. package/dist/client/assets/{chat-context-ClBVfA1X.js → chat-context-DZriQ2nu.js} +1 -1
  73. package/dist/client/assets/{checkbox-DQk7Hn7H.js → checkbox-DoEDgIiX.js} +1 -1
  74. package/dist/client/assets/{cli-auth-success-DfFnrNz5.js → cli-auth-success-DgB7QhaM.js} +1 -1
  75. package/dist/client/assets/{collection-detail-C9mrOEh9.js → collection-detail-BlUl5QC5.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-CsVUXmTq.js → collection-display-button-Dlg9q-gy.js} +1 -1
  77. package/dist/client/assets/{collection-search-BBHvvNML.js → collection-search-BmyKZ4mB.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-BitF3J_w.js → collection-table-wrapper-DpW425mq.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-33-bqtiz.js → collection-tabs-ypHTey6D.js} +1 -1
  80. package/dist/client/assets/{command-mKOrJzrZ.js → command-lwH5MRDN.js} +1 -1
  81. package/dist/client/assets/{commerce-onboarding-BdFh7WdD.js → commerce-onboarding-Ddte0nDP.js} +1 -1
  82. package/dist/client/assets/{companions-core-B3zttn60.js → companions-core-BTtbZTcR.js} +1 -1
  83. package/dist/client/assets/{connect-DJcsNXGq.js → connect--E71ZJXJ.js} +1 -1
  84. package/dist/client/assets/{connection-card-Cb2sDtSe.js → connection-card-CfhLFgtq.js} +1 -1
  85. package/dist/client/assets/{connection-detail-DWiKqpES.js → connection-detail-D61aORuF.js} +1 -1
  86. package/dist/client/assets/{connection-form-helpers-BNRb0RFO.js → connection-form-helpers-BtRrnVXr.js} +1 -1
  87. package/dist/client/assets/{connection-Dvuv7or_.js → connection-rtBWAYGu.js} +1 -1
  88. package/dist/client/assets/{connections-CZxmMVwl.js → connections-CqktTWAl.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-qN274emC.js → decopilot-sse-pool-qM8vkZRc.js} +1 -1
  90. package/dist/client/assets/{dialog-OnmvFj6U.js → dialog-B8afz6qt.js} +1 -1
  91. package/dist/client/assets/{domain-settings-CzTLtd6K.js → domain-settings-B2jwXzb5.js} +1 -1
  92. package/dist/client/assets/{drawer-Bbx4sGLc.js → drawer-CsFLHs7v.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-BLoiIT66.js → dropdown-menu-CUe2Z1Pv.js} +1 -1
  94. package/dist/client/assets/{empty-state-B7EoOp90.js → empty-state-BVNbuZvT.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-DPxnrIHs.js → extract-connection-data-BGQmjaxM.js} +1 -1
  96. package/dist/client/assets/{file-explorer-DV-Ii_1B.js → file-explorer-B5zVoOkB.js} +1 -1
  97. package/dist/client/assets/{form-B1FGpjqQ.js → form-DIbDB5F8.js} +1 -1
  98. package/dist/client/assets/{general-CevDlV2t.js → general-Co9WM_mn.js} +1 -1
  99. package/dist/client/assets/github-repo-picker-CNTnold7.js +1 -0
  100. package/dist/client/assets/{hooks-DkiICRiM.js → hooks-1FTFbhaF.js} +1 -1
  101. package/dist/client/assets/{index-0NQAslei.js → index-B5Dj-QID.js} +1 -1
  102. package/dist/client/assets/{index-55ijbTTK.js → index-B9G8bKjB.js} +1 -1
  103. package/dist/client/assets/index-BD6FLXxu.css +1 -0
  104. package/dist/client/assets/{index-C5Cl4k32.js → index-BH9QNWXg.js} +1 -1
  105. package/dist/client/assets/{index-Dp2RJDLw.js → index-BrWBP7DG.js} +1 -1
  106. package/dist/client/assets/{index-DD19Xgi9.js → index-Bwc3tUMK.js} +3 -3
  107. package/dist/client/assets/{index-Cb4Y0Iqz.js → index-BxucosO3.js} +1 -1
  108. package/dist/client/assets/{index-Btt82SFt.js → index-CKIRRgz6.js} +1 -1
  109. package/dist/client/assets/{index-WRi6IFVD.js → index-DjT6GHbo.js} +1 -1
  110. package/dist/client/assets/{index-DYJY_3X1.js → index-H5ACk-O4.js} +3 -3
  111. package/dist/client/assets/{index-redirect-DHYukAPh.js → index-redirect-DcLlErNa.js} +1 -1
  112. package/dist/client/assets/{index-CYXzKIGv.js → index-utpt7MUn.js} +1 -1
  113. package/dist/client/assets/{index-CzLUG8CI.js → index-x3mHjQ8l.js} +5 -5
  114. package/dist/client/assets/{input-B-xxZOKU.js → input-B0C9zZE5.js} +1 -1
  115. package/dist/client/assets/{integration-icon-B63LIXOn.js → integration-icon--t5PxVoH.js} +1 -1
  116. package/dist/client/assets/{invite-member-dialog-CzB9sdOr.js → invite-member-dialog-D52QgX3v.js} +1 -1
  117. package/dist/client/assets/{label-DVBVPZn_.js → label-9qaUvlD9.js} +1 -1
  118. package/dist/client/assets/{layout-D-p7eb8T.js → layout-Dj8a_FqY.js} +1 -1
  119. package/dist/client/assets/{login-Cb_sr0ld.js → login-C40tD3zO.js} +1 -1
  120. package/dist/client/assets/{mcp-oauth-DSZxQ3KG.js → mcp-oauth-7jPXCmxc.js} +1 -1
  121. package/dist/client/assets/{members-CpL2kgGq.js → members-Cj7NzNGi.js} +1 -1
  122. package/dist/client/assets/{monaco-editor-DOx5PZhj.js → monaco-editor-BTg8APTk.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-WdbL1buD.js → monitoring-stats-row-DrlsNmSY.js} +1 -1
  124. package/dist/client/assets/{multi-select-CmB0E9HL.js → multi-select-BqvVgVCw.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-DC7VgOoE.js → oauth-callback-Bttzc78J.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-ai-provider-DkHQn1xC.js → oauth-callback-ai-provider-C8WAyftR.js} +1 -1
  127. package/dist/client/assets/{onboarding-CP4Xl5BT.js → onboarding-O8S9Gduw.js} +1 -1
  128. package/dist/client/assets/{org-layout-Bp_cOzYu.js → org-layout-0EaZOLWW.js} +1 -1
  129. package/dist/client/assets/{organization-choice-DEYQjW76.js → organization-choice-Cp8Qb1ni.js} +1 -1
  130. package/dist/client/assets/{orgs-Cg-7TNHk.js → orgs-D_R5Zsvj.js} +1 -1
  131. package/dist/client/assets/{page-seo-form-D8Jl7JDX.js → page-seo-form-CK7IZR6L.js} +1 -1
  132. package/dist/client/assets/{popover-CN7lQbJb.js → popover-B_ST4UEJ.js} +1 -1
  133. package/dist/client/assets/{post-editor-DnAqMACi.js → post-editor-DzCEFrNv.js} +1 -1
  134. package/dist/client/assets/{primitives-DM0CO-PV.js → primitives-D0QHEMCA.js} +1 -1
  135. package/dist/client/assets/{profile-TxFzmEwf.js → profile-CRsiCjzT.js} +1 -1
  136. package/dist/client/assets/project-app-view-CukBVWoL.js +1 -0
  137. package/dist/client/assets/provision-repo-scoped-github-connection-B2s3ApVy.js +1 -0
  138. package/dist/client/assets/record-editor-DCAxt1DF.js +1 -0
  139. package/dist/client/assets/{redirect-editor-DI1TVrRf.js → redirect-editor-Bu5RGmfY.js} +1 -1
  140. package/dist/client/assets/registry-ZRGqzqO0.js +2 -0
  141. package/dist/client/assets/{registry-layout-Dd9v-lxw.js → registry-layout-B1i0-3Pr.js} +1 -1
  142. package/dist/client/assets/reports-BmFsOhV6.js +43 -0
  143. package/dist/client/assets/{require-capability-DEPjYfTb.js → require-capability-D2n9DG6Z.js} +1 -1
  144. package/dist/client/assets/{required-auth-layout-CvEEOnW2.js → required-auth-layout-DZ4eWftX.js} +1 -1
  145. package/dist/client/assets/{reset-password-Zr4erJ5H.js → reset-password-DVR2MFg7.js} +1 -1
  146. package/dist/client/assets/{roles-D4AXY1O0.js → roles-isMh3gXX.js} +1 -1
  147. package/dist/client/assets/{search-input-B7HrisdG.js → search-input-gO2eKO_5.js} +1 -1
  148. package/dist/client/assets/{secrets-BiVb_h2W.js → secrets-BUlpmBNS.js} +1 -1
  149. package/dist/client/assets/{sections-editor-B4XrZ9ZW.js → sections-editor-BDiZb1Z9.js} +1 -1
  150. package/dist/client/assets/{select-Bo0WA9yd.js → select-CxefxStP.js} +1 -1
  151. package/dist/client/assets/{select-model-UN_W2kWz.js → select-model-DS0UKwil.js} +1 -1
  152. package/dist/client/assets/self-tool-result-C71QjSho.js +1 -0
  153. package/dist/client/assets/{seo-editor-EBMN1tFp.js → seo-editor-Cjrtrelh.js} +1 -1
  154. package/dist/client/assets/{settings-layout-CTCpMgqD.js → settings-layout-C8u0tnG-.js} +1 -1
  155. package/dist/client/assets/{settings-section-SjYGvsuZ.js → settings-section-NfARmCKl.js} +1 -1
  156. package/dist/client/assets/{shell-controls-BAqugCQv.js → shell-controls-DTYyoSXK.js} +1 -1
  157. package/dist/client/assets/{shell-layout-ygdVGNeq.js → shell-layout-DLFUYE63.js} +1 -1
  158. package/dist/client/assets/{sidebar-Cw1n8cPE.js → sidebar-C8F_L04R.js} +1 -1
  159. package/dist/client/assets/{skeleton-C3mqHUgK.js → skeleton-BBQnkHEj.js} +1 -1
  160. package/dist/client/assets/{spinner-JIyCKCZR.js → spinner-BL6Zvu4t.js} +1 -1
  161. package/dist/client/assets/{sso-DxGDFKtg.js → sso-C2syBsmv.js} +1 -1
  162. package/dist/client/assets/{store-UE0DxGe6.js → store-CQf5W226.js} +1 -1
  163. package/dist/client/assets/store-registry-BXEv8_kc.js +2 -0
  164. package/dist/client/assets/{studio-tools-BuHDDhrj.js → studio-tools-BzZSIhLG.js} +1 -1
  165. package/dist/client/assets/{switch-D0rt9_tw.js → switch-B8KvIAM5.js} +1 -1
  166. package/dist/client/assets/{tab-id-DojsBlVG.js → tab-id-CNj9F8zM.js} +1 -1
  167. package/dist/client/assets/{table-B9vqd95o.js → table-CS1Fejt5.js} +1 -1
  168. package/dist/client/assets/{tabs-D_KaPDCJ.js → tabs-NhxhwI1e.js} +1 -1
  169. package/dist/client/assets/{textarea-DyydMtzS.js → textarea-BpMZqHjz.js} +1 -1
  170. package/dist/client/assets/{toggle-group-_sacxwJk.js → toggle-group-Cz23_Kpu.js} +1 -1
  171. package/dist/client/assets/{toolbar-Bnk-Y6Bk.js → toolbar-DjyNQ16J.js} +1 -1
  172. package/dist/client/assets/{tooltip-Bg4lifNX.js → tooltip-DEUE9jM4.js} +1 -1
  173. package/dist/client/assets/{use-ai-providers-BdqwOZhV.js → use-ai-providers-CrKRCKqt.js} +1 -1
  174. package/dist/client/assets/{use-automations-DPh61wGk.js → use-automations-mlmSZ5Bt.js} +1 -1
  175. package/dist/client/assets/{use-autosave-CNMKkcAa.js → use-autosave-DjD-Jc1k.js} +1 -1
  176. package/dist/client/assets/{use-capability-C6EbtzXu.js → use-capability-CdfWVvaP.js} +1 -1
  177. package/dist/client/assets/{use-clock-tick-DIxeJR8K.js → use-clock-tick-DPbq1mYN.js} +1 -1
  178. package/dist/client/assets/{use-connection-DEaoKOVa.js → use-connection-ClHMivc9.js} +1 -1
  179. package/dist/client/assets/{use-copy-BId4eX5b.js → use-copy-CTLTVvS5.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-D9UPJWo2.js → use-create-virtual-mcp-CdYlgy0t.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-B3VRqTYF.js → use-debounced-autosave-DtH5l18k.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-i9ZCSUX-.js → use-debounced-value-CovCCBhe.js} +1 -1
  183. package/dist/client/assets/{use-deco-credits-B_NEq58J.js → use-deco-credits-6pOXGrzE.js} +1 -1
  184. package/dist/client/assets/{use-decopilot-events-CYCBMba3.js → use-decopilot-events-_4mKXrIf.js} +1 -1
  185. package/dist/client/assets/{use-delete-connection-DGEuPXeT.js → use-delete-connection-OS_8KLG9.js} +1 -1
  186. package/dist/client/assets/{use-deployment-admin-CUuCBSxD.js → use-deployment-admin-DqDXKE0b.js} +1 -1
  187. package/dist/client/assets/{use-file-configs-OhwXVJ_Q.js → use-file-configs-DKUkuEN_.js} +1 -1
  188. package/dist/client/assets/{use-infinite-scroll-BwgDaFz3.js → use-infinite-scroll-NongBYj_.js} +1 -1
  189. package/dist/client/assets/{use-join-requests-BtZRjEAs.js → use-join-requests-C936Ipz3.js} +1 -1
  190. package/dist/client/assets/{use-mcp-auth-status-DIV1qXsR.js → use-mcp-auth-status-eqb5zOs6.js} +1 -1
  191. package/dist/client/assets/{use-mcp-client-C6u6uWMn.js → use-mcp-client-LwWJF5fR.js} +1 -1
  192. package/dist/client/assets/{use-mcp-tools-BKnN90LQ.js → use-mcp-tools-Co1syPT0.js} +1 -1
  193. package/dist/client/assets/{use-members-BhDGuSrv.js → use-members-CGHyebw8.js} +1 -1
  194. package/dist/client/assets/{use-mobile-CuBbFzjG.js → use-mobile-Z9kOkQf9.js} +1 -1
  195. package/dist/client/assets/{use-navigate-to-agent-CfiKyTiO.js → use-navigate-to-agent-CzxA9jhU.js} +1 -1
  196. package/dist/client/assets/{use-org-auth-client-BdUdgOJA.js → use-org-auth-client-Cktw3mvT.js} +1 -1
  197. package/dist/client/assets/{use-org-sso-BeUUySr2.js → use-org-sso-CwRnKTue.js} +1 -1
  198. package/dist/client/assets/{use-organization-roles-DWzU2COa.js → use-organization-roles-CwD3MylY.js} +1 -1
  199. package/dist/client/assets/{use-organization-settings-DCilCh9D.js → use-organization-settings-BOU_eKja.js} +1 -1
  200. package/dist/client/assets/{use-registry-connections-DY5HXeca.js → use-registry-connections-GLLEAgC1.js} +1 -1
  201. package/dist/client/assets/{use-secrets-DyfpPIKJ.js → use-secrets-D-U2ROxC.js} +1 -1
  202. package/dist/client/assets/{use-status-sounds-CtR-iJrK.js → use-status-sounds-o0gzP3xo.js} +1 -1
  203. package/dist/client/assets/{use-tags-DB7y1K_X.js → use-tags-CD1jyxwU.js} +1 -1
  204. package/dist/client/assets/{use-view-mode-D8FPxdi1.js → use-view-mode-P_XfHBh9.js} +1 -1
  205. package/dist/client/assets/{use-virtual-mcp-CtAFuCva.js → use-virtual-mcp-C_7WzSRq.js} +1 -1
  206. package/dist/client/assets/useInfiniteQuery-9hf3uUqJ.js +1 -0
  207. package/dist/client/assets/{useQueries--YSCqaIN.js → useQueries-ConENym0.js} +1 -1
  208. package/dist/client/assets/{useRouterState-DTAdOPb-.js → useRouterState-CCYJ0CeJ.js} +1 -1
  209. package/dist/client/assets/useSuspenseInfiniteQuery-V7U1vwFF.js +1 -0
  210. package/dist/client/assets/{users-DWvE_C1K.js → users-rxAviq8G.js} +1 -1
  211. package/dist/client/assets/{variant-calendar-CGU8zbxv.js → variant-calendar-BBjEaiOI.js} +1 -1
  212. package/dist/client/assets/{view-mode-toggle-DlDm54jJ.js → view-mode-toggle-C9ENUIIW.js} +1 -1
  213. package/dist/client/index.html +2 -2
  214. package/dist/server/cli.js +490 -464
  215. package/dist/server/migrate.js +118 -92
  216. package/dist/server/server.js +314 -314
  217. package/package.json +1 -1
  218. package/dist/client/assets/agents-list-PJ_bNLJj.js +0 -1
  219. package/dist/client/assets/github-repo-picker-8IfA3bqL.js +0 -1
  220. package/dist/client/assets/index-Cw0lZSdB.css +0 -1
  221. package/dist/client/assets/project-app-view-wfKsnkAj.js +0 -1
  222. package/dist/client/assets/provision-repo-scoped-github-connection-CAXumITS.js +0 -1
  223. package/dist/client/assets/record-editor-BhH6MPJd.js +0 -1
  224. package/dist/client/assets/registry-xKh7pW67.js +0 -2
  225. package/dist/client/assets/reports-DT7pxKAL.js +0 -43
  226. package/dist/client/assets/self-tool-result-ofSJsTC6.js +0 -1
  227. package/dist/client/assets/store-registry-CsVvMWKp.js +0 -2
  228. package/dist/client/assets/useInfiniteQuery-CXglgl_n.js +0 -1
  229. package/dist/client/assets/useSuspenseInfiniteQuery-B6E2NwfD.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.170.7",
3
+ "version": "4.170.9",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as ge,b as me,j as o,v as Ae,t as le,B as ie,F as De,o as Ie,a as Le,r as W,n as Te,K as de,e as Ee,p as V,G as Fe,m as ke}from"./index-DD19Xgi9.js";import{a as ne,b as ye,D as ue,c as pe}from"./dropdown-menu-BLoiIT66.js";import{a as Ge}from"./Users03-DlmIRsEe.js";import{G as we,b as Me,a as Pe}from"./github-repo-picker-8IfA3bqL.js";import{a as Oe,b as ze,c as Be}from"./use-virtual-mcp-CtAFuCva.js";import{P as ce}from"./index-Cb4Y0Iqz.js";import{a as Ue}from"./DotsVertical-B-CRgbLm.js";import{A as Re,G as fe,aY as $e}from"./agent-icon-DtkqR39Z.js";import{a as He,b as Ve}from"./Settings02-DlOlugQT.js";import{s as Ke}from"./Trash01-CbhzcTt3.js";import{p as qe,f as he}from"./pt-BR-CLy76QW2.js";import{c as _e}from"./use-navigate-to-agent-CfiKyTiO.js";import{e as Qe,h as Ye}from"./use-organization-settings-DCilCh9D.js";import{u as Se}from"./use-capability-C6EbtzXu.js";import{C as Je}from"./card-DkOcnaGU.js";import{E as We}from"./empty-state-B7EoOp90.js";import{u as Xe}from"./use-create-virtual-mcp-D9UPJWo2.js";import{u as Ze}from"./use-connection-DEaoKOVa.js";import{u as xe,S as et}from"./use-mcp-client-C6u6uWMn.js";import{p as tt,a as je}from"./deco-site-production-url-CaKZ7xBn.js";import{g as ot,f as st,a as it,G as nt,p as rt}from"./provision-repo-scoped-github-connection-CAXumITS.js";import{e as lt,d as at,a as ct,b as mt,c as dt}from"./dialog-OnmvFj6U.js";import{C as ut}from"./collection-search-BBHvvNML.js";import{A as pt,a as gt,b as ft,c as ht,d as xt,e as jt,f as Ct,g as bt}from"./alert-dialog-CK85XiHH.js";import{S as Dt}from"./search-input-B7HrisdG.js";import{s as Ce}from"./Plus-C0UcTMnT.js";import"./Check-BARPKH4i.js";import"./ChevronRight-D2we6V0w.js";import"./use-debounced-value-i9ZCSUX-.js";import"./authenticate-and-persist-oauth--qKVSpxv.js";import"./mcp-oauth-DSZxQ3KG.js";import"./auth-CUkNJsYC.js";import"./LinkExternal01-BSoFyTEM.js";import"./use-mcp-tools-BKnN90LQ.js";import"./extract-connection-data-DPxnrIHs.js";import"./metadata-dUsYcpuu.js";import"./sidebar-Cw1n8cPE.js";import"./LayoutLeft-BXm6OADq.js";import"./use-mobile-CuBbFzjG.js";import"./X-Bnb6DHrx.js";import"./tooltip-Bg4lifNX.js";import"./AlertCircle-CulgZ8QJ.js";import"./Tool01-CdS8kLw-.js";import"./ArrowUp-BNlXyeba.js";import"./Tool02-BBoyH47I.js";import"./XCircle-BN8DdobH.js";import"./ArrowUpRight-LKpl92jJ.js";import"./TrendUp01-CbREjIPK.js";import"./ZapSquare-ISMHG_Ar.js";import"./CheckCircle-D1nzBDyQ.js";import"./ChevronDown-DWFAk7Sj.js";import"./ChevronUp-BUAALiuR.js";import"./Stars02-DDwOVsF7.js";import"./Copy01-BfeEcGku.js";import"./CpuChip01-T6rvb3sG.js";import"./Eye-BCIudvRR.js";import"./FilterLines-P6wvStsn.js";import"./Star01-3tCE1-gw.js";import"./Palette-Bj8tHSPy.js";import"./SwitchHorizontal01-Dhz2JYYr.js";import"./HardDrive-BTCEoaQS.js";import"./Key01-BgjJ_7Tp.js";import"./LogOut01-BFFFOC3O.js";import"./Monitor01-vTIk29qo.js";import"./Sun-JQjP1oZn.js";import"./Play-C7jD9LUn.js";import"./SearchLg-CmIsAQ3X.js";import"./SearchMd-D9uAX6WE.js";import"./Shield01-CL48sD_B.js";import"./Stars01-9A2GWUug.js";import"./Upload01-BdeHM4jD.js";import"./User01-onkDisHt.js";import"./Users01-LJDrZYeK.js";import"./XClose-BvANZj6r.js";import"./Zap-BAm5KmZ-.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./hooks-DkiICRiM.js";import"./decopilot-sse-pool-qN274emC.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./studio-tools-BuHDDhrj.js";function be(t){const e=ge.c(28),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:r,isCreating:f,align:c,side:G,showBetaBadge:x}=t,M=c===void 0?"end":c,d=me();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Ge,{size:14}),e[0]=T):T=e[0];let m;e[1]!==d?(m=d("common.createAgentDropdown.createFromScratch"),e[1]=d,e[2]=m):m=e[2];let D;e[3]!==f||e[4]!==i||e[5]!==m?(D=o.jsxs(ne,{disabled:f,onClick:i,children:[T,m]}),e[3]=f,e[4]=i,e[5]=m,e[6]=D):D=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(we,{className:"size-3.5"}),e[7]=j):j=e[7];let y;e[8]!==d?(y=d("common.createAgentDropdown.importFromGitHub"),e[8]=d,e[9]=y):y=e[9];let a;e[10]!==x?(a=x&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=x,e[11]=a):a=e[11];let l;e[12]!==n||e[13]!==y||e[14]!==a?(l=o.jsxs(ne,{onClick:n,children:[j,y,a]}),e[12]=n,e[13]=y,e[14]=a,e[15]=l):l=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=h):h=e[16];let C;e[17]!==d?(C=d("common.createAgentDropdown.importFromDeco"),e[17]=d,e[18]=C):C=e[18];let w;e[19]!==r||e[20]!==C?(w=o.jsxs(ne,{onClick:r,children:[h,C]}),e[19]=r,e[20]=C,e[21]=w):w=e[21];let u;return e[22]!==M||e[23]!==G||e[24]!==w||e[25]!==D||e[26]!==l?(u=o.jsxs(ye,{side:G,align:M,className:"w-48",children:[D,l,w]}),e[22]=M,e[23]=G,e[24]=w,e[25]=D,e[26]=l,e[27]=u):u=e[27],u}function yt(t){const e=ge.c(65),{project:i,lastUsedAt:n,onDeleteClick:r}=t,f=_e(),c=me(),[G]=Ae(),x=G.language==="pt-BR"?qe:void 0,{mainAgentId:M}=Qe(),d=Ye(),{granted:T}=Se("org:manage"),m=M===i.id;let D;e[0]!==m||e[1]!==i.id||e[2]!==i.title||e[3]!==d||e[4]!==c?(D=()=>{const I=m?null:i.id;d.mutate(I,{onSuccess:()=>le.success(m?c("home.projectCard.mainAgentUnset",{title:i.title}):c("home.projectCard.mainAgentSet",{title:i.title})),onError:()=>le.error(c("home.projectCard.mainAgentError"))})},e[0]=m,e[1]=i.id,e[2]=i.title,e[3]=d,e[4]=c,e[5]=D):D=e[5];const j=D;let y;e[6]!==f||e[7]!==i.id?(y=()=>f(i.id),e[6]=f,e[7]=i.id,e[8]=y):y=e[8];let a;e[9]!==i.title||e[10]!==y?(a=o.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[9]=i.title,e[10]=y,e[11]=a):a=e[11];let l;e[12]!==i.icon||e[13]!==i.title?(l=o.jsx(Re,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[12]=i.icon,e[13]=i.title,e[14]=l):l=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Ue,{size:20})})}),e[15]=h):h=e[15];let C;e[16]!==f||e[17]!==i.id?(C=()=>f(i.id,{search:{main:"settings"}}),e[16]=f,e[17]=i.id,e[18]=C):C=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(He,{size:16}),e[19]=w):w=e[19];let u;e[20]!==C?(u=o.jsxs(ne,{onClick:C,children:[w,"Settings"]}),e[20]=C,e[21]=u):u=e[21];let O;e[22]!==T||e[23]!==m||e[24]!==c||e[25]!==j?(O=T&&o.jsxs(ne,{onClick:I=>{I.stopPropagation(),j()},children:[o.jsx(fe,{size:16}),c(m?"home.projectCard.unsetMainAgent":"home.projectCard.setAsMainAgent")]}),e[22]=T,e[23]=m,e[24]=c,e[25]=j,e[26]=O):O=e[26];let E;e[27]!==r?(E=r&&o.jsxs(ne,{variant:"destructive",onClick:I=>{I.stopPropagation(),r(I)},children:[o.jsx(Ke,{size:16}),"Delete"]}),e[27]=r,e[28]=E):E=e[28];let z;e[29]!==E||e[30]!==u||e[31]!==O?(z=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(ye,{align:"end",children:[u,O,E]})]})}),e[29]=E,e[30]=u,e[31]=O,e[32]=z):z=e[32];let _;e[33]!==z||e[34]!==l?(_=o.jsxs("div",{className:"flex items-start justify-between",children:[l,z]}),e[33]=z,e[34]=l,e[35]=_):_=e[35];let N;e[36]!==i.title?(N=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[36]=i.title,e[37]=N):N=e[37];let v;e[38]!==m||e[39]!==c?(v=m&&o.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(fe,{size:12}),c("home.projectCard.mainAgentBadge")]}),e[38]=m,e[39]=c,e[40]=v):v=e[40];let P;e[41]!==N||e[42]!==v?(P=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[N,v]}),e[41]=N,e[42]=v,e[43]=P):P=e[43];const F=i.description||"No description";let s;e[44]!==F?(s=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:F}),e[44]=F,e[45]=s):s=e[45];let p;e[46]!==P||e[47]!==s?(p=o.jsxs("div",{className:"flex flex-col gap-1",children:[P,s]}),e[46]=P,e[47]=s,e[48]=p):p=e[48];let g;e[49]!==_||e[50]!==p?(g=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[_,p]}),e[49]=_,e[50]=p,e[51]=g):g=e[51];let b;e[52]!==n||e[53]!==x||e[54]!==i.updated_at||e[55]!==c?(b=n?c("home.projectCard.lastUsed",{time:he(new Date(n),{addSuffix:!0,locale:x})}):c("home.projectCard.updated",{time:he(new Date(i.updated_at),{addSuffix:!0,locale:x})}),e[52]=n,e[53]=x,e[54]=i.updated_at,e[55]=c,e[56]=b):b=e[56];let S;e[57]!==b?(S=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),e[57]=b,e[58]=S):S=e[58];let A;e[59]!==g||e[60]!==S?(A=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[g,S]}),e[59]=g,e[60]=S,e[61]=A):A=e[61];let k;return e[62]!==A||e[63]!==a?(k=o.jsxs(Je,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[a,A]}),e[62]=A,e[63]=a,e[64]=k):k=e[64],k}const wt="deco-sites";function _t(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function St(t,e){const i=e?_t(e):null,n=i?.owner??wt,r=i?.repo??t;return{owner:n,name:r,url:`https://github.com/${n}/${r}`}}function Nt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function Ne(t,e,i){const n=await fetch(t,e),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`${i} (${n.status})`);return r}function vt(t){return Ne(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function At({open:t,onOpenChange:e,onBack:i}){const n=me(),{org:r}=De(),f=_e(),c=Ie(),{data:G}=Le.useSession(),[x,M]=W.useState(null),[d,T]=W.useState(null),[m,D]=W.useState(""),j=xe({connectionId:et,orgId:r.id,orgSlug:r.slug}),y=Ze({slug:"mcp-github"}),a=ot(y),l=Me({enabled:t&&a.length===0}),h=a.length===1?a[0]??null:d,C=a.length>1&&!h,w=xe({connectionId:h?.id??"",orgId:r.id,orgSlug:r.slug}),u=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:O,isLoading:E,error:z}=Te({queryKey:de.decoSites(G?.user?.email),queryFn:()=>vt(r.slug),enabled:t&&!!G?.user?.email,staleTime:6e4,retry:!1}),_=O?.sites??[],N=s=>{s||(M(null),T(null),D("")),e(s)},v=_.filter(s=>s.name.toLowerCase().includes(m.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),P=!x||v.some(s=>s.name===x),F=Ee({mutationFn:async s=>{if(!h)throw new Error(n("common.importFromDecoDialog.githubNotConnected"));V("deco_site_import_started",{site_name:s});const{installations:p}=await st(B=>j.callTool(B),h.id),g=_.find(B=>B.name===s);if(!g)throw new Error(n("common.importFromDecoDialog.siteNoLongerAvailable"));const b=St(s,g.metadata),S=it(p,b.owner);if(!S)throw new Error(n("common.importFromDecoDialog.installGithubApp",{owner:b.owner,installUrl:nt}));let A=null,k=null,I=null;const Y=async()=>{I&&await j.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:I}}).catch(()=>{}),k&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:k,force:!0}}).catch(()=>{}),A&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{})};try{const B=await Ne(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},n("common.importFromDecoDialog.failedToCreateConnection")),U=B.connId;if(!U)throw new Error(n("common.importFromDecoDialog.noConnectionId"));A=U;const{childConnectionId:$}=await rt({orgSlug:r.slug,sourceConnection:h,installationId:S.installationId,owner:b.owner,repo:b.name,githubCallTool:H=>w.callTool(H),selfCallTool:H=>j.callTool(H)});k=$;const K=B.icon??null,q=Nt(s),re=s.toLowerCase(),J=tt(je(g.domains)),Q=await j.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:K??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:re,productionUrl:J,githubRepo:{owner:b.owner,name:b.name,url:b.url,installationId:S.installationId,connectionId:$},ui:{banner:null,bannerColor:"#22C55E",icon:K,themeColor:"#22C55E",slug:q,pinnedViews:[{connectionId:U,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:U,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:U},{connection_id:$}]}}}),R=Q.structuredContent??Q;if(!R.item?.id)throw new Error(n("common.importFromDecoDialog.failedToCreateAgent"));return I=R.item.id,{slug:q,virtualMcpId:R.item.id,connId:U,item:R.item}}catch(B){throw await Y(),B}},onSuccess:({slug:s,virtualMcpId:p,item:g})=>{V("deco_site_import_succeeded",{site_name:g.title,virtual_mcp_id:p,slug:s}),c.setQueryData(de.collectionItem(j,r.id,"","VIRTUAL_MCP",p),{item:g}),c.invalidateQueries({predicate:b=>{const S=b.queryKey;return S[1]===r.id&&S[3]==="collection"&&S[4]==="VIRTUAL_MCP"}}),c.invalidateQueries({queryKey:de.projects(r.id)}),le.success(n("common.importFromDecoDialog.importSuccess",{slug:s})),N(!1),localStorage.setItem(Fe.sidebarOpen(),JSON.stringify(!1)),f(p)},onError:s=>{V("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),le.error(n("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:n("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(lt,{open:t,onOpenChange:N,children:o.jsxs(at,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(ct,{className:"sr-only",children:o.jsx(mt,{children:n("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&o.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":n("common.importFromDecoDialog.goBack"),children:o.jsx(Ve,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:n("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ut,{value:m,onChange:D,placeholder:n("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&D("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??n("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ie,{variant:"outline",size:"sm",onClick:l.retry,children:n("common.importFromDecoDialog.retryGithubSetup")})]}),u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.settingUpGithub")}),C&&!u&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>T(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(we,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),E&&!u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.loadingSites")}),!E&&!u&&!C&&l.status!=="error"&&!z&&_.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.noSitesFound")}),!E&&!u&&!C&&l.status!=="error"&&_.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[v.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:n("common.importFromDecoDialog.noSitesMatch",{search:m})}),v.map(s=>{const p=je(s.domains),g=x===s.name;return o.jsxs("button",{type:"button",onClick:()=>M(s.name),className:ke("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",g?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),p&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p})]})]},s.name)})]})]}),o.jsxs(dt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ie,{variant:"outline",onClick:()=>N(!1),disabled:F.isPending,children:n("common.importFromDecoDialog.cancel")}),o.jsx(ie,{disabled:!x||!P||F.isPending||E||u||C||!h||l.status==="error",onClick:()=>x&&F.mutate(x),children:F.isPending?n("common.importFromDecoDialog.importing"):n("common.importFromDecoDialog.import")})]})]})})}function ns(){const t=ge.c(77),e=me(),{org:i}=De(),n=Oe(),r=ze(),[f,c]=W.useState("");let G;t[0]===Symbol.for("react.memo_cache_sentinel")?(G={navigateOnCreate:!0},t[0]=G):G=t[0];const{createVirtualMCP:x,isCreating:M}=Xe(G),[d,T]=W.useState(null),[m,D]=W.useState(!1),[j,y]=W.useState(!1),{granted:a}=Se("agents:manage"),l=f.toLowerCase(),h=n.filter(L=>L.id!==i.id&&(L.title.toLowerCase().includes(l)||L.description?.toLowerCase().includes(l))),{data:C}=Be(h.map(It));let w;t[1]!==r||t[2]!==d||t[3]!==e?(w=async()=>{if(!d)return;const{id:L,title:ve}=d;T(null);try{await r.delete.mutateAsync(L),V("agent_deleted",{agent_id:L,source:"agents_list"}),le.success(e("routes.agentsList.deletedAgent",{title:ve}))}catch{}},t[1]=r,t[2]=d,t[3]=e,t[4]=w):w=t[4];const u=w,O=ce,E=ce,z=ce;let _;t[5]!==e?(_=e("routes.agentsList.title"),t[5]=e,t[6]=_):_=t[6];let N;t[7]!==_?(N=o.jsx(ce.Title,{children:_}),t[7]=_,t[8]=N):N=t[8];let v;t[9]!==e?(v=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=v):v=t[10];let P;t[11]===Symbol.for("react.memo_cache_sentinel")?(P=L=>{L.key==="Escape"&&(c(""),L.target.blur())},t[11]=P):P=t[11];let F;t[12]!==f||t[13]!==v?(F=o.jsx(Dt,{value:f,onChange:c,placeholder:v,className:"w-full md:w-[375px]",onKeyDown:P}),t[12]=f,t[13]=v,t[14]=F):F=t[14];let s;t[15]!==a||t[16]!==x||t[17]!==M||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list",method:"deco"}),D(!0)},isCreating:M,align:"end"})]}),t[15]=a,t[16]=x,t[17]=M,t[18]=e,t[19]=s):s=t[19];let p;t[20]!==F||t[21]!==s?(p=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[F,s]}),t[20]=F,t[21]=s,t[22]=p):p=t[22];let g;t[23]!==p||t[24]!==N?(g=o.jsxs("div",{className:"flex flex-col gap-6",children:[N,p]}),t[23]=p,t[24]=N,t[25]=g):g=t[25];const b=h.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(We,{image:o.jsx($e,{size:48,className:"text-muted-foreground"}),title:e(f?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:f?e("routes.agentsList.noAgentsMatchSearch",{search:f}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!f&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),D(!0)},isCreating:M,align:"center",showBetaBadge:!0})]})})}),S=h.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:h.map(L=>o.jsx(yt,{project:L,lastUsedAt:C?.get(L.id)?.last_used_at,onDeleteClick:a?()=>T({id:L.id,title:L.title}):void 0},L.id))})]});let A;t[26]!==g||t[27]!==b||t[28]!==S||t[29]!==z.Body?(A=o.jsxs(z.Body,{children:[g,b,S]}),t[26]=g,t[27]=b,t[28]=S,t[29]=z.Body,t[30]=A):A=t[30];let k;t[31]!==A||t[32]!==E.Content?(k=o.jsx(E.Content,{children:A}),t[31]=A,t[32]=E.Content,t[33]=k):k=t[33];let I;t[34]!==j?(I=o.jsx(Pe,{open:j,onOpenChange:y}),t[34]=j,t[35]=I):I=t[35];let Y;t[36]!==m?(Y=o.jsx(At,{open:m,onOpenChange:D}),t[36]=m,t[37]=Y):Y=t[37];const B=!!d;let U;t[38]===Symbol.for("react.memo_cache_sentinel")?(U=L=>!L&&T(null),t[38]=U):U=t[38];let $;t[39]!==e?($=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=$):$=t[40];let K;t[41]!==$?(K=o.jsx(pt,{children:$}),t[41]=$,t[42]=K):K=t[42];let q;t[43]!==e?(q=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=q):q=t[44];const re=d?.title;let J;t[45]!==re?(J=o.jsx("span",{className:"font-medium text-foreground",children:re}),t[45]=re,t[46]=J):J=t[46];let Q;t[47]!==q||t[48]!==J?(Q=o.jsxs(gt,{children:[q," ",J,"."]}),t[47]=q,t[48]=J,t[49]=Q):Q=t[49];let R;t[50]!==K||t[51]!==Q?(R=o.jsxs(ft,{children:[K,Q]}),t[50]=K,t[51]=Q,t[52]=R):R=t[52];let H;t[53]!==e?(H=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=H):H=t[54];let X;t[55]!==H?(X=o.jsx(ht,{children:H}),t[55]=H,t[56]=X):X=t[56];let Z;t[57]!==e?(Z=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=Z):Z=t[58];let ee;t[59]!==u||t[60]!==Z?(ee=o.jsx(xt,{onClick:u,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Z}),t[59]=u,t[60]=Z,t[61]=ee):ee=t[61];let te;t[62]!==X||t[63]!==ee?(te=o.jsxs(jt,{children:[X,ee]}),t[62]=X,t[63]=ee,t[64]=te):te=t[64];let oe;t[65]!==R||t[66]!==te?(oe=o.jsxs(Ct,{children:[R,te]}),t[65]=R,t[66]=te,t[67]=oe):oe=t[67];let se;t[68]!==B||t[69]!==oe?(se=o.jsx(bt,{open:B,onOpenChange:U,children:oe}),t[68]=B,t[69]=oe,t[70]=se):se=t[70];let ae;return t[71]!==O||t[72]!==k||t[73]!==I||t[74]!==Y||t[75]!==se?(ae=o.jsxs(O,{children:[k,I,Y,se]}),t[71]=O,t[72]=k,t[73]=I,t[74]=Y,t[75]=se,t[76]=ae):ae=t[76],ae}function It(t){return t.id}export{ns as default};
@@ -1 +0,0 @@
1
- import{c as M,j as t,F as de,a as ye,o as me,r as $,a0 as le,b as ee,k as Z,e as ge,t as te,d$ as Ne,K as ne,G as ke,n as ve,m as ae,B as re,x as Ce,y as Re}from"./index-DD19Xgi9.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-OnmvFj6U.js";import{C as Te}from"./collection-search-BBHvvNML.js";import{u as _e}from"./use-debounced-value-i9ZCSUX-.js";import{b as he,u as Ee}from"./use-connection-DEaoKOVa.js";import{W as Ae,u as se,S as pe}from"./use-mcp-client-C6u6uWMn.js";import{a as be}from"./authenticate-and-persist-oauth--qKVSpxv.js";import{b as ue}from"./Settings02-DlOlugQT.js";import{n as ze}from"./LinkExternal01-BSoFyTEM.js";import{T as Le}from"./agent-icon-DtkqR39Z.js";import{u as Ge}from"./use-mcp-tools-BKnN90LQ.js";import{e as Oe}from"./extract-connection-data-DPxnrIHs.js";import{c as Fe}from"./use-navigate-to-agent-CfiKyTiO.js";import{g as Ue,p as fe,f as $e,G as xe}from"./provision-repo-scoped-github-connection-CAXumITS.js";function D(C){const e=M.c(4),{size:s,className:l}=C;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=p):p=e[0];let o;return e[1]!==l||e[2]!==s?(o=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:p}),e[1]=l,e[2]=s,e[3]=o):o=e[3],o}function He(C,e){const s=M.c(12),{org:l}=de();let p;s[0]!==l.id?(p=Ae.REGISTRY(l.id),s[0]=l.id,s[1]=p):p=s[1];const o=p;let a;s[2]!==l.id||s[3]!==l.slug||s[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},s[2]=l.id,s[3]=l.slug,s[4]=o,s[5]=a):a=s[5];const r=se(a);let n;s[6]!==C?(n={name:C},s[6]=C,s[7]=n):n=s[7];const u=e?.enabled??!0;let N;return s[8]!==r||s[9]!==n||s[10]!==u?(N={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:De},s[8]=r,s[9]=n,s[10]=u,s[11]=N):N=s[11],Ge(N)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:s}=ye.useSession(),l=he(),p=me(),[o,a]=$.useState("idle"),[r,n]=$.useState(null),[u,N]=$.useState(null),{data:k,isLoading:w}=He(Me,{enabled:C.enabled}),f=$.useRef(!1);C.enabled&&k&&!w&&!f.current&&s?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!k||!s?.user?.id||!e))try{a("installing"),n(null);const c=Oe(k,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(p,e.id),N(c),a("ready")}catch(c){n(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),n(null),N(null),f.current=!1}return C.enabled&&w&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(C){const e=M.c(27),{open:s,onOpenChange:l,title:p,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,n=ee();let u;e[0]!==r||e[1]!==n||e[2]!==p?(u=p??n(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=n,e[2]=p,e[3]=u):u=e[3];const N=u,[k,w]=$.useState(null);let f;e[4]!==N?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:N})}),e[4]=N,e[5]=f):f=e[5];let d;e[6]!==N||e[7]!==k||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:k?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N})]})}),e[6]=N,e[7]=k,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==s||e[16]!==k||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:m,children:t.jsx(qe,{open:s,onComplete:c,selectedInstallation:k,onSelectInstallation:w,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=s,e[16]=k,e[17]=c,e[18]=b):b=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==b?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==s||e[25]!==g?(j=t.jsx(Ie,{open:s,onOpenChange:l,children:g}),e[23]=l,e[24]=s,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:s,onSelectInstallation:l,onImportComplete:p,mode:o="agent"}){const a=ee(),{org:r}=de(),n=me(),u=Fe(),[N,k]=$.useState(null),w=Ee({slug:"mcp-github"}),f=Ue(w),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:N,c=se({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=se({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,y)=>{try{const P=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:y}});if(P.isError)return null;const S=P.content?.find(T=>T.type==="resource")?.resource?.text;if(!S)return null;try{const T=JSON.parse(S);return typeof T=="string"?T:JSON.stringify(T)}catch{return S}}catch{return null}},j=(i,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([v,P])=>{const R=v??P??null;R&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:R}}}}),le(n,r.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},x=ge({mutationFn:async i=>{if(!m||!s)throw new Error("No GitHub connection or installation");const y=s.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:S=>c.callTool(S),selfCallTool:S=>b.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:v}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let P=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:y,connectionId:v},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:v}]}}}),S=R.structuredContent??R,T=S.item?.id;if(!S.item||!T)throw new Error("Failed to create the imported agent");return P=T,{virtualMcpId:T,repo:i,connectionId:v,item:S.item}}catch(R){throw P&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:P}}).catch(()=>{}),await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:y,connectionId:v,item:P})=>{if(o==="connection"||!i||!P){le(n,r.id),Ne(n,r.id),te.success(a("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(n.setQueryData(ne.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:P}),le(n,r.id),j(i,y),p){p({virtualMcpId:i,repo:y,connectionId:v});return}te.success(a("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,y)=>{console.error("GitHub import failed:",i);const v=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(y.fork&&v.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:y.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:v}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>k(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?s?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:s,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>k(null)}):null}function Qe(C){const e=M.c(124),{connectionId:s,orgId:l,orgSlug:p,onSelect:o,showBackButton:a,onBack:r}=C,n=ee();let u;e[0]!==l||e[1]!==p?(u={connectionId:pe,orgId:l,orgSlug:p},e[0]=l,e[1]=p,e[2]=u):u=e[2];const N=se(u),k=me(),w=he();let f;e[3]!==s||e[4]!==l?(f=ne.githubUserOrgs(l,s),e[3]=s,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==s||e[7]!==N?(d=()=>$e(h=>N.callTool(h),s),e[6]=s,e[7]=N,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==w||e[13]!==s||e[14]!==c||e[15]!==l||e[16]!==p||e[17]!==k?(b=async()=>{const h=await be({connectionId:s,orgId:l,orgSlug:p,persistFallback:E=>w.update.mutateAsync({id:s,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const I=new URL(`/api/${p}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:ne.isMCPAuthenticated(I.href,null)}),await k.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await c.refetch()},e[12]=w,e[13]=s,e[14]=c,e[15]=l,e[16]=p,e[17]=k,e[18]=b):b=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==b||e[22]!==g?(j={mutationFn:b,onError:g},e[21]=b,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(c.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let I;e[27]!==h?(I=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=I):I=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==I?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[I,A,O]}),e[44]=A,e[45]=O,e[46]=I,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let h;e[48]!==r||e[49]!==a||e[50]!==n?(h=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=n,e[51]=h):h=e[51];let I;e[52]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=I):I=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==n?(H=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==n?(V=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==n?(W=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[I,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,X]}),e[95]=X,e[96]=h,e[97]=oe):oe=e[97],oe}let y;e[98]!==r||e[99]!==a||e[100]!==n?(y=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=n,e[101]=y):y=e[101];let v;if(e[102]!==i.installations||e[103]!==o||e[104]!==n){let h;e[106]!==o||e[107]!==n?(h=I=>t.jsxs("button",{type:"button",onClick:()=>o(I),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:I.avatarUrl,alt:I.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:I.login}),I.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},I.installationId),e[106]=o,e[107]=n,e[108]=h):h=e[108],v=i.installations.map(h),e[102]=i.installations,e[103]=o,e[104]=n,e[105]=v}else v=e[105];let P;e[109]!==v?(P=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:v}),e[109]=v,e[110]=P):P=e[110];let R;e[111]!==n?(R=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=R):R=e[112];let S;e[113]!==n?(S=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=S):S=e[114];let T;e[115]!==S?(T=t.jsx("span",{className:"underline underline-offset-2",children:S}),e[115]=S,e[116]=T):T=e[116];let _;e[117]!==R||e[118]!==T?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[R," ",T]})}),e[117]=R,e[118]=T,e[119]=_):_=e[119];let F;return e[120]!==P||e[121]!==_||e[122]!==y?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,P,_]}),e[120]=P,e[121]=_,e[122]=y,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:s,orgId:l,orgSlug:p,installation:o,onSelectRepo:a,isSaving:r}=C,n=ee(),[u,N]=$.useState(""),k=_e(u,300),w=$.useDeferredValue(k),f=u!==w;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:N,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==s||e[10]!==w||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==p?(j=t.jsx($.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:s,orgId:l,orgSlug:p,installation:o,query:w,onSelectRepo:a,isSaving:r})}),e[9]=s,e[10]=w,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=p,e[16]=j):j=e[16];let x;e[17]!==b||e[18]!==j?(x=t.jsx("div",{className:b,children:j}),e[17]=b,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:s,orgId:l,orgSlug:p,installation:o,query:a,onSelectRepo:r,isSaving:n}=C,u=ee();let N;e[0]!==s||e[1]!==l||e[2]!==p?(N={connectionId:s,orgId:l,orgSlug:p},e[0]=s,e[1]=l,e[2]=p,e[3]=N):N=e[3];const k=se(N),w=o.type==="User"?"user":"org",f=a?`${w}:${o.login} ${a} in:name fork:true`:`${w}:${o.login} fork:true`;let d;e[4]!==s||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=ne.githubOrgRepos(l,s,o.login,a),e[4]=s,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==k||e[10]!==f?(m=async x=>{const{signal:i}=x,v=(await k.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(We)},e[9]=k,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let y;e[19]!==a||e[20]!==u?(y=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=y):y=e[21];let v;return e[22]!==i||e[23]!==y?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,y]}),e[22]=i,e[23]=y,e[24]=v):v=e[24],v}let g;if(e[25]!==n||e[26]!==r||e[27]!==b||e[28]!==u){let x;e[30]!==n||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=n,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=b.map(x),e[25]=n,e[26]=r,e[27]=b,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:s,error:l,retry:p}=C,o=ee();if(s==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let P;e[1]!==o?(P=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=P):P=e[2];let R;e[3]!==P?(R=t.jsx("p",{className:"text-sm font-medium",children:P}),e[3]=P,e[4]=R):R=e[4];let S;e[5]!==l||e[6]!==o?(S=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=S):S=e[7];let T;e[8]!==S?(T=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=T):T=e[9];let _;e[10]!==R||e[11]!==T?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,T]}),e[10]=R,e[11]=T,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let h;e[15]!==p||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:p,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=p,e[16]=F,e[17]=h):h=e[17];let I;return e[18]!==_||e[19]!==h?(I=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,_,h]}),e[18]=_,e[19]=h,e[20]=I):I=e[20],I}const a=s==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let N;e[26]!==u?(N=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=N):N=e[27];let k;e[28]!==a||e[29]!==o?(k=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=k):k=e[30];let w;e[31]!==k?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=w):w=e[32];let f;e[33]!==N||e[34]!==w?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[N,w]}),e[33]=N,e[34]=w,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==b?(g=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let y;return e[48]!==i||e[49]!==f?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,i]}),e[48]=i,e[49]=f,e[50]=y):y=e[50],y}export{D as G,dt as a,Be as b,He as u};