decocms 3.28.1 → 3.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/client/assets/{AlertCircle-De-QnqNt.js → AlertCircle-B6c8Mzjf.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-B0GfNpsw.js → ArrowUpRight-Be3IVNc7.js} +1 -1
  3. package/dist/client/assets/{Check-DHmAQH53.js → Check-DEXo-WUm.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-DKSRB9Xd.js → CheckCircle-yjUP9-a4.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CN6qoGcG.js → ChevronDown-DgK4vNiI.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-HFx1Uufy.js → ChevronLeft-CgTd6CqD.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-BJSYQUmF.js → ChevronRight-BEkEaTTX.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-CTGwFzLw.js → ChevronUp-DhNf5w7O.js} +1 -1
  9. package/dist/client/assets/{Container-DZBZNA8Y.js → Container-BzJpoAXT.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-jUGLCiy5.js → DotsVertical-BN7_sSEx.js} +1 -1
  11. package/dist/client/assets/{Eye-CGoLCmzu.js → Eye-DM_PzU0M.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DYSfUppO.js → FilterLines-1aeFf44G.js} +1 -1
  13. package/dist/client/assets/{Globe01--hrfRyvA.js → Globe01-B4QIOBGm.js} +1 -1
  14. package/dist/client/assets/{HardDrive-yKlUP3QG.js → HardDrive-B2vsnJ8B.js} +1 -1
  15. package/dist/client/assets/{Key01-DqH2W8Qa.js → Key01-fLbeh11d.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-CLZVvVLM.js → LayoutLeft-ZzAJDsr6.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-CaYoYL1Y.js → LinkExternal01-CPGJkHHm.js} +1 -1
  18. package/dist/client/assets/{Monitor01-BRL4_dKI.js → Monitor01-B3onVx2m.js} +1 -1
  19. package/dist/client/assets/{Palette-B9PbEO6t.js → Palette-C2hbhyQk.js} +1 -1
  20. package/dist/client/assets/{Play-Btpg8EpH.js → Play-CwQc-EwD.js} +1 -1
  21. package/dist/client/assets/{Plus-Cv0T2Pov.js → Plus-De-E-6wD.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-CcpA4rje.js → RefreshCcw01-DA9Xrix-.js} +1 -1
  23. package/dist/client/assets/{SearchMd-BP9M1g2N.js → SearchMd-DY7m-PLn.js} +1 -1
  24. package/dist/client/assets/{Settings02-BMRrFVdB.js → Settings02-DkTBIaKB.js} +1 -1
  25. package/dist/client/assets/{Shield01-rOhEAWZ1.js → Shield01-TzaLPX1T.js} +1 -1
  26. package/dist/client/assets/{Star01-BjpgI7im.js → Star01-CBGrpf0P.js} +1 -1
  27. package/dist/client/assets/{Stars01-yuWjNyMF.js → Stars01-BEQtiGHr.js} +1 -1
  28. package/dist/client/assets/{Stars02-Cv3Kyp_N.js → Stars02-RdMaq57_.js} +1 -1
  29. package/dist/client/assets/{Sun-C0I4hv8e.js → Sun-TUQeTj5x.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-CLZ8VEjC.js → SwitchHorizontal01-WnVHCaWd.js} +1 -1
  31. package/dist/client/assets/{Tool01-DPPRaW86.js → Tool01-B-ijPyq1.js} +1 -1
  32. package/dist/client/assets/{Trash01-s7FZsfBC.js → Trash01-N2sNvlm0.js} +1 -1
  33. package/dist/client/assets/{Upload01-xUCMslnL.js → Upload01-qnabD6hi.js} +1 -1
  34. package/dist/client/assets/{User01-BsF0RS3z.js → User01-Ca-HpbAW.js} +1 -1
  35. package/dist/client/assets/{Users01-D-iBSVXa.js → Users01-Dg21emev.js} +1 -1
  36. package/dist/client/assets/{Users03-CKUicuTa.js → Users03-D5HhQ8-f.js} +1 -1
  37. package/dist/client/assets/{X-CMYaHMo4.js → X-Bm7MIJC_.js} +1 -1
  38. package/dist/client/assets/{XCircle-BdbzgmP6.js → XCircle-DyhEmEPQ.js} +1 -1
  39. package/dist/client/assets/{XClose-N2P2hiYb.js → XClose-C7dvFGMb.js} +1 -1
  40. package/dist/client/assets/{Zap-gqEvk94k.js → Zap-CiEBAZr5.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-AN7R7mTa.js → ZapSquare-Ci4u2Dbd.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-Xe1itnU7.js → ZoomOut-B_V9tlGR.js} +1 -1
  43. package/dist/client/assets/{access-gate-Dx320Euv.js → access-gate-AFUxhae7.js} +1 -1
  44. package/dist/client/assets/{accordion-BIWbMpHu.js → accordion-Da3zFuxg.js} +1 -1
  45. package/dist/client/assets/{add-section-modal-e667gRvo.js → add-section-modal-CEIE0uWq.js} +1 -1
  46. package/dist/client/assets/{agent-capabilities-Deuuzqbm.js → agent-capabilities-CSc3kMFs.js} +1 -1
  47. package/dist/client/assets/{agent-icon-D1ySfhKA.js → agent-icon-DYE5DbAQ.js} +1 -1
  48. package/dist/client/assets/{agent-icons-DpDt_xvu.js → agent-icons-MhoNvYvr.js} +1 -1
  49. package/dist/client/assets/{agents-list-DXTuElJ5.js → agents-list-eboFrdNp.js} +1 -1
  50. package/dist/client/assets/{ai-providers-CHLGgXkW.js → ai-providers-Hd6N5Dg7.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-CBzhgusU.js → alert-dialog-C9cdjnL0.js} +1 -1
  52. package/dist/client/assets/{alert-zJcnZqHG.js → alert-uqHdn9i8.js} +1 -1
  53. package/dist/client/assets/app-editor-DsnQiQ_A.js +1 -0
  54. package/dist/client/assets/{auth-catchall-GeRmeWq3.js → auth-catchall-OmbGtgeI.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-B_vpA1VO.js → auth-split-layout-Bpfi3pdc.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-7qb4yrwv.js → automation-list-row-CSwJoL82.js} +1 -1
  57. package/dist/client/assets/{automation-runs-BcknuTTv.js → automation-runs-CGUqiG0Y.js} +1 -1
  58. package/dist/client/assets/{automations-K7jo5bzv.js → automations-DCOSUtQK.js} +1 -1
  59. package/dist/client/assets/{avatar-AI83PqVE.js → avatar-BpsMlRfh.js} +1 -1
  60. package/dist/client/assets/{badge-CikIA9ZK.js → badge-CQSCbvCa.js} +1 -1
  61. package/dist/client/assets/{brand-context-BwVwErVn.js → brand-context-B5YGrmN9.js} +1 -1
  62. package/dist/client/assets/{buckets-DUsKq9i-.js → buckets-DzXTUBob.js} +1 -1
  63. package/dist/client/assets/{calendar-DZmZKFmb.js → calendar-C1JN4fZ4.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-Db8x02Oo.js → capability-load-error-Qrxb3fC3.js} +1 -1
  65. package/dist/client/assets/{card-DmbfBYZU.js → card-COSTikSG.js} +1 -1
  66. package/dist/client/assets/{chat-context-BOn4WPpq.js → chat-context-BscCS8g4.js} +1 -1
  67. package/dist/client/assets/{checkbox-Cwl_z5GL.js → checkbox-CoBSTPCe.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success--vqcpMzi.js → cli-auth-success-vIf0zYeU.js} +1 -1
  69. package/dist/client/assets/{collection-detail-BnmgQ1CE.js → collection-detail-DODGgTuG.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-0uuG9Zva.js → collection-display-button-BdCE4pbC.js} +1 -1
  71. package/dist/client/assets/{collection-search-B-CX-Cb7.js → collection-search-D_do7MXe.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-DI5q4GEY.js → collection-table-wrapper-B7P7HtOs.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CdfD34L4.js → collection-tabs-D63EAfII.js} +1 -1
  74. package/dist/client/assets/{collections-CXYJ8MVZ.js → collections-ChXxHzy2.js} +1 -1
  75. package/dist/client/assets/{command-BHuAtd3n.js → command-DqsdlU-_.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-DRFjva34.js → connect-desktop-dialog-DD4FC2LO.js} +1 -1
  77. package/dist/client/assets/{connection-card-DEvkcpmQ.js → connection-card-FeZLlrxk.js} +1 -1
  78. package/dist/client/assets/{connection-detail-CWd-Y8iP.js → connection-detail-DCn8042t.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-BxYEqmM8.js → connection-form-helpers-DCKn60Ne.js} +1 -1
  80. package/dist/client/assets/{connections-BtPFfd05.js → connections-o-0jNCSa.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-Bj1W2y0B.js → decopilot-sse-pool-CuFOPenZ.js} +1 -1
  82. package/dist/client/assets/{dialog-IkiImd7I.js → dialog-Djt1LVnY.js} +1 -1
  83. package/dist/client/assets/{domain-settings-B-px7BiX.js → domain-settings-C4eGu4uE.js} +1 -1
  84. package/dist/client/assets/{drawer-DO_U_Bhd.js → drawer-BXoh2EmM.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-C-Cxaez8.js → dropdown-menu-DXIoF-ie.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-DHOlocDg.js → dynamic-plugin-layout-D9cjPPaH.js} +1 -1
  87. package/dist/client/assets/{empty-state-CzxH8T9l.js → empty-state-BzLetnGS.js} +1 -1
  88. package/dist/client/assets/{empty-state-o52Hq4fy.js → empty-state-KuzDCMb7.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-Uz57CpVC.js → extract-connection-data-D69tCcU1.js} +1 -1
  90. package/dist/client/assets/{features-DfTRf5eR.js → features-Cb4qaYzX.js} +1 -1
  91. package/dist/client/assets/{file-explorer-Wed6GBRH.js → file-explorer-BN4rVlQG.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-BYSeb5A3.js → file-type-icon-ChKGrOZW.js} +1 -1
  93. package/dist/client/assets/{files-PguEGaiI.js → files-6rw8QzWq.js} +1 -1
  94. package/dist/client/assets/{form-ChQh_wIn.js → form-ysJDiLJp.js} +1 -1
  95. package/dist/client/assets/{general-BoF0bKER.js → general-Dv9vAPXk.js} +1 -1
  96. package/dist/client/assets/{generate-id-BrtbvnKY.js → generate-id-_ulkjF89.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-13FobS0K.js → github-repo-picker-l9ETUtxe.js} +1 -1
  98. package/dist/client/assets/{header-tab-button-Qu1eh6fb.js → header-tab-button-D8qoVrcx.js} +1 -1
  99. package/dist/client/assets/{hover-card-5iaAH0_M.js → hover-card-DfE_o4wO.js} +1 -1
  100. package/dist/client/assets/{image-field-C3Pv1Di2.js → image-field-Degasm7F.js} +1 -1
  101. package/dist/client/assets/{index-NNvehl9i.js → index-B8Bi8NJZ.js} +1 -1
  102. package/dist/client/assets/{index-CwnBaaeQ.js → index-BHcS935F.js} +4 -4
  103. package/dist/client/assets/{index-YyegPZ6_.js → index-BztnWKji.js} +1 -1
  104. package/dist/client/assets/{index-DFp-rnQf.js → index-C4IhCWyO.js} +1 -1
  105. package/dist/client/assets/{index-D0sk3sYa.js → index-C9SESVla.js} +1 -1
  106. package/dist/client/assets/{index-CwSpOXRj.js → index-CUxRowbV.js} +1 -1
  107. package/dist/client/assets/{index-Kzj6xvOo.js → index-CcqodNxi.js} +1 -1
  108. package/dist/client/assets/{index-CweEMiqH.js → index-CqAKxsqM.js} +1 -1
  109. package/dist/client/assets/{index-BxgO4x6f.js → index-D01UVldp.js} +1 -1
  110. package/dist/client/assets/{index-Ctxajzpe.js → index-DJYPL6kR.js} +1 -1
  111. package/dist/client/assets/{index-Dlc4tDxO.js → index-DZVqlilk.js} +3 -3
  112. package/dist/client/assets/{index-CbGPcWEH.js → index-DcfA7ZVf.js} +1 -1
  113. package/dist/client/assets/{index-C5R8l9NR.js → index-Dhq_DEcM.js} +1 -1
  114. package/dist/client/assets/{index-Dcfw-W2O.js → index-DmTxFLmc.js} +1 -1
  115. package/dist/client/assets/{index-BxF-LrkW.js → index-RgNRvF6I.js} +1 -1
  116. package/dist/client/assets/{index-redirect-BRsZDGI9.js → index-redirect-HsspJKwZ.js} +1 -1
  117. package/dist/client/assets/{infiniteQueryObserver-D4Z6Hq7s.js → infiniteQueryObserver-BXUJR-m_.js} +1 -1
  118. package/dist/client/assets/{input-CDaarCl_.js → input-DBD7EP80.js} +1 -1
  119. package/dist/client/assets/{integration-icon-DylMdkB7.js → integration-icon-DtSS6HBc.js} +1 -1
  120. package/dist/client/assets/{label-CmtFIrH6.js → label-lUAV486p.js} +1 -1
  121. package/dist/client/assets/{layout-Czl8yfyb.js → layout-DPGG4lFH.js} +1 -1
  122. package/dist/client/assets/{login-CZ304Hwe.js → login-CJbg6F72.js} +1 -1
  123. package/dist/client/assets/{members-DldCeEf4.js → members-BFaRysnE.js} +1 -1
  124. package/dist/client/assets/{monaco-editor--8410HRL.js → monaco-editor-Df-1kT53.js} +1 -1
  125. package/dist/client/assets/{monitoring-stats-row-p2QkpslG.js → monitoring-stats-row-Cke4-C4Q.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-BjKMJUNm.js → oauth-callback-CWaYzShH.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-ai-provider--EBMOSLZ.js → oauth-callback-ai-provider-CVU_6XoI.js} +1 -1
  128. package/dist/client/assets/{onboarding-Dujhc2aN.js → onboarding-DtcBh6IN.js} +1 -1
  129. package/dist/client/assets/{org-install-BRL26TWn.js → org-install-B8vx3o6J.js} +1 -1
  130. package/dist/client/assets/{org-layout-7aQLDDnY.js → org-layout-DFjbzZe-.js} +1 -1
  131. package/dist/client/assets/{org-plugin-layout-Ch8ukpQt.js → org-plugin-layout-ujVugVBv.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-Cz5Nib_0.js → page-seo-form-C39mph4U.js} +1 -1
  133. package/dist/client/assets/page-seo-sheet-uq6K114l.js +1 -0
  134. package/dist/client/assets/{pair-BfYvjacw.js → pair-kflzrV9V.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-Bafs814S.js → plugin-empty-state-BMQMfb3Z.js} +1 -1
  136. package/dist/client/assets/{plugin-header-CzH_o1AA.js → plugin-header-BqYNlEDz.js} +1 -1
  137. package/dist/client/assets/{plugin-layout-BrlPuAvi.js → plugin-layout-ZbYmXJ__.js} +1 -1
  138. package/dist/client/assets/{popover-DaxAVDXR.js → popover-Bd6Xh0lT.js} +1 -1
  139. package/dist/client/assets/{post-editor-DZv3v9vs.js → post-editor-CHXAXevV.js} +1 -1
  140. package/dist/client/assets/{primitives-C2FB52ts.js → primitives-BuDZr_Qi.js} +1 -1
  141. package/dist/client/assets/{profile-Ch1PMZ--.js → profile-DtWRKs0n.js} +1 -1
  142. package/dist/client/assets/project-app-view-cN6-gSdM.js +1 -0
  143. package/dist/client/assets/record-editor-B5Wiwh_y.js +1 -0
  144. package/dist/client/assets/registry-CR-2JPTt.js +2 -0
  145. package/dist/client/assets/{registry-layout-D5296RDd.js → registry-layout-CSR5UI7D.js} +1 -1
  146. package/dist/client/assets/{require-capability-D8n6HrEr.js → require-capability-B3QssSGk.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-q1UX5iFV.js → required-auth-layout-B2L6564M.js} +1 -1
  148. package/dist/client/assets/{reset-password-BUp5wXvt.js → reset-password-DEiTip2p.js} +1 -1
  149. package/dist/client/assets/{resizable-B_wg5OKG.js → resizable-C-INMWq5.js} +1 -1
  150. package/dist/client/assets/{roles-CFjXltMh.js → roles-DpyZ2WwE.js} +1 -1
  151. package/dist/client/assets/save-referenced-block-BVBEwHPT.js +1 -0
  152. package/dist/client/assets/{save-status-CJhEsrLH.js → save-status-BVd_ZeVF.js} +1 -1
  153. package/dist/client/assets/{schema-form-D_d0W0_5.js → schema-form-Cax0S_eT.js} +1 -1
  154. package/dist/client/assets/{scroll-area-CifcP4Wg.js → scroll-area-DOzWTBh7.js} +1 -1
  155. package/dist/client/assets/{search-input-eml2HEUh.js → search-input-Crg-aeBG.js} +1 -1
  156. package/dist/client/assets/{secrets-DnWBimzu.js → secrets-uFh6R-ci.js} +1 -1
  157. package/dist/client/assets/{sections-editor-GEeJkb9Q.js → sections-editor-UFBEsvbR.js} +1 -1
  158. package/dist/client/assets/{select-Dz7DPkoH.js → select-C_Mscmor.js} +1 -1
  159. package/dist/client/assets/{select-model-B6KC9bZ9.js → select-model-DE0CMGaf.js} +1 -1
  160. package/dist/client/assets/{seo-editor-yjW-SMAL.js → seo-editor-BwGR-eTN.js} +1 -1
  161. package/dist/client/assets/{settings-layout-Cvw0dTbU.js → settings-layout-DthSzMuE.js} +1 -1
  162. package/dist/client/assets/{settings-section-BkfPlxIX.js → settings-section-ebZtWbZG.js} +1 -1
  163. package/dist/client/assets/{sheet-C2OErkZR.js → sheet-CsGV1Xbn.js} +1 -1
  164. package/dist/client/assets/{shell-controls-CgyBrm6l.js → shell-controls-C0KG-cpK.js} +1 -1
  165. package/dist/client/assets/{shell-layout-D-4Zna-j.js → shell-layout-BVLB8W09.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-D7iIgnMy.js → shell-route-loading-5hUNb_fO.js} +1 -1
  167. package/dist/client/assets/{sidebar-BT1O99E-.js → sidebar-HV--ufCF.js} +1 -1
  168. package/dist/client/assets/{skeleton-bErIIEAe.js → skeleton-DpKw4LgQ.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-D_73qywG.js → sortable.esm-5Nlwg3lH.js} +1 -1
  170. package/dist/client/assets/{spinner-DUmur8qx.js → spinner-DO0j02hL.js} +1 -1
  171. package/dist/client/assets/{sso-jmWB0IlU.js → sso-Bv5wunQY.js} +1 -1
  172. package/dist/client/assets/{store-CPLW6WOq.js → store-ChRTg37n.js} +1 -1
  173. package/dist/client/assets/store-registry-V6sbFCwB.js +2 -0
  174. package/dist/client/assets/{studio-tools-B-zlmqyw.js → studio-tools-CDcv-T4t.js} +1 -1
  175. package/dist/client/assets/{switch-CRVfQAZr.js → switch-Bp9oqtUU.js} +1 -1
  176. package/dist/client/assets/{tab-id-By_JW--7.js → tab-id-DyuDI05_.js} +1 -1
  177. package/dist/client/assets/{table-70fRVfwQ.js → table-DKw0lSKO.js} +1 -1
  178. package/dist/client/assets/{tabs-_yym-ubf.js → tabs-CFrGCHeV.js} +1 -1
  179. package/dist/client/assets/{task-status-B3M1uY2i.js → task-status-t9G7Wzk6.js} +1 -1
  180. package/dist/client/assets/{textarea-BhyLj2Dp.js → textarea-AwJH2K49.js} +1 -1
  181. package/dist/client/assets/{toggle-group-BYYoZiYB.js → toggle-group-B04XV8AA.js} +1 -1
  182. package/dist/client/assets/{toolbar-BQgYgute.js → toolbar-Cdyl5x0h.js} +1 -1
  183. package/dist/client/assets/{tools-list-Bib10JJv.js → tools-list-De_R_ovM.js} +1 -1
  184. package/dist/client/assets/{tooltip-D0rD3x8T.js → tooltip-o8huGjQ9.js} +1 -1
  185. package/dist/client/assets/{types-Bt2jh4HB.js → types-BCqGwsfz.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-BL6EQsm8.js → use-ai-providers-BmLD_kea.js} +1 -1
  187. package/dist/client/assets/{use-automations-jCgcI_Hn.js → use-automations-gsGrmr6p.js} +1 -1
  188. package/dist/client/assets/{use-capability-DqPX2R7m.js → use-capability-BOerylhE.js} +1 -1
  189. package/dist/client/assets/{use-collections-CH3Uvmj5.js → use-collections-DAjOo5ZC.js} +1 -1
  190. package/dist/client/assets/{use-connection-BGpjiuJJ.js → use-connection-CJMDVK6k.js} +1 -1
  191. package/dist/client/assets/{use-copy-DHiMTnai.js → use-copy-CtSTNwqj.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-8G8o89BT.js → use-create-virtual-mcp-B8GHWYat.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-BnF-F24h.js → use-debounced-autosave-Cwedmf4F.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-DSxSiAyt.js → use-delete-connection-6GOeNbO9.js} +1 -1
  195. package/dist/client/assets/{use-file-configs-CDby3RwC.js → use-file-configs-C-GZ1zYT.js} +1 -1
  196. package/dist/client/assets/{use-infinite-scroll-BlDyJWAa.js → use-infinite-scroll-BPlykMTx.js} +1 -1
  197. package/dist/client/assets/{use-list-state-nfg3Cb56.js → use-list-state-C8tIIEc4.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-BoOtVD9g.js → use-mcp-client-DjPdtjSs.js} +1 -1
  199. package/dist/client/assets/{use-mcp-prompts-CYbN8Yyl.js → use-mcp-prompts-DM6AjLx2.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-DlzThqmJ.js → use-mcp-tools-9PGjSkaC.js} +1 -1
  201. package/dist/client/assets/{use-members-BLEStPtC.js → use-members-CIIGwcs8.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-_X_kAEcz.js → use-navigate-to-agent-BbWgCfUr.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-ziK5gAU8.js → use-org-auth-client-BMuOsWDB.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-BCRYycoj.js → use-org-sso-Bl3aNvhm.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-zr9qa8BU.js → use-organization-roles-C2RYGhuk.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-BQtNgLEs.js → use-organization-settings-Cyri9Ne9.js} +1 -1
  207. package/dist/client/assets/{use-registry-connections-CPtcwe6P.js → use-registry-connections-CzgZApvz.js} +1 -1
  208. package/dist/client/assets/{use-secrets-wimlaYjN.js → use-secrets-BAsLQ9g5.js} +1 -1
  209. package/dist/client/assets/{use-status-sounds-CZU7jLXq.js → use-status-sounds-C7w_UeRC.js} +1 -1
  210. package/dist/client/assets/{use-view-mode-BJ_FnvkJ.js → use-view-mode-inE-bb4X.js} +1 -1
  211. package/dist/client/assets/{use-virtual-mcp-_FyR-EfH.js → use-virtual-mcp-BCFYBYWC.js} +1 -1
  212. package/dist/client/assets/useInfiniteQuery-B4_CPL_3.js +1 -0
  213. package/dist/client/assets/{useRouterState-CfhsEB7J.js → useRouterState-CisnF5dB.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-D9iKUrNx.js +1 -0
  215. package/dist/client/assets/{user-CXZKnlfK.js → user-BTbaSGqz.js} +1 -1
  216. package/dist/client/assets/{view-mode-toggle-BO9qiFWG.js → view-mode-toggle-BdWmb5J5.js} +1 -1
  217. package/dist/client/assets/{workflow-CA6KPd9J.js → workflow-Bsf3r4QI.js} +1 -1
  218. package/dist/client/assets/workflow-detail-B0lUdclZ.js +1 -0
  219. package/dist/client/index.html +1 -1
  220. package/dist/server/cli.js +5 -5
  221. package/dist/server/server.js +4 -4
  222. package/package.json +1 -1
  223. package/dist/client/assets/app-editor-DqV_IRWA.js +0 -1
  224. package/dist/client/assets/page-seo-sheet-CcoAXMMc.js +0 -1
  225. package/dist/client/assets/project-app-view-CNkoTSGZ.js +0 -1
  226. package/dist/client/assets/record-editor-B2xsglRQ.js +0 -1
  227. package/dist/client/assets/registry-BD5AwdfO.js +0 -2
  228. package/dist/client/assets/save-referenced-block-C-C4ro26.js +0 -1
  229. package/dist/client/assets/store-registry-BUknjkUH.js +0 -2
  230. package/dist/client/assets/useInfiniteQuery-Dzg2BCY9.js +0 -1
  231. package/dist/client/assets/useSuspenseInfiniteQuery-D3ys-EbO.js +0 -1
  232. package/dist/client/assets/workflow-detail-DzevlE_t.js +0 -1
@@ -1 +1 @@
1
- import{e as n,q as r,K as c,s as y,G as d,a as S}from"./index-Dlc4tDxO.js";import{u as l}from"./studio-tools-B-zlmqyw.js";function C(){const e=n.c(7),{org:o}=r(),u=l();let i;e[0]!==o.id?(i=c.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:a}=y(s);return a.secrets}function p(){const e=n.c(8),{org:o}=r(),u=l(),i=d();let t;e[0]!==u?(t=async f=>await u.call("SECRET_CREATE",{...f}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:c.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=a):a=e[7],S(a)}export{p as a,C as u};
1
+ import{e as n,q as r,K as c,s as y,G as d,a as S}from"./index-DZVqlilk.js";import{u as l}from"./studio-tools-CDcv-T4t.js";function C(){const e=n.c(7),{org:o}=r(),u=l();let i;e[0]!==o.id?(i=c.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:a}=y(s);return a.secrets}function p(){const e=n.c(8),{org:o}=r(),u=l(),i=d();let t;e[0]!==u?(t=async f=>await u.call("SECRET_CREATE",{...f}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:c.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=a):a=e[7],S(a)}export{p as a,C as u};
@@ -1 +1 @@
1
- import{r as o,e as m,a0 as h}from"./index-Dlc4tDxO.js";import{p as R,q as I}from"./question-004-sINsf4GQ.js";import{d as y,D as S}from"./decopilot-sse-pool-Bj1W2y0B.js";const b=()=>0;function D(s){const{orgSlug:e,taskId:r,enabled:t=!0,onStep:n,onFinish:u,onTaskStatus:f}=s,l=o.useRef({taskId:r,onStep:n,onFinish:u,onTaskStatus:f});l.current={taskId:r,onStep:n,onFinish:u,onTaskStatus:f};const i=o.useRef(null),p=o.useRef(t),d=o.useRef(e);(!i.current||p.current!==t||d.current!==e)&&(p.current=t,d.current=e,i.current=E=>{if(!t||!e)return()=>{};const k=T=>{let a;try{a=JSON.parse(T.data)}catch{return}const c=l.current;if(!(c.taskId&&a.subject!==c.taskId)){switch(a.type){case S.STEP:c.onStep?.(a);break;case S.FINISH:c.onFinish?.(a);break;case S.THREAD_STATUS:c.onTaskStatus?.(a);break}E()}};return y.subscribe(e,k)}),o.useSyncExternalStore(i.current,b,b)}const O=new Set(["completed","failed","requires_action"]);function U(s){const e=m.c(5),[r]=h();let t;e[0]!==r?(t=u=>{r.enableSounds&&O.has(u.data.status)&&R(I.dataUri).catch(_)},e[0]=r,e[1]=t):t=e[1];let n;e[2]!==s||e[3]!==t?(n={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=n):n=e[4],D(n)}function _(s){console.warn("[status-sounds] playback failed:",s)}export{U as u};
1
+ import{r as o,e as m,a0 as h}from"./index-DZVqlilk.js";import{p as R,q as I}from"./question-004-sINsf4GQ.js";import{d as y,D as S}from"./decopilot-sse-pool-CuFOPenZ.js";const b=()=>0;function D(s){const{orgSlug:e,taskId:r,enabled:t=!0,onStep:n,onFinish:u,onTaskStatus:f}=s,l=o.useRef({taskId:r,onStep:n,onFinish:u,onTaskStatus:f});l.current={taskId:r,onStep:n,onFinish:u,onTaskStatus:f};const i=o.useRef(null),p=o.useRef(t),d=o.useRef(e);(!i.current||p.current!==t||d.current!==e)&&(p.current=t,d.current=e,i.current=E=>{if(!t||!e)return()=>{};const k=T=>{let a;try{a=JSON.parse(T.data)}catch{return}const c=l.current;if(!(c.taskId&&a.subject!==c.taskId)){switch(a.type){case S.STEP:c.onStep?.(a);break;case S.FINISH:c.onFinish?.(a);break;case S.THREAD_STATUS:c.onTaskStatus?.(a);break}E()}};return y.subscribe(e,k)}),o.useSyncExternalStore(i.current,b,b)}const O=new Set(["completed","failed","requires_action"]);function U(s){const e=m.c(5),[r]=h();let t;e[0]!==r?(t=u=>{r.enableSounds&&O.has(u.data.status)&&R(I.dataUri).catch(_)},e[0]=r,e[1]=t):t=e[1];let n;e[2]!==s||e[3]!==t?(n={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=n):n=e[4],D(n)}function _(s){console.warn("[status-sounds] playback failed:",s)}export{U as u};
@@ -1 +1 @@
1
- import{e as p,r as f}from"./index-Dlc4tDxO.js";import{u as w}from"./tooltip-D0rD3x8T.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
1
+ import{e as p,r as f}from"./index-DZVqlilk.js";import{u as w}from"./tooltip-o8huGjQ9.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
@@ -1 +1 @@
1
- import{e as a,q as d,aO as p,n as P}from"./index-Dlc4tDxO.js";import{b as L,a as V,u as _,c as A}from"./use-collections-CH3Uvmj5.js";import{a as g,u as I}from"./use-mcp-client-BoOtVD9g.js";function v(s){const t=a.c(5);let e;t[0]!==s?(e=s===void 0?{}:s,t[0]=s,t[1]=e):e=t[1];const n=e,{org:i}=d();let o;t[2]!==i.id||t[3]!==i.slug?(o={connectionId:g,orgId:i.id,orgSlug:i.slug},t[2]=i.id,t[3]=i.slug,t[4]=o):o=t[4];const l=I(o);return L(i.id,"VIRTUAL_MCP",l,n)}function R(s,t,e){return A(s,"VIRTUAL_MCP",t??void 0,e)}function b(s){const t=a.c(3),{org:e}=d();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const i=I(n);return _(e.id,"VIRTUAL_MCP",s??void 0,i)}function E(s){const t=a.c(15),{org:e}=d();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const i=I(n);let o,l,c;t[3]!==s||t[4]!==e.id?(o=[...s].sort(),c=P,l=p.virtualMcpLastUsed(e.id,o),t[3]=s,t[4]=e.id,t[5]=o,t[6]=l,t[7]=c):(o=t[5],l=t[6],c=t[7]);const C=o.length>0;let u;t[8]!==i||t[9]!==o?(u=async()=>{const M=(await i.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:o}})).structuredContent??{items:[]},f=new Map;for(const m of M.items)f.set(m.id,m);return f},t[8]=i,t[9]=o,t[10]=u):u=t[10];let r;return t[11]!==l||t[12]!==C||t[13]!==u?(r={queryKey:l,enabled:C,staleTime:3e4,queryFn:u},t[11]=l,t[12]=C,t[13]=u,t[14]=r):r=t[14],c(r)}function $(){const s=a.c(3),{org:t}=d();let e;s[0]!==t.id||s[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},s[0]=t.id,s[1]=t.slug,s[2]=e):e=s[2];const n=I(e);return V(t.id,"VIRTUAL_MCP",n)}export{v as a,$ as b,E as c,b as u,R as v};
1
+ import{e as a,q as d,aO as p,n as P}from"./index-DZVqlilk.js";import{b as L,a as V,u as _,c as A}from"./use-collections-DAjOo5ZC.js";import{a as g,u as I}from"./use-mcp-client-DjPdtjSs.js";function v(s){const t=a.c(5);let e;t[0]!==s?(e=s===void 0?{}:s,t[0]=s,t[1]=e):e=t[1];const n=e,{org:i}=d();let o;t[2]!==i.id||t[3]!==i.slug?(o={connectionId:g,orgId:i.id,orgSlug:i.slug},t[2]=i.id,t[3]=i.slug,t[4]=o):o=t[4];const l=I(o);return L(i.id,"VIRTUAL_MCP",l,n)}function R(s,t,e){return A(s,"VIRTUAL_MCP",t??void 0,e)}function b(s){const t=a.c(3),{org:e}=d();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const i=I(n);return _(e.id,"VIRTUAL_MCP",s??void 0,i)}function E(s){const t=a.c(15),{org:e}=d();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const i=I(n);let o,l,c;t[3]!==s||t[4]!==e.id?(o=[...s].sort(),c=P,l=p.virtualMcpLastUsed(e.id,o),t[3]=s,t[4]=e.id,t[5]=o,t[6]=l,t[7]=c):(o=t[5],l=t[6],c=t[7]);const C=o.length>0;let u;t[8]!==i||t[9]!==o?(u=async()=>{const M=(await i.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:o}})).structuredContent??{items:[]},f=new Map;for(const m of M.items)f.set(m.id,m);return f},t[8]=i,t[9]=o,t[10]=u):u=t[10];let r;return t[11]!==l||t[12]!==C||t[13]!==u?(r={queryKey:l,enabled:C,staleTime:3e4,queryFn:u},t[11]=l,t[12]=C,t[13]=u,t[14]=r):r=t[14],c(r)}function $(){const s=a.c(3),{org:t}=d();let e;s[0]!==t.id||s[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},s[0]=t.id,s[1]=t.slug,s[2]=e):e=s[2];const n=I(e);return V(t.id,"VIRTUAL_MCP",n)}export{v as a,$ as b,E as c,b as u,R as v};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-BXUJR-m_.js";import{cG as i}from"./index-DZVqlilk.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{bo as s,r as c,bT as a,bU as i}from"./index-Dlc4tDxO.js";function f(r){const n=s({warn:r?.router===void 0}),t=r?.router||n,u=c.useRef(void 0);return a(t.stores.__store,e=>{if(r?.select){if(r.structuralSharing??t.options.defaultStructuralSharing){const o=i(u.current,r.select(e));return u.current=o,o}return r.select(e)}return e})}export{f as u};
1
+ import{bo as s,r as c,bT as a,bU as i}from"./index-DZVqlilk.js";function f(r){const n=s({warn:r?.router===void 0}),t=r?.router||n,u=c.useRef(void 0);return a(t.stores.__store,e=>{if(r?.select){if(r.structuralSharing??t.options.defaultStructuralSharing){const o=i(u.current,r.select(e));return u.current=o,o}return r.select(e)}return e})}export{f as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-BXUJR-m_.js";import{cG as u,aF as n}from"./index-DZVqlilk.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +1 @@
1
- import{e as w,n as k,K as S,c as y,j as t}from"./index-Dlc4tDxO.js";import{A as E}from"./avatar-AI83PqVE.js";import{u as K}from"./studio-tools-B-zlmqyw.js";function R(r){const e=w.c(9),p=K();let m;e[0]!==r?(m=S.user(r),e[0]=r,e[1]=m):m=e[1];let o;e[2]!==p||e[3]!==r?(o=async()=>{const{user:n}=await p.call("USER_GET",{id:r});return n},e[2]=p,e[3]=r,e[4]=o):o=e[4];const x=!!r;let s;return e[5]!==m||e[6]!==o||e[7]!==x?(s={queryKey:m,queryFn:o,staleTime:3e5,retry:1,enabled:x},e[5]=m,e[6]=o,e[7]=x,e[8]=s):s=e[8],k(s)}function A(r){const e=w.c(36),{id:p,size:m,showEmail:o,avatarOnly:x,className:s}=r,n=m===void 0?"xs":m,u=o===void 0?!1:o,d=x===void 0?!1:x,{data:c,isLoading:U,isError:b}=R(p);if(U){let l;e[0]!==s?(l=y("flex items-center gap-2",s),e[0]=s,e[1]=l):l=e[1];let a;e[2]!==n?(a=t.jsx(E.Skeleton,{shape:"circle",size:n}),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==d||e[5]!==u?(i=!d&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),u&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=d,e[5]=u,e[6]=i):i=e[6];let f;return e[7]!==l||e[8]!==a||e[9]!==i?(f=t.jsxs("div",{className:l,children:[a,i]}),e[7]=l,e[8]=a,e[9]=i,e[10]=f):f=e[10],f}if(b||!c){let l;e[11]!==s?(l=y("flex items-center gap-2",s),e[11]=s,e[12]=l):l=e[12];let a;e[13]!==n?(a=t.jsx(E,{shape:"circle",size:n,fallback:"?",muted:!0}),e[13]=n,e[14]=a):a=e[14];let i;e[15]!==d?(i=!d&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=d,e[16]=i):i=e[16];let f;return e[17]!==l||e[18]!==a||e[19]!==i?(f=t.jsxs("div",{className:l,children:[a,i]}),e[17]=l,e[18]=a,e[19]=i,e[20]=f):f=e[20],f}let v;e[21]!==s?(v=y("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const g=c.image??void 0;let h;e[23]!==n||e[24]!==g||e[25]!==c.name?(h=t.jsx(E,{shape:"circle",size:n,url:g,fallback:c.name}),e[23]=n,e[24]=g,e[25]=c.name,e[26]=h):h=e[26];let j;e[27]!==d||e[28]!==u||e[29]!==c.email||e[30]!==c.name?(j=!d&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:c.name}),u&&t.jsx("div",{className:"text-xs text-muted-foreground",children:c.email})]}),e[27]=d,e[28]=u,e[29]=c.email,e[30]=c.name,e[31]=j):j=e[31];let N;return e[32]!==v||e[33]!==h||e[34]!==j?(N=t.jsxs("div",{className:v,children:[h,j]}),e[32]=v,e[33]=h,e[34]=j,e[35]=N):N=e[35],N}export{A as U};
1
+ import{e as w,n as k,K as S,c as y,j as t}from"./index-DZVqlilk.js";import{A as E}from"./avatar-BpsMlRfh.js";import{u as K}from"./studio-tools-CDcv-T4t.js";function R(r){const e=w.c(9),p=K();let m;e[0]!==r?(m=S.user(r),e[0]=r,e[1]=m):m=e[1];let o;e[2]!==p||e[3]!==r?(o=async()=>{const{user:n}=await p.call("USER_GET",{id:r});return n},e[2]=p,e[3]=r,e[4]=o):o=e[4];const x=!!r;let s;return e[5]!==m||e[6]!==o||e[7]!==x?(s={queryKey:m,queryFn:o,staleTime:3e5,retry:1,enabled:x},e[5]=m,e[6]=o,e[7]=x,e[8]=s):s=e[8],k(s)}function A(r){const e=w.c(36),{id:p,size:m,showEmail:o,avatarOnly:x,className:s}=r,n=m===void 0?"xs":m,u=o===void 0?!1:o,d=x===void 0?!1:x,{data:c,isLoading:U,isError:b}=R(p);if(U){let l;e[0]!==s?(l=y("flex items-center gap-2",s),e[0]=s,e[1]=l):l=e[1];let a;e[2]!==n?(a=t.jsx(E.Skeleton,{shape:"circle",size:n}),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==d||e[5]!==u?(i=!d&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),u&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=d,e[5]=u,e[6]=i):i=e[6];let f;return e[7]!==l||e[8]!==a||e[9]!==i?(f=t.jsxs("div",{className:l,children:[a,i]}),e[7]=l,e[8]=a,e[9]=i,e[10]=f):f=e[10],f}if(b||!c){let l;e[11]!==s?(l=y("flex items-center gap-2",s),e[11]=s,e[12]=l):l=e[12];let a;e[13]!==n?(a=t.jsx(E,{shape:"circle",size:n,fallback:"?",muted:!0}),e[13]=n,e[14]=a):a=e[14];let i;e[15]!==d?(i=!d&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=d,e[16]=i):i=e[16];let f;return e[17]!==l||e[18]!==a||e[19]!==i?(f=t.jsxs("div",{className:l,children:[a,i]}),e[17]=l,e[18]=a,e[19]=i,e[20]=f):f=e[20],f}let v;e[21]!==s?(v=y("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const g=c.image??void 0;let h;e[23]!==n||e[24]!==g||e[25]!==c.name?(h=t.jsx(E,{shape:"circle",size:n,url:g,fallback:c.name}),e[23]=n,e[24]=g,e[25]=c.name,e[26]=h):h=e[26];let j;e[27]!==d||e[28]!==u||e[29]!==c.email||e[30]!==c.name?(j=!d&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:c.name}),u&&t.jsx("div",{className:"text-xs text-muted-foreground",children:c.email})]}),e[27]=d,e[28]=u,e[29]=c.email,e[30]=c.name,e[31]=j):j=e[31];let N;return e[32]!==v||e[33]!==h||e[34]!==j?(N=t.jsxs("div",{className:v,children:[h,j]}),e[32]=v,e[33]=h,e[34]=j,e[35]=N):N=e[35],N}export{A as U};
@@ -1 +1 @@
1
- import{e as k,r as C,c as x,j as i}from"./index-Dlc4tDxO.js";import{b as I,T as P,a as L}from"./tooltip-D0rD3x8T.js";const M={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function B(S){const e=k.c(27),{value:s,onValueChange:y,options:o,size:R,fullWidth:E,className:z}=S,V=R===void 0?"sm":R,u=E===void 0?!1:E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const _=C.useRef(b);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g={left:0,width:0,opacity:0},e[1]=g):g=e[1];const[f,W]=C.useState(g);let h,p;e[2]!==o||e[3]!==s?(h=()=>{const t=o.findIndex(j=>j.value===s),m=_.current[t];m&&W({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],e[2]=o,e[3]=s,e[4]=h,e[5]=p):(h=e[4],p=e[5]),C.useEffect(h,p);const d=M[V];let n;e[6]!==z?(n=x("relative flex gap-0 bg-muted rounded-lg",z),e[6]=z,e[7]=n):n=e[7];let l;e[8]!==d||e[9]!==u||e[10]!==y||e[11]!==o||e[12]!==s?(l=o.map((t,m)=>{const j=i.jsxs("button",{ref:$=>{_.current[m]=$},type:"button",onClick:()=>y(t.value),className:x("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",u?"flex-1 h-12 px-4":d.button,!u&&t.label?"px-3":""),children:[i.jsx("span",{className:x("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",d.icon,s===t.value?"text-foreground":"text-muted-foreground"),children:t.icon}),t.label&&i.jsx("span",{className:x("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===t.value?"text-foreground":"text-muted-foreground"),children:t.label})]},t.value);return t.tooltip?i.jsxs(I,{children:[i.jsx(P,{asChild:!0,children:j}),i.jsx(L,{side:"bottom",children:t.tooltip})]},t.value):j}),e[8]=d,e[9]=u,e[10]=y,e[11]=o,e[12]=s,e[13]=l):l=e[13];const w=u?"h-12":d.button;let a;e[14]!==w?(a=x("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),e[14]=w,e[15]=a):a=e[15];const N=`${f.left}px`,T=`${f.width}px`;let r;e[16]!==f.opacity||e[17]!==N||e[18]!==T?(r={left:N,width:T,opacity:f.opacity},e[16]=f.opacity,e[17]=N,e[18]=T,e[19]=r):r=e[19];let c;e[20]!==a||e[21]!==r?(c=i.jsx("div",{className:a,style:r}),e[20]=a,e[21]=r,e[22]=c):c=e[22];let v;return e[23]!==c||e[24]!==n||e[25]!==l?(v=i.jsxs("div",{className:n,children:[l,c]}),e[23]=c,e[24]=n,e[25]=l,e[26]=v):v=e[26],v}export{B as V};
1
+ import{e as k,r as C,c as x,j as i}from"./index-DZVqlilk.js";import{b as I,T as P,a as L}from"./tooltip-o8huGjQ9.js";const M={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function B(S){const e=k.c(27),{value:s,onValueChange:y,options:o,size:R,fullWidth:E,className:z}=S,V=R===void 0?"sm":R,u=E===void 0?!1:E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const _=C.useRef(b);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g={left:0,width:0,opacity:0},e[1]=g):g=e[1];const[f,W]=C.useState(g);let h,p;e[2]!==o||e[3]!==s?(h=()=>{const t=o.findIndex(j=>j.value===s),m=_.current[t];m&&W({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],e[2]=o,e[3]=s,e[4]=h,e[5]=p):(h=e[4],p=e[5]),C.useEffect(h,p);const d=M[V];let n;e[6]!==z?(n=x("relative flex gap-0 bg-muted rounded-lg",z),e[6]=z,e[7]=n):n=e[7];let l;e[8]!==d||e[9]!==u||e[10]!==y||e[11]!==o||e[12]!==s?(l=o.map((t,m)=>{const j=i.jsxs("button",{ref:$=>{_.current[m]=$},type:"button",onClick:()=>y(t.value),className:x("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",u?"flex-1 h-12 px-4":d.button,!u&&t.label?"px-3":""),children:[i.jsx("span",{className:x("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",d.icon,s===t.value?"text-foreground":"text-muted-foreground"),children:t.icon}),t.label&&i.jsx("span",{className:x("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===t.value?"text-foreground":"text-muted-foreground"),children:t.label})]},t.value);return t.tooltip?i.jsxs(I,{children:[i.jsx(P,{asChild:!0,children:j}),i.jsx(L,{side:"bottom",children:t.tooltip})]},t.value):j}),e[8]=d,e[9]=u,e[10]=y,e[11]=o,e[12]=s,e[13]=l):l=e[13];const w=u?"h-12":d.button;let a;e[14]!==w?(a=x("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),e[14]=w,e[15]=a):a=e[15];const N=`${f.left}px`,T=`${f.width}px`;let r;e[16]!==f.opacity||e[17]!==N||e[18]!==T?(r={left:N,width:T,opacity:f.opacity},e[16]=f.opacity,e[17]=N,e[18]=T,e[19]=r):r=e[19];let c;e[20]!==a||e[21]!==r?(c=i.jsx("div",{className:a,style:r}),e[20]=a,e[21]=r,e[22]=c):c=e[22];let v;return e[23]!==c||e[24]!==n||e[25]!==l?(v=i.jsxs("div",{className:n,children:[l,c]}),e[23]=c,e[24]=n,e[25]=l,e[26]=v):v=e[26],v}export{B as V};
@@ -1 +1 @@
1
- import{e as oe,j as t,B as Ce,f as Be,b as lt,q as ze,r as at,o as Le,G as ct,a as dt,K as Fe,ec as Ke,dz as mt}from"./index-Dlc4tDxO.js";import{u as pt,a as ut}from"./use-mcp-client-BoOtVD9g.js";import{B as ft,g as Me}from"./generate-id-BrtbvnKY.js";import{C as qe}from"./collection-display-button-0uuG9Zva.js";import{C as ht}from"./collection-search-B-CX-Cb7.js";import{C as gt}from"./card-DmbfBYZU.js";import{I as Ve}from"./integration-icon-DylMdkB7.js";import{D as Ge,a as Qe,b as He,c as O}from"./dropdown-menu-C-Cxaez8.js";import{s as Je,a as Ye}from"./Eye-CGoLCmzu.js";import{i as Xe}from"./DotsVertical-jUGLCiy5.js";import{i as Ze}from"./Tool01-DPPRaW86.js";import{s as et}from"./Trash01-s7FZsfBC.js";import{C as xt}from"./collection-table-wrapper-DI5q4GEY.js";import{E as Ue}from"./empty-state-CzxH8T9l.js";import{n as We}from"./Stars02-Cv3Kyp_N.js";import{U as jt}from"./user-CXZKnlfK.js";import{E as tt}from"./empty-state-o52Hq4fy.js";import{u as Ct}from"./use-list-state-nfg3Cb56.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{f as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,A as Dt}from"./alert-dialog-CBzhgusU.js";import{a as It,b as At}from"./use-collections-CH3Uvmj5.js";import{a as Tt}from"./use-connection-BGpjiuJJ.js";import{s as Et}from"./Plus-Cv0T2Pov.js";import{a as Ot}from"./layout-Czl8yfyb.js";import{u as $t}from"./studio-tools-B-zlmqyw.js";import{P as je}from"./index-NNvehl9i.js";import"./collections-CXYJ8MVZ.js";import"./SwitchHorizontal01-CLZ8VEjC.js";import"./Check-DHmAQH53.js";import"./tooltip-D0rD3x8T.js";import"./view-mode-toggle-BO9qiFWG.js";import"./badge-CikIA9ZK.js";import"./SearchMd-BP9M1g2N.js";import"./Container-DZBZNA8Y.js";import"./agent-icon-D1ySfhKA.js";import"./AlertCircle-De-QnqNt.js";import"./RefreshCcw01-CcpA4rje.js";import"./XCircle-BdbzgmP6.js";import"./ArrowUpRight-B0GfNpsw.js";import"./ZapSquare-AN7R7mTa.js";import"./Users03-CKUicuTa.js";import"./CheckCircle-DKSRB9Xd.js";import"./ChevronDown-CN6qoGcG.js";import"./ChevronLeft-HFx1Uufy.js";import"./ChevronRight-BJSYQUmF.js";import"./ChevronUp-CTGwFzLw.js";import"./ZoomOut-Xe1itnU7.js";import"./Globe01--hrfRyvA.js";import"./FilterLines-DYSfUppO.js";import"./Star01-BjpgI7im.js";import"./Palette-B9PbEO6t.js";import"./HardDrive-yKlUP3QG.js";import"./Key01-DqH2W8Qa.js";import"./LayoutLeft-CLZVvVLM.js";import"./LinkExternal01-CaYoYL1Y.js";import"./Monitor01-BRL4_dKI.js";import"./Sun-C0I4hv8e.js";import"./Play-Btpg8EpH.js";import"./Settings02-BMRrFVdB.js";import"./Shield01-rOhEAWZ1.js";import"./Stars01-yuWjNyMF.js";import"./Upload01-xUCMslnL.js";import"./User01-BsF0RS3z.js";import"./Users01-D-iBSVXa.js";import"./XClose-N2P2hiYb.js";import"./X-CMYaHMo4.js";import"./Zap-gqEvk94k.js";import"./table-70fRVfwQ.js";import"./avatar-AI83PqVE.js";import"./use-view-mode-BJ_FnvkJ.js";import"./sidebar-BT1O99E-.js";import"./sheet-C2OErkZR.js";function kt(i,e){const s=i.properties||{};for(const n in s){const a=s[n];if(a&&a.type==="string"&&(a.format==="url"||a.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function zt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let a;e[0]!==s||e[1]!==l?(a=kt(l,s),e[0]=s,e[1]=l,e[2]=a):a=e[2];const r=a,u=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let m;e[3]!==n?(m=n&&Object.keys(n).length>0,e[3]=n,e[4]=m):m=e[4];const o=m;let p;e[5]!==r||e[6]!==s.title?(p=t.jsx(Ve,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=p):p=e[7];let d;e[8]!==s.title?(d=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=d):d=e[9];const h=u||"No description";let c;e[10]!==h?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=c):c=e[11];let v;e[12]!==d||e[13]!==c?(v=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[d,c]}),e[12]=d,e[13]=c,e[14]=v):v=e[14];let y;e[15]!==p||e[16]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[p,v]}),e[15]=p,e[16]=v,e[17]=y):y=e[17];let b;e[18]!==n||e[19]!==o||e[20]!==s?(b=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Mt,onMouseDown:Kt,children:t.jsxs(Ge,{children:[t.jsx(Qe,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Ft,children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:Lt,children:[n.open&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(Je,{size:16}),"Open"]}),n.edit&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(Ze,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Ye,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(O,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(et,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=b):b=e[21];let x;return e[22]!==y||e[23]!==b?(x=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,b]}),e[22]=y,e[23]=b,e[24]=x):x=e[24],x}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}function Mt(i){return i.stopPropagation()}const Ut=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Wt(i){return Object.keys(i).find(e=>Ut.includes(e.toLowerCase()))}function st(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Rt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:a,sortKey:r,sortDirection:u,onSort:m,actions:o,onItemClick:p,headerActions:d,emptyState:h,readOnly:c,columns:v,hideToolbar:y,sortableFields:b}=i,x=u===void 0?"asc":u,g=m===void 0?Gt:m;let $;e[0]!==o?($=o===void 0?{}:o,e[0]=o,e[1]=$):$=e[1];const f=$,T=p===void 0?Vt:p,E=d===void 0?null:d,N=h===void 0?null:h,k=c===void 0?!1:c,j=v===void 0?void 0:v,z=y===void 0?!1:y,P=b===void 0?void 0:b;let D;e[2]!==j||e[3]!==l||e[4]!==P?(D=j?j.filter(qt).filter(A=>!P||P.includes(A.id)).map(Bt):st(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(qe,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==f||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==a||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(zt,{item:A,schema:l,readOnly:k,actions:f})},A.id))})}):t.jsx(xt,{columns:Jt(j,l,P,f),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[13]=f,e[14]=j,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=a,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Bt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function qt(i){return i.sortable!==!1}function Vt(){}function Gt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(Ge,{children:[t.jsx(Qe,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(Je,{size:16}),"Open"]}),i.edit&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(Ze,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Ye,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(O,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(et,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function it(i){const e=i.type;return Array.isArray(e)?e.every(s=>it({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ht(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const p=s[o];return p&&it(p)}),n=Wt(s),a=[],r=new Set;n&&l.includes(n)&&(a.push(n),r.add(n));const u=["title","description","updated_at","updated_by"];for(const o of u)l.includes(o)&&!r.has(o)&&(a.push(o),r.add(o));const m=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,p)=>o.localeCompare(p));for(const o of m)a.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(a.push(o),r.add(o));return a.map(o=>{const p=s[o],d=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:h=>{const c=h[o];return t.jsx(Ve,{icon:c,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:h=>{const c=h[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:d,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c?t.jsx(jt,{id:String(c),size:"xs"}):"—"},sortable:d,cellClassName:"max-w-[250px]"}:p?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:d,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:d,cellClassName:"max-w-[200px]"}})}function Jt(i,e,s,l){const n=i||Ht(e,s);return n.some(u=>u.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Yt(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:a}=i,r=n.name,u=n.schema??ft,m=n.hasCreateTool,o=n.hasUpdateTool,p=n.hasDeleteTool,d=Be(),{data:h}=lt.useSession(),c=h?.user?.id||"unknown",v=Tt(s);let y;e[0]!==v||e[1]!==s?(y=v?bt(v):s,e[0]=v,e[1]=s,e[2]=y):y=e[2];const b=y,{org:x}=ze();let g;e[3]!==s||e[4]!==x.id||e[5]!==x.slug?(g={connectionId:s,orgId:x.id,orgSlug:x.slug},e[3]=s,e[4]=x.id,e[5]=x.slug,e[6]=g):g=e[6];const $=pt(g),f=It(s,r,$),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,$,_),A=!m&&!o&&!p;let ne;e[14]!==b||e[15]!==r||e[16]!==d||e[17]!==a||e[18]!==l?(ne=C=>{if(a){a(C);return}d({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=d,e[17]=a,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==f.create||e[21]!==c?(re=async C=>{const xe=new Date().toISOString();await f.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:xe,updated_at:xe,created_by:c,updated_by:c})},e[20]=f.create,e[21]=c,e[22]=re):re=e[22];const be=re,[F,ve]=at.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const ot=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==m?(M=m&&{duplicate:be},e[27]=be,e[28]=m,e[29]=M):M=e[29];let U;e[30]!==p?(U=p&&{delete:ot},e[30]=p,e[31]=U):U=e[31];let ae;e[32]!==M||e[33]!==U||e[34]!==K?(ae={...K,...M,...U},e[32]=M,e[33]=U,e[34]=K,e[35]=ae):ae=e[35];const ye=ae;let ce;e[36]!==f.delete||e[37]!==F?(ce=async()=>{F&&(await f.delete.mutateAsync(F.id),ve(null))},e[36]=f.delete,e[37]=F,e[38]=ce):ce=e[38];const Ne=ce;let de;e[39]!==f.create||e[40]!==b||e[41]!==r||e[42]!==m||e[43]!==d||e[44]!==l||e[45]!==c?(de=async()=>{if(!m){Le.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:c,updated_by:c};try{const ke=await f.create.mutateAsync(xe);d({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=f.create,e[40]=b,e[41]=r,e[42]=m,e[43]=d,e[44]=l,e[45]=c,e[46]=de):de=e[46];const we=de;let me;e[47]!==u?(me=st(u),e[47]=u,e[48]=me):me=e[48];const Se=me,nt=(I?.length??0)>0,rt=m&&!nt&&!N;let pe;e[49]!==f.create||e[50]!==we||e[51]!==m?(pe=m?t.jsxs(Ce,{onClick:we,size:"sm",disabled:f.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),f.create.isPending?"Creating...":"Create"]}):null,e[49]=f.create,e[50]=we,e[51]=m,e[52]=pe):pe=e[52];const ue=pe,Pe=D;let W;e[53]!==S||e[54]!==w||e[55]!==Se||e[56]!==Pe?(W=t.jsx(Ot,{children:t.jsx(qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let q;e[65]!==ue||e[66]!==m?(q=m&&t.jsx("div",{className:"pr-3",children:ue}),e[65]=ue,e[66]=m,e[67]=q):q=e[67];let V;e[68]!==B||e[69]!==q?(V=t.jsxs("div",{className:"flex items-center gap-2",children:[B,q]}),e[68]=B,e[69]=q,e[70]=V):V=e[70];let G;e[71]!==I?(G=I??[],e[71]=I,e[72]=G):G=e[72];const De=D;let Q;e[73]!==L?(Q=C=>L(C),e[73]=L,e[74]=Q):Q=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=rt?ue:void 0;let H;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(H=t.jsx(tt,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=H):H=e[78];let J;e[79]!==S||e[80]!==A||e[81]!==ye||e[82]!==u||e[83]!==N||e[84]!==j||e[85]!==P||e[86]!==w||e[87]!==G||e[88]!==De||e[89]!==Q||e[90]!==H||e[91]!==z?(J=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Rt,{hideToolbar:!0,data:G,schema:u,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:Q,readOnly:A,emptyState:H})}),e[79]=S,e[80]=A,e[81]=ye,e[82]=u,e[83]=N,e[84]=j,e[85]=P,e[86]=w,e[87]=G,e[88]=De,e[89]=Q,e[90]=H,e[91]=z,e[92]=J):J=e[92];let Y;e[93]!==V||e[94]!==J?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[V,J]}),e[93]=V,e[94]=J,e[95]=Y):Y=e[95];const Ee=!!F;let fe;e[96]===Symbol.for("react.memo_cache_sentinel")?(fe=C=>{C||ve(null)},e[96]=fe):fe=e[96];let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[97]=he):he=e[97];const Oe=F?.title;let X;e[98]!==Oe?(X=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',Oe,'"? This action cannot be undone.']})]}),e[98]=Oe,e[99]=X):X=e[99];let Z;e[100]!==f.delete.isPending?(Z=t.jsx(vt,{disabled:f.delete.isPending,children:"Cancel"}),e[100]=f.delete.isPending,e[101]=Z):Z=e[101];const $e=f.delete.isPending?"Deleting...":"Delete";let ee;e[102]!==f.delete.isPending||e[103]!==Ne||e[104]!==$e?(ee=t.jsx(yt,{onClick:Ne,disabled:f.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[102]=f.delete.isPending,e[103]=Ne,e[104]=$e,e[105]=ee):ee=e[105];let te;e[106]!==Z||e[107]!==ee?(te=t.jsxs(Pt,{children:[Z,ee]}),e[106]=Z,e[107]=ee,e[108]=te):te=e[108];let se;e[109]!==X||e[110]!==te?(se=t.jsxs(_t,{children:[X,te]}),e[109]=X,e[110]=te,e[111]=se):se=e[111];let ie;e[112]!==Ee||e[113]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[112]=Ee,e[113]=se,e[114]=ie):ie=e[114];let ge;return e[115]!==W||e[116]!==Y||e[117]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,Y,ie]}),e[115]=W,e[116]=Y,e[117]=ie,e[118]=ge):ge=e[118],ge}function Xt(){const i=oe.c(10),{org:e,project:s}=ze(),l=ct(),n=$t();let a;i[0]!==s||i[1]!==n?(a=async o=>{const p=s.enabledPlugins??[];if(p.includes(o))return;const d=[...p,o];return await n.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:s.id,data:{metadata:{enabled_plugins:d}}})},i[0]=s,i[1]=n,i[2]=a):a=i[2];let r;i[3]!==e||i[4]!==s||i[5]!==l?(r=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[3]=e,i[4]=s,i[5]=l,i[6]=r):r=i[6];let u;return i[7]!==a||i[8]!==r?(u={mutationFn:a,onSuccess:r,onError:Zt},i[7]=a,i[8]=r,i[9]=u):u=i[9],dt(u)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function es(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:a}=i,r=Xt();let u;e[0]!==r||e[1]!==s?(u=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=u):u=e[2];const m=u,o=a??null,p=r.isPending?"Enabling…":"Enable plugin";let d;e[3]!==r.isPending||e[4]!==m||e[5]!==p?(d=t.jsx(Ce,{onClick:m,disabled:r.isPending,children:p}),e[3]=r.isPending,e[4]=m,e[5]=p,e[6]=d):d=e[6];let h;return e[7]!==n||e[8]!==o||e[9]!==d||e[10]!==l?(h=t.jsx(tt,{image:o,title:l,description:n,actions:d}),e[7]=n,e[8]=o,e[9]=d,e[10]=l,e[11]=h):h=e[11],h}const ts={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function vi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(es,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(mt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Yt,{connectionId:ut,org:e.slug,activeCollection:ts,onItemClick:a=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:a.id}})})})})}export{vi as default};
1
+ import{e as oe,j as t,B as Ce,f as Be,b as lt,q as ze,r as at,o as Le,G as ct,a as dt,K as Fe,ec as Ke,dz as mt}from"./index-DZVqlilk.js";import{u as pt,a as ut}from"./use-mcp-client-DjPdtjSs.js";import{B as ft,g as Me}from"./generate-id-_ulkjF89.js";import{C as qe}from"./collection-display-button-BdCE4pbC.js";import{C as ht}from"./collection-search-D_do7MXe.js";import{C as gt}from"./card-COSTikSG.js";import{I as Ve}from"./integration-icon-DtSS6HBc.js";import{D as Ge,a as Qe,b as He,c as O}from"./dropdown-menu-DXIoF-ie.js";import{s as Je,a as Ye}from"./Eye-DM_PzU0M.js";import{i as Xe}from"./DotsVertical-BN7_sSEx.js";import{i as Ze}from"./Tool01-B-ijPyq1.js";import{s as et}from"./Trash01-N2sNvlm0.js";import{C as xt}from"./collection-table-wrapper-B7P7HtOs.js";import{E as Ue}from"./empty-state-BzLetnGS.js";import{n as We}from"./Stars02-RdMaq57_.js";import{U as jt}from"./user-BTbaSGqz.js";import{E as tt}from"./empty-state-KuzDCMb7.js";import{u as Ct}from"./use-list-state-C8tIIEc4.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{f as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,A as Dt}from"./alert-dialog-C9cdjnL0.js";import{a as It,b as At}from"./use-collections-DAjOo5ZC.js";import{a as Tt}from"./use-connection-CJMDVK6k.js";import{s as Et}from"./Plus-De-E-6wD.js";import{a as Ot}from"./layout-DPGG4lFH.js";import{u as $t}from"./studio-tools-CDcv-T4t.js";import{P as je}from"./index-B8Bi8NJZ.js";import"./collections-ChXxHzy2.js";import"./SwitchHorizontal01-WnVHCaWd.js";import"./Check-DEXo-WUm.js";import"./tooltip-o8huGjQ9.js";import"./view-mode-toggle-BdWmb5J5.js";import"./badge-CQSCbvCa.js";import"./SearchMd-DY7m-PLn.js";import"./Container-BzJpoAXT.js";import"./agent-icon-DYE5DbAQ.js";import"./AlertCircle-B6c8Mzjf.js";import"./RefreshCcw01-DA9Xrix-.js";import"./XCircle-DyhEmEPQ.js";import"./ArrowUpRight-Be3IVNc7.js";import"./ZapSquare-Ci4u2Dbd.js";import"./Users03-D5HhQ8-f.js";import"./CheckCircle-yjUP9-a4.js";import"./ChevronDown-DgK4vNiI.js";import"./ChevronLeft-CgTd6CqD.js";import"./ChevronRight-BEkEaTTX.js";import"./ChevronUp-DhNf5w7O.js";import"./ZoomOut-B_V9tlGR.js";import"./Globe01-B4QIOBGm.js";import"./FilterLines-1aeFf44G.js";import"./Star01-CBGrpf0P.js";import"./Palette-C2hbhyQk.js";import"./HardDrive-B2vsnJ8B.js";import"./Key01-fLbeh11d.js";import"./LayoutLeft-ZzAJDsr6.js";import"./LinkExternal01-CPGJkHHm.js";import"./Monitor01-B3onVx2m.js";import"./Sun-TUQeTj5x.js";import"./Play-CwQc-EwD.js";import"./Settings02-DkTBIaKB.js";import"./Shield01-TzaLPX1T.js";import"./Stars01-BEQtiGHr.js";import"./Upload01-qnabD6hi.js";import"./User01-Ca-HpbAW.js";import"./Users01-Dg21emev.js";import"./XClose-C7dvFGMb.js";import"./X-Bm7MIJC_.js";import"./Zap-CiEBAZr5.js";import"./table-DKw0lSKO.js";import"./avatar-BpsMlRfh.js";import"./use-view-mode-inE-bb4X.js";import"./sidebar-HV--ufCF.js";import"./sheet-CsGV1Xbn.js";function kt(i,e){const s=i.properties||{};for(const n in s){const a=s[n];if(a&&a.type==="string"&&(a.format==="url"||a.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function zt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let a;e[0]!==s||e[1]!==l?(a=kt(l,s),e[0]=s,e[1]=l,e[2]=a):a=e[2];const r=a,u=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let m;e[3]!==n?(m=n&&Object.keys(n).length>0,e[3]=n,e[4]=m):m=e[4];const o=m;let p;e[5]!==r||e[6]!==s.title?(p=t.jsx(Ve,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=p):p=e[7];let d;e[8]!==s.title?(d=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=d):d=e[9];const h=u||"No description";let c;e[10]!==h?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=c):c=e[11];let v;e[12]!==d||e[13]!==c?(v=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[d,c]}),e[12]=d,e[13]=c,e[14]=v):v=e[14];let y;e[15]!==p||e[16]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[p,v]}),e[15]=p,e[16]=v,e[17]=y):y=e[17];let b;e[18]!==n||e[19]!==o||e[20]!==s?(b=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Mt,onMouseDown:Kt,children:t.jsxs(Ge,{children:[t.jsx(Qe,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Ft,children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:Lt,children:[n.open&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(Je,{size:16}),"Open"]}),n.edit&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(Ze,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Ye,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(O,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(et,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=b):b=e[21];let x;return e[22]!==y||e[23]!==b?(x=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,b]}),e[22]=y,e[23]=b,e[24]=x):x=e[24],x}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}function Mt(i){return i.stopPropagation()}const Ut=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Wt(i){return Object.keys(i).find(e=>Ut.includes(e.toLowerCase()))}function st(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Rt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:a,sortKey:r,sortDirection:u,onSort:m,actions:o,onItemClick:p,headerActions:d,emptyState:h,readOnly:c,columns:v,hideToolbar:y,sortableFields:b}=i,x=u===void 0?"asc":u,g=m===void 0?Gt:m;let $;e[0]!==o?($=o===void 0?{}:o,e[0]=o,e[1]=$):$=e[1];const f=$,T=p===void 0?Vt:p,E=d===void 0?null:d,N=h===void 0?null:h,k=c===void 0?!1:c,j=v===void 0?void 0:v,z=y===void 0?!1:y,P=b===void 0?void 0:b;let D;e[2]!==j||e[3]!==l||e[4]!==P?(D=j?j.filter(qt).filter(A=>!P||P.includes(A.id)).map(Bt):st(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(qe,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==f||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==a||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(zt,{item:A,schema:l,readOnly:k,actions:f})},A.id))})}):t.jsx(xt,{columns:Jt(j,l,P,f),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[13]=f,e[14]=j,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=a,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Bt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function qt(i){return i.sortable!==!1}function Vt(){}function Gt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(Ge,{children:[t.jsx(Qe,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(Je,{size:16}),"Open"]}),i.edit&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(Ze,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Ye,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(O,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(et,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function it(i){const e=i.type;return Array.isArray(e)?e.every(s=>it({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ht(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const p=s[o];return p&&it(p)}),n=Wt(s),a=[],r=new Set;n&&l.includes(n)&&(a.push(n),r.add(n));const u=["title","description","updated_at","updated_by"];for(const o of u)l.includes(o)&&!r.has(o)&&(a.push(o),r.add(o));const m=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,p)=>o.localeCompare(p));for(const o of m)a.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(a.push(o),r.add(o));return a.map(o=>{const p=s[o],d=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:h=>{const c=h[o];return t.jsx(Ve,{icon:c,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:h=>{const c=h[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:d,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c?t.jsx(jt,{id:String(c),size:"xs"}):"—"},sortable:d,cellClassName:"max-w-[250px]"}:p?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:d,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:h=>{const c=h[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:d,cellClassName:"max-w-[200px]"}})}function Jt(i,e,s,l){const n=i||Ht(e,s);return n.some(u=>u.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Yt(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:a}=i,r=n.name,u=n.schema??ft,m=n.hasCreateTool,o=n.hasUpdateTool,p=n.hasDeleteTool,d=Be(),{data:h}=lt.useSession(),c=h?.user?.id||"unknown",v=Tt(s);let y;e[0]!==v||e[1]!==s?(y=v?bt(v):s,e[0]=v,e[1]=s,e[2]=y):y=e[2];const b=y,{org:x}=ze();let g;e[3]!==s||e[4]!==x.id||e[5]!==x.slug?(g={connectionId:s,orgId:x.id,orgSlug:x.slug},e[3]=s,e[4]=x.id,e[5]=x.slug,e[6]=g):g=e[6];const $=pt(g),f=It(s,r,$),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,$,_),A=!m&&!o&&!p;let ne;e[14]!==b||e[15]!==r||e[16]!==d||e[17]!==a||e[18]!==l?(ne=C=>{if(a){a(C);return}d({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=d,e[17]=a,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==f.create||e[21]!==c?(re=async C=>{const xe=new Date().toISOString();await f.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:xe,updated_at:xe,created_by:c,updated_by:c})},e[20]=f.create,e[21]=c,e[22]=re):re=e[22];const be=re,[F,ve]=at.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const ot=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==m?(M=m&&{duplicate:be},e[27]=be,e[28]=m,e[29]=M):M=e[29];let U;e[30]!==p?(U=p&&{delete:ot},e[30]=p,e[31]=U):U=e[31];let ae;e[32]!==M||e[33]!==U||e[34]!==K?(ae={...K,...M,...U},e[32]=M,e[33]=U,e[34]=K,e[35]=ae):ae=e[35];const ye=ae;let ce;e[36]!==f.delete||e[37]!==F?(ce=async()=>{F&&(await f.delete.mutateAsync(F.id),ve(null))},e[36]=f.delete,e[37]=F,e[38]=ce):ce=e[38];const Ne=ce;let de;e[39]!==f.create||e[40]!==b||e[41]!==r||e[42]!==m||e[43]!==d||e[44]!==l||e[45]!==c?(de=async()=>{if(!m){Le.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:c,updated_by:c};try{const ke=await f.create.mutateAsync(xe);d({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=f.create,e[40]=b,e[41]=r,e[42]=m,e[43]=d,e[44]=l,e[45]=c,e[46]=de):de=e[46];const we=de;let me;e[47]!==u?(me=st(u),e[47]=u,e[48]=me):me=e[48];const Se=me,nt=(I?.length??0)>0,rt=m&&!nt&&!N;let pe;e[49]!==f.create||e[50]!==we||e[51]!==m?(pe=m?t.jsxs(Ce,{onClick:we,size:"sm",disabled:f.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),f.create.isPending?"Creating...":"Create"]}):null,e[49]=f.create,e[50]=we,e[51]=m,e[52]=pe):pe=e[52];const ue=pe,Pe=D;let W;e[53]!==S||e[54]!==w||e[55]!==Se||e[56]!==Pe?(W=t.jsx(Ot,{children:t.jsx(qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let q;e[65]!==ue||e[66]!==m?(q=m&&t.jsx("div",{className:"pr-3",children:ue}),e[65]=ue,e[66]=m,e[67]=q):q=e[67];let V;e[68]!==B||e[69]!==q?(V=t.jsxs("div",{className:"flex items-center gap-2",children:[B,q]}),e[68]=B,e[69]=q,e[70]=V):V=e[70];let G;e[71]!==I?(G=I??[],e[71]=I,e[72]=G):G=e[72];const De=D;let Q;e[73]!==L?(Q=C=>L(C),e[73]=L,e[74]=Q):Q=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=rt?ue:void 0;let H;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(H=t.jsx(tt,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=H):H=e[78];let J;e[79]!==S||e[80]!==A||e[81]!==ye||e[82]!==u||e[83]!==N||e[84]!==j||e[85]!==P||e[86]!==w||e[87]!==G||e[88]!==De||e[89]!==Q||e[90]!==H||e[91]!==z?(J=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Rt,{hideToolbar:!0,data:G,schema:u,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:Q,readOnly:A,emptyState:H})}),e[79]=S,e[80]=A,e[81]=ye,e[82]=u,e[83]=N,e[84]=j,e[85]=P,e[86]=w,e[87]=G,e[88]=De,e[89]=Q,e[90]=H,e[91]=z,e[92]=J):J=e[92];let Y;e[93]!==V||e[94]!==J?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[V,J]}),e[93]=V,e[94]=J,e[95]=Y):Y=e[95];const Ee=!!F;let fe;e[96]===Symbol.for("react.memo_cache_sentinel")?(fe=C=>{C||ve(null)},e[96]=fe):fe=e[96];let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[97]=he):he=e[97];const Oe=F?.title;let X;e[98]!==Oe?(X=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',Oe,'"? This action cannot be undone.']})]}),e[98]=Oe,e[99]=X):X=e[99];let Z;e[100]!==f.delete.isPending?(Z=t.jsx(vt,{disabled:f.delete.isPending,children:"Cancel"}),e[100]=f.delete.isPending,e[101]=Z):Z=e[101];const $e=f.delete.isPending?"Deleting...":"Delete";let ee;e[102]!==f.delete.isPending||e[103]!==Ne||e[104]!==$e?(ee=t.jsx(yt,{onClick:Ne,disabled:f.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[102]=f.delete.isPending,e[103]=Ne,e[104]=$e,e[105]=ee):ee=e[105];let te;e[106]!==Z||e[107]!==ee?(te=t.jsxs(Pt,{children:[Z,ee]}),e[106]=Z,e[107]=ee,e[108]=te):te=e[108];let se;e[109]!==X||e[110]!==te?(se=t.jsxs(_t,{children:[X,te]}),e[109]=X,e[110]=te,e[111]=se):se=e[111];let ie;e[112]!==Ee||e[113]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[112]=Ee,e[113]=se,e[114]=ie):ie=e[114];let ge;return e[115]!==W||e[116]!==Y||e[117]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,Y,ie]}),e[115]=W,e[116]=Y,e[117]=ie,e[118]=ge):ge=e[118],ge}function Xt(){const i=oe.c(10),{org:e,project:s}=ze(),l=ct(),n=$t();let a;i[0]!==s||i[1]!==n?(a=async o=>{const p=s.enabledPlugins??[];if(p.includes(o))return;const d=[...p,o];return await n.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:s.id,data:{metadata:{enabled_plugins:d}}})},i[0]=s,i[1]=n,i[2]=a):a=i[2];let r;i[3]!==e||i[4]!==s||i[5]!==l?(r=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[3]=e,i[4]=s,i[5]=l,i[6]=r):r=i[6];let u;return i[7]!==a||i[8]!==r?(u={mutationFn:a,onSuccess:r,onError:Zt},i[7]=a,i[8]=r,i[9]=u):u=i[9],dt(u)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function es(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:a}=i,r=Xt();let u;e[0]!==r||e[1]!==s?(u=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=u):u=e[2];const m=u,o=a??null,p=r.isPending?"Enabling…":"Enable plugin";let d;e[3]!==r.isPending||e[4]!==m||e[5]!==p?(d=t.jsx(Ce,{onClick:m,disabled:r.isPending,children:p}),e[3]=r.isPending,e[4]=m,e[5]=p,e[6]=d):d=e[6];let h;return e[7]!==n||e[8]!==o||e[9]!==d||e[10]!==l?(h=t.jsx(tt,{image:o,title:l,description:n,actions:d}),e[7]=n,e[8]=o,e[9]=d,e[10]=l,e[11]=h):h=e[11],h}const ts={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function vi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(es,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(mt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Yt,{connectionId:ut,org:e.slug,activeCollection:ts,onItemClick:a=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:a.id}})})})})}export{vi as default};
@@ -0,0 +1 @@
1
+ import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-DZVqlilk.js";import{a as f}from"./index-CUxRowbV.js";import"./index-RgNRvF6I.js";import"./use-mcp-client-DjPdtjSs.js";import"./collections-ChXxHzy2.js";import"./index-CcqodNxi.js";import"./use-virtual-mcp-BCFYBYWC.js";import"./use-collections-DAjOo5ZC.js";import"./monaco-editor-Df-1kT53.js";import"./index-DmTxFLmc.js";import"./spinner-DO0j02hL.js";import"./resizable-C-INMWq5.js";import"./ZoomOut-B_V9tlGR.js";import"./badge-CQSCbvCa.js";import"./select-C_Mscmor.js";import"./tooltip-o8huGjQ9.js";import"./Check-DEXo-WUm.js";import"./ChevronDown-DgK4vNiI.js";import"./ChevronUp-DhNf5w7O.js";import"./view-mode-toggle-BdWmb5J5.js";import"./agent-icon-DYE5DbAQ.js";import"./AlertCircle-B6c8Mzjf.js";import"./Tool01-B-ijPyq1.js";import"./SwitchHorizontal01-WnVHCaWd.js";import"./RefreshCcw01-DA9Xrix-.js";import"./XCircle-DyhEmEPQ.js";import"./ArrowUpRight-Be3IVNc7.js";import"./ZapSquare-Ci4u2Dbd.js";import"./Users03-D5HhQ8-f.js";import"./CheckCircle-yjUP9-a4.js";import"./ChevronLeft-CgTd6CqD.js";import"./ChevronRight-BEkEaTTX.js";import"./DotsVertical-BN7_sSEx.js";import"./Container-BzJpoAXT.js";import"./Eye-DM_PzU0M.js";import"./Globe01-B4QIOBGm.js";import"./FilterLines-1aeFf44G.js";import"./Star01-CBGrpf0P.js";import"./Palette-C2hbhyQk.js";import"./HardDrive-B2vsnJ8B.js";import"./Stars02-RdMaq57_.js";import"./Key01-fLbeh11d.js";import"./LayoutLeft-ZzAJDsr6.js";import"./LinkExternal01-CPGJkHHm.js";import"./Monitor01-B3onVx2m.js";import"./Sun-TUQeTj5x.js";import"./Play-CwQc-EwD.js";import"./Plus-De-E-6wD.js";import"./SearchMd-DY7m-PLn.js";import"./Settings02-DkTBIaKB.js";import"./Shield01-TzaLPX1T.js";import"./Stars01-BEQtiGHr.js";import"./Trash01-N2sNvlm0.js";import"./Upload01-qnabD6hi.js";import"./User01-Ca-HpbAW.js";import"./Users01-Dg21emev.js";import"./XClose-C7dvFGMb.js";import"./X-Bm7MIJC_.js";import"./Zap-CiEBAZr5.js";import"./layout-DPGG4lFH.js";import"./index-B8Bi8NJZ.js";import"./sidebar-HV--ufCF.js";import"./sheet-CsGV1Xbn.js";import"./use-connection-CJMDVK6k.js";import"./use-mcp-tools-9PGjSkaC.js";import"./dialog-Djt1LVnY.js";import"./scroll-area-DOzWTBh7.js";import"./index-C4IhCWyO.js";import"./hover-card-DfE_o4wO.js";import"./dropdown-menu-DXIoF-ie.js";import"./integration-icon-DtSS6HBc.js";import"./accordion-Da3zFuxg.js";import"./index-CqAKxsqM.js";import"./empty-state-BzLetnGS.js";import"./create-sse-subscription-BS5983N4.js";import"./input-DBD7EP80.js";function Bt(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{Bt as default};
@@ -43,7 +43,7 @@
43
43
  <meta name="apple-mobile-web-app-capable" content="yes" />
44
44
  <meta name="apple-mobile-web-app-status-bar-style" content="default" />
45
45
  <meta name="apple-mobile-web-app-title" content="deco Studio" />
46
- <script type="module" crossorigin src="/assets/index-Dlc4tDxO.js"></script>
46
+ <script type="module" crossorigin src="/assets/index-DZVqlilk.js"></script>
47
47
  <link rel="stylesheet" crossorigin href="/assets/index-DfYyH4IW.css">
48
48
  </head>
49
49
  <body>
@@ -104661,7 +104661,7 @@ ${c.stack}`;f.reject(d)}else f.resolve(_)}});return $.requestSubject=i,this.prot
104661
104661
  `);if(g===-1)return;let h=$.subarray(0,g).toString("utf8"),E=$.subarray(g+4),v=h.split(`\r
104662
104662
  `,1)[0]??"";if(!/^HTTP\/1\.[01] 101(?:\s|$)/.test(v)){q8(i,1011,t.upstreamErrorReason);try{c.end()}catch{}return}d=!0,i.data.upstream=c;let w=s9l((r,O)=>{try{if(r===1)i.send(O.toString("utf8"));else if(r===2)i.send(O);else if(r===8){let{code:y,reason:X}=o9l(O);q8(i,y,X);try{c.end()}catch{}}}catch{}});if(c.removeAllListeners("data"),E.length>0)w(E);c.on("data",(r)=>w(r));for(let r of i.data.pending)try{c.write(Jji(r,!0))}catch{}i.data.pending.length=0})}function a9l(i,t){let u=[`GET ${i} HTTP/1.1`];for(let[l,n]of Object.entries(t))u.push(`${l}: ${n}`);return u.push("",""),u.join(`\r
104663
104663
  `)}function q8(i,t,u){try{if(t!==void 0)i.close(t,u??"");else i.close()}catch{}}function Jji(i,t,u){let l,n;if(typeof i==="string")l=Buffer.from(i,"utf8"),n=1;else if(i instanceof ArrayBuffer)l=Buffer.from(i),n=2;else if(Buffer.isBuffer(i))l=i,n=2;else l=Buffer.from(i),n=2;let f=u??n,c=l.length,$=[];$.push(128|f&15);let d=t?128:0;if(c<126)$.push(d|c);else if(c<65536)$.push(d|126,c>>8&255,c&255);else $.push(d|127,0,0,0,0),$.push(c>>>24&255,c>>>16&255,c>>>8&255,c&255);let _=t?4:0,g=Buffer.allocUnsafe($.length+_+c),h=0;for(let E=0;E<$.length;E++)g[h++]=$[E];if(t){let E=PSt(4);g[h++]=E[0],g[h++]=E[1],g[h++]=E[2],g[h++]=E[3];for(let v=0;v<c;v++)g[h++]=l[v]^E[v&3]}else l.copy(g,h);return g}function o9l(i){if(i.length<2)return{code:1000,reason:""};return{code:i.readUInt16BE(0),reason:i.subarray(2).toString("utf8")}}function s9l(i){let t=Buffer.alloc(0);return(u)=>{t=t.length===0?u:Buffer.concat([t,u]);while(!0){if(t.length<2)return;let l=t[0],n=t[1],f=l&15,c=(n&128)!==0,$=n&127,d=2;if($===126){if(t.length<d+2)return;$=t[d]<<8|t[d+1],d+=2}else if($===127){if(t.length<d+8)return;$=t[d+4]*16777216+(t[d+5]<<16|t[d+6]<<8|t[d+7]),d+=8}let _=null;if(c){if(t.length<d+4)return;_=t.subarray(d,d+4),d+=4}if(t.length<d+$)return;let g=t.subarray(d,d+$);if(_){let h=Buffer.alloc($);for(let E=0;E<$;E++)h[E]=g[E]^_[E&3];g=h}t=t.subarray(d+$),i(f,g)}}}var V9l=256;var jSt=x(()=>{YSt()});function kSt(i){if(typeof i!=="string"||i.length===0)return null;let t=i.lastIndexOf(":");if(i.startsWith("["))return null;let l=(t>=0?i.slice(0,t):i).replace(/\.$/,"").toLowerCase(),n=".localhost";if(!l.endsWith(n))return null;let f=l.slice(0,-n.length);if(f.length===0)return null;if(f.includes("."))return null;return f}async function SSt(i){let t=WSt({maxPendingFrames:i.maxPendingWsFrames??p9l,backlogOverflowReason:"ingress backlog overflow"}),u=Bun.serve({port:i.port,hostname:"127.0.0.1",idleTimeout:0,async fetch(l,n){let f=l.headers.get("host"),c=kSt(f);if(!c)return new Response("not found",{status:404});let $=i.lookupSandboxPort(c);if(!$){if(l.headers.get("upgrade")==="websocket")return new Response("unknown handle",{status:404});return new Response(iNl,{status:503,headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Retry-After":"1"}})}if(l.headers.get("upgrade")==="websocket"){let h=new URL(l.url);if(!n.upgrade(l,{data:ASt({port:$,pathQuery:`${h.pathname}${h.search}`,protocols:GSt(l.headers)})}))return new Response("ws upgrade failed",{status:400});return}let d=new URL(l.url),_=`http://127.0.0.1:${$}${d.pathname}${d.search}`,g=new Headers(l.headers);return g.set("host",`127.0.0.1:${$}`),fetch(_,{method:l.method,headers:g,body:l.body,redirect:"manual"})},websocket:{open:t.open,message:t.message,close:t.close}});return{port:u.port??0,async stop(){u.stop(!0)}}}var p9l=256,iNl='<!DOCTYPE html><html><head><meta charset="utf-8"><title>Connecting\u2026</title><style>body{font-family:system-ui,sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;background:#fafafa;color:#555}div{text-align:center;max-width:420px;padding:24px}h3{margin:0 0 8px}p{margin:0;font-size:14px;color:#999;line-height:1.5}</style></head><body><div><h3>Connecting to sandbox\u2026</h3><p>Waiting for the local sandbox to come online. This page refreshes automatically.</p></div><script>setTimeout(function(){window.location.reload()},1500)</script></body></html>';var zSt=x(()=>{jSt()});async function Uji(i=cNl){let t=["decopilot-sandbox","body-offload"],[u,l]=await Promise.all([i.detectClaudeCode().catch(()=>!1),i.detectCodex().catch(()=>!1)]);if(u)t.push("claude-code");if(l)t.push("codex");return t}function uNl(i){return tNl.filter((t)=>!i.includes(t))}function lNl(i,t){let u=t.filter((l)=>!i.includes(l));return i.push(...u),u}function bSt(i,t={}){let u=t.detect??(()=>Uji()),l=setInterval(()=>{if(uNl(i).length===0)return;u().then((n)=>{let f=lNl(i,n);if(f.length>0)t.onChange?.(f)}).catch(()=>{})},t.intervalMs??60000);return l.unref?.(),()=>clearInterval(l)}async function nNl(){try{let{query:i}=await import("@anthropic-ai/claude-agent-sdk"),t=i({prompt:"",options:{maxTurns:1}}),u=await t.accountInfo();return t.return(void 0),Boolean(u.email)}catch{return!1}}async function fNl(){try{let i=Bun.spawn(["codex","--version"],{stdout:"ignore",stderr:"ignore"}),t=setTimeout(()=>i.kill(),1e4),u=await i.exited;return clearTimeout(t),u===0}catch{return!1}}var tNl,cNl;var KSt=x(()=>{tNl=["claude-code","codex"];cNl={detectClaudeCode:nNl,detectCodex:fNl}});import{randomBytes as $Nl}from"crypto";import{mkdir as dNl,readFile as _Nl,writeFile as gNl}from"fs/promises";import{dirname as hNl,join as ENl}from"path";function vNl(i){return ENl(i,"machine-id")}async function HSt(i){let t=vNl(i);try{let n=(await _Nl(t,"utf8")).trim();if(n)return n}catch{}let u=$Nl(16).toString("hex");return await dNl(hNl(t),{recursive:!0}),await gNl(t,u),u}var LSt=()=>{};import{randomBytes as wNl}from"crypto";import{mkdir as xNl}from"fs/promises";import{createServer as rNl}from"net";import{join as DNl}from"path";function RSt(i,t){return Error(`sandbox failed to start: ${i}`,{cause:t})}function ONl(i){if(!(i instanceof Error))return!1;return i.name==="TimeoutError"||/timed out|timeout|operation was aborted|aborted/i.test(i.message)}function yNl(i){if(i instanceof Error){let t=i.cause;if(t instanceof Error&&t.message)return t.message;return i.message}return String(i)}function CSt(i){let t=i.maxSandboxes??20,u=new Map,l=i.pickPort??XNl,n=i.fetchImpl??fetch,f=i.resolvePreviewUrl??((E,v)=>`http://127.0.0.1:${v}`),c=(E)=>{try{i.onEvent?.(E)}catch{}},$=async(E)=>{let v=new AbortController,w=setTimeout(()=>v.abort(),1500);try{let r=await n(`${E}/health`,{signal:v.signal});if(!r.ok)console.warn(`[user-desktop] probe ${E}/health \u2192 ${r.status} (treating as dead)`);return r.ok}catch(r){return console.warn(`[user-desktop] probe ${E}/health failed: ${r instanceof Error?r.message:String(r)} (treating as dead)`),!1}finally{clearTimeout(w)}},d=(E)=>{console.warn(`[user-desktop] evicting dead daemon handle=${E.handle} port=${E.port}`);try{E.process.kill("SIGTERM")}catch{}if(u.get(E.handle)===E)u.delete(E.handle),c({handle:E.handle,phase:"evicted"})},_=new Map;function g(){if(u.size<t)return;let E=[...u.values()].filter((w)=>w.activeDispatchCount===0).sort((w,r)=>w.lastUsedAt-r.lastUsedAt);if(E.length===0){console.warn(`[user-desktop] at cap ${u.size}/${t} but every sandbox is pinned (active dispatch) \u2014 exceeding cap temporarily`);return}let v=E[0];console.log(`[user-desktop] evicting LRU victim handle=${v.handle} port=${v.port} (cap ${t} reached, size=${u.size})`);try{v.process.kill("SIGTERM")}catch{}u.delete(v.handle),c({handle:v.handle,phase:"evicted"})}let h=async(E)=>{c({handle:E.handle,phase:"spawning"}),g();let v=DNl(i.dataDir,"sandboxes",E.handle);await xNl(v,{recursive:!0}),console.log(`[user-desktop] ensure handle=${E.handle} repo=${E.repo?.cloneUrl??"(none)"} branch=${E.repo?.branch??"(none)"} runtime=${E.workload?.runtime??"(autodetect)"} pm=${E.workload?.packageManager??"(autodetect)"}`);let w=wNl(24).toString("hex"),[r,O]=await Promise.all([l(),l()]);console.log(`[user-desktop] spawn handle=${E.handle} port=${r} devPort=${O} workdir=${v}`);let y=await Promise.resolve(i.spawnDaemon({workdir:v,handle:E.handle,port:r,daemonToken:w,offloadAllowedHosts:E.offloadAllowedHosts??[],offloadAllowSameHostDev:E.offloadAllowSameHostDev??!1,orgFsConfigJson:E.orgFsConfigJson}));try{try{await i.waitForHealth(r)}catch(J){throw RSt("the sandbox didn't come online in time",J)}console.log(`[user-desktop] healthy handle=${E.handle} port=${r} \u2014 posting config`);try{await i.postConfig(r,O,{repo:E.repo,workload:E.workload,operator:E.operator},w)}catch(J){throw RSt(ONl(J)?"configuration timed out":"the sandbox rejected its configuration",J)}}catch(J){console.error(`[user-desktop] sandbox bring-up failed handle=${E.handle} port=${r} (killing daemon):`,J);try{y.kill("SIGKILL")}catch{}throw c({handle:E.handle,phase:"failed",error:yNl(J)}),J}let X=`http://127.0.0.1:${r}`,N=f(E.handle,r);console.log(`[user-desktop] ready handle=${E.handle} port=${r} sandboxApiUrl=${X} previewUrl=${N}`);let U={handle:E.handle,port:r,process:y,sandboxApiUrl:X,previewUrl:N,lastUsedAt:Date.now(),activeDispatchCount:0,daemonToken:w};if(u.set(E.handle,U),c({handle:E.handle,phase:"ready",port:r,previewUrl:N}),y.exited)y.exited.then(()=>{if(u.get(E.handle)===U)console.warn(`[user-desktop] daemon process exited unexpectedly handle=${E.handle} port=${r} \u2014 removing from cache`),u.delete(E.handle),c({handle:E.handle,phase:"evicted"});else console.log(`[user-desktop] daemon process exited handle=${E.handle} port=${r} (already replaced/removed)`)});return{sandboxApiUrl:X,previewUrl:N,port:r}};return{async ensureSandbox(E){let v=u.get(E.handle);if(v){if(await $(v.sandboxApiUrl))return console.log(`[user-desktop] cache hit handle=${E.handle} port=${v.port} (alive)`),v.lastUsedAt=Date.now(),{sandboxApiUrl:v.sandboxApiUrl,previewUrl:v.previewUrl,port:v.port};console.warn(`[user-desktop] cache stale handle=${E.handle} port=${v.port} \u2014 respawning`),d(v)}let w=_.get(E.handle);if(w)return console.log(`[user-desktop] joining in-flight ensure handle=${E.handle}`),w;let r=h(E).finally(()=>{_.delete(E.handle)});return _.set(E.handle,r),r},proxyPort(E){let v=u.get(E);if(v)v.lastUsedAt=Date.now();return v?.port??null},getDaemonToken(E){return u.get(E)?.daemonToken??null},hasHandle(E){return u.has(E)||_.has(E)},recordHit(E){let v=u.get(E);if(v)v.lastUsedAt=Date.now()},acquireDispatch(E){let v=u.get(E);if(!v)return()=>{};v.activeDispatchCount+=1;let w=!1;return()=>{if(w)return;w=!0;let r=u.get(E);if(r)r.activeDispatchCount=Math.max(0,r.activeDispatchCount-1)}},listSandboxes(){return[...u.values()]},async deleteSandbox(E){let v=u.get(E);if(!v){console.log(`[user-desktop] delete handle=${E} (not found, no-op)`);return}console.log(`[user-desktop] delete handle=${E} port=${v.port}`);try{v.process.kill("SIGTERM")}catch{}u.delete(E),c({handle:E,phase:"deleted"})},async shutdown(){console.log(`[user-desktop] shutdown \u2014 killing ${u.size} sandbox(es)`);for(let E of u.values())try{E.process.kill("SIGTERM")}catch{}u.clear()}}}function XNl(){return new Promise((i,t)=>{let u=rNl();u.unref(),u.on("error",t),u.listen(0,"127.0.0.1",()=>{let l=u.address();if(l&&typeof l==="object"){let n=l.port;u.close(()=>i(n))}else u.close(()=>t(Error("could not allocate port")))})})}var eSt=()=>{};import{randomUUID as NNl}from"crypto";import{hostname as JNl}from"os";async function MSt(i){let t=JNl()||void 0;i.monitor?.onMachine?.(t??"this machine");let u=$Gt(i.dataDir,{outFd:i.logFd,perSandboxLog:i.perSandboxLogs,hotReload:i.hotReload}),l=0,n=CSt({dataDir:i.dataDir,resolvePreviewUrl:(N,U)=>l>0?`http://${N}.localhost:${l}`:`http://127.0.0.1:${U}`,spawnDaemon:async(N)=>{let U={DAEMON_BOOT_ID:NNl(),APP_ROOT:N.workdir,PROXY_PORT:String(N.port),DAEMON_TOKEN:N.daemonToken,OFFLOAD_ALLOWED_HOSTS:N.offloadAllowedHosts.join(","),...N.offloadAllowSameHostDev?{OFFLOAD_ALLOW_SAME_HOST_DEV:"1"}:{}};if(N.orgFsConfigJson){let Z=await hGt(i.dataDir);if(Z)U.ORGFS_CONFIG=N.orgFsConfigJson,U.ORGFS_RCLONE_PATH=Z}let J=await u({workdir:N.workdir,env:U,daemonPort:N.port});return{port:N.port,kill:(Z)=>J.kill(Z),exited:J.exited.then(()=>{return})}},postConfig:async(N,U,J,Z)=>{let B={port:U};if(J.workload)B.runtime=J.workload.runtime,B.packageManager={name:J.workload.packageManager,...J.workload.packageManagerPath?{path:J.workload.packageManagerPath}:{}};let Q={application:B},P=pg(J.operator??null);if(P)Q.operator=P;if(J.repo)Q.git={repository:{cloneUrl:J.repo.cloneUrl,branch:J.repo.branch},...J.repo.userName&&J.repo.userEmail?{identity:{userName:J.repo.userName,userEmail:J.repo.userEmail}}:{}};await B8(`http://127.0.0.1:${N}`,Z,Q)},waitForHealth:async(N)=>{await nli(`http://127.0.0.1:${N}`)},maxSandboxes:20,onEvent:i.monitor?.onEvent}),f=await SSt({port:i.port,lookupSandboxPort:(N)=>n.proxyPort(N)});l=f.port,console.log(`Local ingress listening on http://127.0.0.1:${f.port} (use http://<handle>.localhost:${f.port}/)`),i.monitor?.onIngress?.(f.port);let c=vGt({provider:n}),$=async()=>{let N=await jx({dataDir:i.dataDir,target:i.clusterBaseUrl});if(!N)throw Object.assign(Error(`Session for ${i.clusterBaseUrl} is no longer valid \u2014 run \`deco auth login --target ${i.clusterBaseUrl}\` and restart \`deco link\`.`),{fatal:!0});return N.accessToken};console.log(`[link-daemon] transport=pull cluster=${i.clusterBaseUrl}`);let d=await HSt(i.dataDir),_=process.env.npm_package_version??"0.0.0",g=await Uji(),h=bSt(g,{onChange:(N)=>{console.log(`[link-daemon] capabilities detected: +${N.join(",")} (now: ${g.join(",")})`)}}),E=yji({path:`${i.dataDir}/link/outbox.sqlite`}),v=()=>{},w=await ZSt({clusterBaseUrl:i.clusterBaseUrl,getAccessToken:$,provider:n,outbox:E,controlHandler:c,capabilities:g,machineId:d,cliVersion:_,previewPort:f.port,onConnected:()=>{i.monitor?.onCluster?.("linked"),console.log(`Linked to ${i.clusterBaseUrl} (pull transport)`)},onShutdown:()=>v()}),r,O=new Promise((N)=>{r=N}),y=!1,X=async()=>{if(y)return;y=!0,console.log(`
104664
- Shutting down\u2026`),h();try{await w.close()}catch{}try{await f.stop()}catch{}try{await n.shutdown()}catch{}try{E.close()}catch{}r(0)};return process.on("SIGINT",()=>void X()),process.on("SIGTERM",()=>void X()),v=()=>{console.log("Disconnect requested from the Studio web UI \u2014 shutting down. Run `bunx decocms link` to reconnect."),X()},w.closed.then(()=>{if(i.monitor?.onCluster?.("closed"),!y)console.error("Cluster connection closed permanently; exiting."),X()}),{stopped:O,stop:X}}var qSt=x(()=>{DAi();RH();dGt();EGt();wGt();TSt();Xji();zSt();KSt();LSt();LH();eSt()});function Fji(i){return i.map((t)=>typeof t==="string"?t:String(t)).join(" ")}var r0i;var Zji=x(()=>{r0i={name:"decocms",version:"3.28.1",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","test:ct":"playwright test -c playwright-ct.config.ts","test:ct:ui":"playwright test -c playwright-ct.config.ts --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts","smoke:link":"bun run scripts/smoke-link.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.141","@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.80","@ai-sdk/google":"^3.0.80","@ai-sdk/openai":"^3.0.65","@anthropic-ai/sdk":"^0.96.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.17.6","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.7.1","@openrouter/ai-sdk-provider":"^2.9.0","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"3.13.24","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@ai-sdk/react":"^3.0.193","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/harness":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/std":"workspace:*","@floating-ui/react":"^0.27.16","@happy-dom/global-registrator":"^20.9.0","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/experimental-ct-react":"1.59.1","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.100.10","@tanstack/react-router":"1.169.2","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.191","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.22","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","lucide-react":"^0.468.0",marked:"^15.0.6","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});var wL={};Pi(wL,{printBanner:()=>ZNl,bannerLines:()=>VSt,BANNER_LINES:()=>D0i,BANNER_GRADIENT:()=>O0i});function FNl(i){let t=Number.parseInt(i.slice(1),16);return[t>>16&255,t>>8&255,t&255]}function VSt(i){let t=D0i.map((u,l)=>{let[n,f,c]=FNl(O0i[l]);return`\x1B[38;2;${n};${f};${c}m${u}\x1B[39m`});if(i!==void 0)t.push(`\x1B[2m v${i}\x1B[22m`);return t}function ZNl(i){console.log("");for(let t of VSt(i))console.log(t);console.log("")}var D0i,O0i;var GW=x(()=>{D0i=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],O0i=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"]});import{Box as TNl,Text as mSt}from"ink";import{jsx as INl,jsxs as aSt}from"react/jsx-runtime";function y0i({version:i}){return aSt(TNl,{flexDirection:"column",marginTop:1,children:[D0i.map((t,u)=>INl(mSt,{color:O0i[u],children:t},u)),aSt(mSt,{dimColor:!0,children:[" v",i]})]})}var Tji=x(()=>{GW()});var sSt={};Pi(sSt,{subscribeLinkState:()=>Bji,setMachine:()=>PNl,setLogPath:()=>ANl,setIngress:()=>YNl,setDaemonError:()=>GNl,setClusterUrl:()=>BNl,setCluster:()=>QNl,pushSandboxEvent:()=>WNl,getLinkState:()=>Qji,applySandboxEvent:()=>oSt});function oSt(i,t){let u=new Map(i);if(t.phase==="evicted"||t.phase==="deleted")return u.delete(t.handle),u;let l=u.get(t.handle);return u.set(t.handle,{handle:t.handle,port:t.port??l?.port??null,previewUrl:t.previewUrl??l?.previewUrl??null,status:t.phase,error:t.phase==="failed"?t.error??"failed":null}),u}function V8(){for(let i of Iji)i()}function Qji(){return i$}function Bji(i){return Iji.add(i),()=>Iji.delete(i)}function QNl(i){i$={...i$,cluster:i},V8()}function BNl(i){i$={...i$,clusterUrl:i},V8()}function YNl(i,t){i$={...i$,ingressPort:i,ingressUrl:t},V8()}function PNl(i){i$={...i$,machine:i},V8()}function GNl(i){i$={...i$,daemonError:i},V8()}function ANl(i){i$={...i$,logPath:i},V8()}function WNl(i){i$={...i$,sandboxes:oSt(i$.sandboxes,i)},V8()}var i$,Iji;var Yji=x(()=>{i$={cluster:"connecting",clusterUrl:null,ingressUrl:null,ingressPort:null,machine:null,cap:20,sandboxes:new Map,daemonError:null,logPath:null},Iji=new Set});var pSt={};Pi(pSt,{LinkApp:()=>SNl});import{Box as t$,Text as u$}from"ink";import{useSyncExternalStore as jNl}from"react";import{jsx as $f,jsxs as LE}from"react/jsx-runtime";function kNl(i){if(i.status==="ready")return{color:"green",text:"\u25CF Live"};if(i.status==="spawning")return{color:"yellow",text:"\u25CC Starting\u2026"};return{color:"red",text:`\u2717 Error: ${i.error??""}`}}function SNl(){let i=jNl(Bji,Qji),t=[...i.sandboxes.values()].sort((u,l)=>u.handle.localeCompare(l.handle));return LE(t$,{flexDirection:"column",children:[$f(y0i,{version:r0i.version}),$f(t$,{marginBottom:1,children:$f(u$,{dimColor:!0,children:"\u2500".repeat(80)})}),$f(t$,{children:i.cluster==="linked"?LE(u$,{color:"green",children:["\u2713 Connected to ",i.clusterUrl??"deco"]}):i.cluster==="connecting"?LE(u$,{color:"yellow",children:["\u25CC Connecting to ",i.clusterUrl??"deco","\u2026"]}):LE(u$,{color:"red",children:["\u2717 Disconnected from ",i.clusterUrl??"deco"]})}),$f(t$,{children:i.ingressUrl?LE(u$,{color:"green",children:["\u2713 Serving at ",i.ingressUrl]}):$f(u$,{dimColor:!0,children:"\u25CC Starting local server\u2026"})}),$f(t$,{marginBottom:1,children:$f(u$,{dimColor:!0,children:`${"Computer".padEnd(16)}${i.machine??"this computer"} \xB7 ${t.length} of ${i.cap} previews`})}),t.length===0?$f(u$,{dimColor:!0,children:"No previews running yet."}):LE(t$,{flexDirection:"column",children:[LE(t$,{children:[$f(t$,{width:X0i.project,flexShrink:0,marginRight:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"PROJECT"})}),$f(t$,{width:X0i.status,flexShrink:0,marginRight:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"STATUS"})}),$f(t$,{flexGrow:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"PREVIEW URL"})})]}),t.map((u)=>{let l=kNl(u);return LE(t$,{children:[$f(t$,{width:X0i.project,flexShrink:0,marginRight:1,children:$f(u$,{wrap:"truncate-end",children:u.handle})}),$f(t$,{width:X0i.status,flexShrink:0,marginRight:1,children:$f(u$,{color:l.color,wrap:"truncate-end",children:l.text})}),$f(t$,{flexGrow:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:u.previewUrl??"\u2014"})})]},u.handle)})]}),i.daemonError?$f(t$,{marginTop:1,children:LE(u$,{color:"red",children:["\u26A0 ",i.daemonError]})}):null,i.logPath?$f(t$,{marginTop:1,children:LE(u$,{dimColor:!0,children:["Logs: ",i.logPath]})}):null]})}var X0i;var izt=x(()=>{Zji();Tji();Yji();X0i={project:18,status:14}});var uzt={};Pi(uzt,{runLinkCommand:()=>eNl});import{closeSync as zNl,mkdirSync as bNl,openSync as KNl,writeSync as HNl}from"fs";import{homedir as LNl}from"os";import{join as tzt}from"path";function RNl(i,t){let u={log:console.log,warn:console.warn,error:console.error},l=(n)=>{if(t===void 0)return;try{HNl(t,`${Fji(n)}
104664
+ Shutting down\u2026`),h();try{await w.close()}catch{}try{await f.stop()}catch{}try{await n.shutdown()}catch{}try{E.close()}catch{}r(0)};return process.on("SIGINT",()=>void X()),process.on("SIGTERM",()=>void X()),v=()=>{console.log("Disconnect requested from the Studio web UI \u2014 shutting down. Run `bunx decocms link` to reconnect."),X()},w.closed.then(()=>{if(i.monitor?.onCluster?.("closed"),!y)console.error("Cluster connection closed permanently; exiting."),X()}),{stopped:O,stop:X}}var qSt=x(()=>{DAi();RH();dGt();EGt();wGt();TSt();Xji();zSt();KSt();LSt();LH();eSt()});function Fji(i){return i.map((t)=>typeof t==="string"?t:String(t)).join(" ")}var r0i;var Zji=x(()=>{r0i={name:"decocms",version:"3.28.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","test:ct":"playwright test -c playwright-ct.config.ts","test:ct:ui":"playwright test -c playwright-ct.config.ts --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts","smoke:link":"bun run scripts/smoke-link.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.141","@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.80","@ai-sdk/google":"^3.0.80","@ai-sdk/openai":"^3.0.65","@anthropic-ai/sdk":"^0.96.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.17.6","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.7.1","@openrouter/ai-sdk-provider":"^2.9.0","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"3.13.24","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@ai-sdk/react":"^3.0.193","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/harness":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/std":"workspace:*","@floating-ui/react":"^0.27.16","@happy-dom/global-registrator":"^20.9.0","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/experimental-ct-react":"1.59.1","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.100.10","@tanstack/react-router":"1.169.2","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.191","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.22","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","lucide-react":"^0.468.0",marked:"^15.0.6","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});var wL={};Pi(wL,{printBanner:()=>ZNl,bannerLines:()=>VSt,BANNER_LINES:()=>D0i,BANNER_GRADIENT:()=>O0i});function FNl(i){let t=Number.parseInt(i.slice(1),16);return[t>>16&255,t>>8&255,t&255]}function VSt(i){let t=D0i.map((u,l)=>{let[n,f,c]=FNl(O0i[l]);return`\x1B[38;2;${n};${f};${c}m${u}\x1B[39m`});if(i!==void 0)t.push(`\x1B[2m v${i}\x1B[22m`);return t}function ZNl(i){console.log("");for(let t of VSt(i))console.log(t);console.log("")}var D0i,O0i;var GW=x(()=>{D0i=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],O0i=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"]});import{Box as TNl,Text as mSt}from"ink";import{jsx as INl,jsxs as aSt}from"react/jsx-runtime";function y0i({version:i}){return aSt(TNl,{flexDirection:"column",marginTop:1,children:[D0i.map((t,u)=>INl(mSt,{color:O0i[u],children:t},u)),aSt(mSt,{dimColor:!0,children:[" v",i]})]})}var Tji=x(()=>{GW()});var sSt={};Pi(sSt,{subscribeLinkState:()=>Bji,setMachine:()=>PNl,setLogPath:()=>ANl,setIngress:()=>YNl,setDaemonError:()=>GNl,setClusterUrl:()=>BNl,setCluster:()=>QNl,pushSandboxEvent:()=>WNl,getLinkState:()=>Qji,applySandboxEvent:()=>oSt});function oSt(i,t){let u=new Map(i);if(t.phase==="evicted"||t.phase==="deleted")return u.delete(t.handle),u;let l=u.get(t.handle);return u.set(t.handle,{handle:t.handle,port:t.port??l?.port??null,previewUrl:t.previewUrl??l?.previewUrl??null,status:t.phase,error:t.phase==="failed"?t.error??"failed":null}),u}function V8(){for(let i of Iji)i()}function Qji(){return i$}function Bji(i){return Iji.add(i),()=>Iji.delete(i)}function QNl(i){i$={...i$,cluster:i},V8()}function BNl(i){i$={...i$,clusterUrl:i},V8()}function YNl(i,t){i$={...i$,ingressPort:i,ingressUrl:t},V8()}function PNl(i){i$={...i$,machine:i},V8()}function GNl(i){i$={...i$,daemonError:i},V8()}function ANl(i){i$={...i$,logPath:i},V8()}function WNl(i){i$={...i$,sandboxes:oSt(i$.sandboxes,i)},V8()}var i$,Iji;var Yji=x(()=>{i$={cluster:"connecting",clusterUrl:null,ingressUrl:null,ingressPort:null,machine:null,cap:20,sandboxes:new Map,daemonError:null,logPath:null},Iji=new Set});var pSt={};Pi(pSt,{LinkApp:()=>SNl});import{Box as t$,Text as u$}from"ink";import{useSyncExternalStore as jNl}from"react";import{jsx as $f,jsxs as LE}from"react/jsx-runtime";function kNl(i){if(i.status==="ready")return{color:"green",text:"\u25CF Live"};if(i.status==="spawning")return{color:"yellow",text:"\u25CC Starting\u2026"};return{color:"red",text:`\u2717 Error: ${i.error??""}`}}function SNl(){let i=jNl(Bji,Qji),t=[...i.sandboxes.values()].sort((u,l)=>u.handle.localeCompare(l.handle));return LE(t$,{flexDirection:"column",children:[$f(y0i,{version:r0i.version}),$f(t$,{marginBottom:1,children:$f(u$,{dimColor:!0,children:"\u2500".repeat(80)})}),$f(t$,{children:i.cluster==="linked"?LE(u$,{color:"green",children:["\u2713 Connected to ",i.clusterUrl??"deco"]}):i.cluster==="connecting"?LE(u$,{color:"yellow",children:["\u25CC Connecting to ",i.clusterUrl??"deco","\u2026"]}):LE(u$,{color:"red",children:["\u2717 Disconnected from ",i.clusterUrl??"deco"]})}),$f(t$,{children:i.ingressUrl?LE(u$,{color:"green",children:["\u2713 Serving at ",i.ingressUrl]}):$f(u$,{dimColor:!0,children:"\u25CC Starting local server\u2026"})}),$f(t$,{marginBottom:1,children:$f(u$,{dimColor:!0,children:`${"Computer".padEnd(16)}${i.machine??"this computer"} \xB7 ${t.length} of ${i.cap} previews`})}),t.length===0?$f(u$,{dimColor:!0,children:"No previews running yet."}):LE(t$,{flexDirection:"column",children:[LE(t$,{children:[$f(t$,{width:X0i.project,flexShrink:0,marginRight:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"PROJECT"})}),$f(t$,{width:X0i.status,flexShrink:0,marginRight:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"STATUS"})}),$f(t$,{flexGrow:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:"PREVIEW URL"})})]}),t.map((u)=>{let l=kNl(u);return LE(t$,{children:[$f(t$,{width:X0i.project,flexShrink:0,marginRight:1,children:$f(u$,{wrap:"truncate-end",children:u.handle})}),$f(t$,{width:X0i.status,flexShrink:0,marginRight:1,children:$f(u$,{color:l.color,wrap:"truncate-end",children:l.text})}),$f(t$,{flexGrow:1,children:$f(u$,{dimColor:!0,wrap:"truncate-end",children:u.previewUrl??"\u2014"})})]},u.handle)})]}),i.daemonError?$f(t$,{marginTop:1,children:LE(u$,{color:"red",children:["\u26A0 ",i.daemonError]})}):null,i.logPath?$f(t$,{marginTop:1,children:LE(u$,{dimColor:!0,children:["Logs: ",i.logPath]})}):null]})}var X0i;var izt=x(()=>{Zji();Tji();Yji();X0i={project:18,status:14}});var uzt={};Pi(uzt,{runLinkCommand:()=>eNl});import{closeSync as zNl,mkdirSync as bNl,openSync as KNl,writeSync as HNl}from"fs";import{homedir as LNl}from"os";import{join as tzt}from"path";function RNl(i,t){let u={log:console.log,warn:console.warn,error:console.error},l=(n)=>{if(t===void 0)return;try{HNl(t,`${Fji(n)}
104665
104665
  `)}catch{}};return console.log=(...n)=>l(n),console.warn=(...n)=>l(n),console.error=(...n)=>{l(n),i(Fji(n))},()=>{console.log=u.log,console.warn=u.warn,console.error=u.error}}async function CNl(i,t){let u;try{u=await fetch(`${i}/api/links/me`,{headers:{authorization:`Bearer ${t}`},signal:AbortSignal.timeout(1e4)})}catch{return}if(u.status===401||u.status===403)throw Error(`Authentication rejected by ${i} \u2014 the session token was not accepted. `+`Run \`deco auth login --target ${i}\` and try again.`)}async function eNl(i={}){let t=i.port??5174,u=i.dataDir??process.env.DATA_DIR??process.env.DECOCMS_HOME??tzt(LNl(),"deco"),l=i.clusterBaseUrl??process.env.MESH_CLUSTER_URL??"https://studio.decocms.com",n,f;try{let c=await ili({dataDir:u,intent:"Link",target:l});if(process.env.DECOCMS_LINK_MANAGED!=="1")await CNl(l,c.accessToken);let $;if(i.tui){let{render:g}=await import("ink"),{createElement:h}=await import("react"),{LinkApp:E}=await Promise.resolve().then(() => (izt(),pSt)),{pushSandboxEvent:v,setCluster:w,setClusterUrl:r,setDaemonError:O,setIngress:y,setLogPath:X,setMachine:N}=await Promise.resolve().then(() => (Yji(),sSt));bNl(u,{recursive:!0});let U=tzt(u,"link.log");f=KNl(U,"w"),X(U),r(l),w("connecting"),$={onEvent:(J)=>v(J),onIngress:(J)=>y(J,`http://127.0.0.1:${J}`),onCluster:(J)=>w(J),onMachine:(J)=>N(J)},n=RNl(O,f),g(h(E),{patchConsole:!1})}else if(i.banner!==!1){let{printBanner:g}=await Promise.resolve().then(() => (GW(),wL));g(i.version??"0.0.0")}let d=process.env.DECOCMS_LINK_MANAGED!=="1";return await(await MSt({port:t,clusterBaseUrl:l,dataDir:u,session:c,monitor:$,logFd:f,perSandboxLogs:d,hotReload:i.hotReload})).stopped}catch(c){return n?.(),console.error(c instanceof Error?c.message:String(c)),1}finally{if(n?.(),f!==void 0)try{zNl(f)}catch{}}}var lzt=x(()=>{rAi();qSt()});var kji={};Pi(kji,{resolveDevLinkClusterUrl:()=>mNl,populateDevLinkToxiProxy:()=>_zt,isDevLinkToxiProxyEnabled:()=>VNl,ensureDevLinkToxiProxy:()=>iJl,buildDevLinkToxiProxyConfig:()=>$zt,DEV_LINK_TOXIPROXY_SERVICE_NAME:()=>fzt,DEV_LINK_TOXIPROXY_PROXY_NAME:()=>czt});function VNl(i=process.env){return i.DECO_DEV_LINK_TOXIPROXY==="1"}function Pji(i,t){if(!Number.isInteger(i)||i<1||i>65535)throw Error(`${t} must be an integer port in 1..65535`);return i}function $zt(i){let t=new URL(i.serverUrl);if(t.protocol!=="http:")throw Error("DECO_DEV_LINK_TOXIPROXY only supports http local Studio URLs");let u=Pji(i.apiPort,"apiPort"),l=Pji(i.listenPort,"listenPort");if(t.port.length===0)throw Error("serverUrl must include an explicit valid port");let n=Pji(Number.parseInt(t.port,10),"upstreamPort"),f=`http://127.0.0.1:${n}`,c=`http://127.0.0.1:${l}`;return{serviceName:fzt,proxyName:czt,apiUrl:`http://127.0.0.1:${u}`,listen:`0.0.0.0:${l}`,upstream:`host.docker.internal:${n}`,publicTargetUrl:f,clusterUrl:c,logLine:`[dev-link-toxiproxy] ready: ${c} -> ${f}`}}function mNl(i){return i.toxiproxy?.clusterUrl??i.serverUrl}async function Gji(i,t,u){if(i.ok)return;let l=await i.text();throw Error(`ToxiProxy ${t} failed for ${u}: status=${i.status} statusText=${i.statusText} body=${l}`)}function jji(i){if(i instanceof Error)return i.name==="Error"?i.message:`${i.name}: ${i.message}`;return String(i)}function dzt(i){if(!(i instanceof Error))return!1;if(i.name==="TimeoutError")return!0;return dzt(i.cause)}async function Aji(i,t,u,l){try{return await i(u,l)}catch(n){throw Error(`ToxiProxy ${t} failed for ${u}: ${jji(n)}`,{cause:n})}}async function _zt(i,t=fetch){let u=`${i.apiUrl}/reset`,l=await Aji(t,"reset",u,{method:"POST"});await Gji(l,"reset",u);let n=`${i.apiUrl}/populate`,f=await Aji(t,"populate",n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([{name:i.proxyName,listen:i.listen,upstream:i.upstream,enabled:!0}])});await Gji(f,"populate",n)}async function aNl(i,t){let u=`${i.apiUrl}/version`;try{await J3(async()=>{let l=await Aji(t,"readiness check",u,{method:"GET",signal:AbortSignal.timeout(qNl)});await Gji(l,"readiness check",u)},{maxAttempts:MNl,minTimeout:nzt,maxTimeout:nzt,multiplier:1,jitter:0,isRetriable:(l)=>!dzt(l)})}catch(l){let n=l instanceof F6?l.cause:l;throw Error(`ToxiProxy API did not become ready at ${u}: ${jji(n)}`,{cause:n})}}async function oNl(i){if(i===null)return"";return await new Response(i).text()}async function Wji(i,t={}){let u=["docker",...i].join(" "),l=(()=>{try{return Bun.spawn(["docker",...i],{stdout:"ignore",stderr:"pipe"})}catch($){throw Error(`Docker command failed to start (${u}): ${jji($)}`,{cause:$})}})(),[n,f]=await Promise.all([l.exited,oNl(l.stderr)]);if(n===0||t.ignoreFailure===!0)return;let c=f.trim().length>0?`: ${f.trim()}`:"";throw Error(`Docker command failed (${u}) with exit ${n}${c}`)}async function sNl(i,t){let u=`deco-dev-link-toxiproxy-${i}`;await Wji(["rm","-f",u],{ignoreFailure:!0}),await Wji(["run","--rm","-d","--name",u,"-p",`127.0.0.1:${i}:8474`,"-p",`127.0.0.1:${t}:${t}`,"ghcr.io/shopify/toxiproxy:2.12.0","-host=0.0.0.0"])}async function pNl(i,t){let u=`deco-dev-link-toxiproxy-${i}`;await Wji(["rm","-f",u],{ignoreFailure:!0})}async function iJl(i){let t=$zt(i),u=i.startDaemon??sNl,l=i.stopDaemon??(i.startDaemon===void 0?pNl:void 0);await u(i.apiPort,i.listenPort);let n=i.fetchImpl??fetch;try{await aNl(t,n),await _zt(t,n)}catch(f){if(l!==void 0)try{await l(i.apiPort,i.listenPort)}catch{}throw f}return{config:t,stop:async()=>{if(l!==void 0)await l(i.apiPort,i.listenPort)}}}var fzt="ToxiProxy",czt="dev_link_studio",MNl=20,nzt=100,qNl=100;var Sji=x(()=>{H1()});var gzt={};Pi(gzt,{migrateBetterAuth:()=>zji});import{getMigrations as tJl}from"better-auth/db";import{sso as uJl}from"@better-auth/sso";import{organization as lJl}from"@decocms/better-auth/plugins";import{admin as nJl,apiKey as fJl,jwt as cJl,magicLink as $Jl,mcp as dJl,openAPI as _Jl}from"better-auth/plugins";import{emailOTP as gJl}from"better-auth/plugins/email-otp";async function zji(i){let u={database:SH(i||Gx()),plugins:[lJl({dynamicAccessControl:{enabled:!0,enableCustomResources:!0}}),nJl(),fJl(),cJl(),_Jl(),dJl({loginPage:"/login"}),uJl(),$Jl({sendMagicLink:async()=>{}}),gJl({sendVerificationOTP:async()=>{}})]},{toBeAdded:l,toBeCreated:n,runMigrations:f}=await tJl(u);if(!l.length&&!n.length)return"up to date";return await f(),`${n.length+l.length} table(s) migrated`}var bji=x(()=>{k$()});var Kji={};Pi(Kji,{up:()=>hJl,down:()=>EJl});import{sql as RE}from"kysely";async function hJl(i){await i.schema.createTable("connections").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organizationId","text",(t)=>t.notNull().references("organization.id").onDelete("cascade")).addColumn("createdById","text",(t)=>t.notNull().references("user.id").onDelete("cascade")).addColumn("name","text",(t)=>t.notNull()).addColumn("description","text").addColumn("icon","text").addColumn("appName","text").addColumn("appId","text").addColumn("connectionType","text",(t)=>t.notNull()).addColumn("connectionUrl","text",(t)=>t.notNull()).addColumn("connectionToken","text").addColumn("connectionHeaders","text").addColumn("oauthConfig","text").addColumn("metadata","text").addColumn("tools","text").addColumn("bindings","text").addColumn("status","text",(t)=>t.notNull().defaultTo("active")).addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).addColumn("updatedAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("api_keys").addColumn("id","text",(t)=>t.primaryKey()).addColumn("userId","text",(t)=>t.notNull().references("user.id").onDelete("cascade")).addColumn("name","text",(t)=>t.notNull()).addColumn("hashedKey","text",(t)=>t.notNull().unique()).addColumn("permissions","text",(t)=>t.notNull()).addColumn("expiresAt","text").addColumn("remaining","integer").addColumn("metadata","text").addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).addColumn("updatedAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("audit_logs").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organizationId","text").addColumn("userId","text",(t)=>t.references("user.id").onDelete("set null")).addColumn("connectionId","text",(t)=>t.references("connections.id").onDelete("set null")).addColumn("toolName","text",(t)=>t.notNull()).addColumn("allowed","integer",(t)=>t.notNull()).addColumn("duration","integer").addColumn("timestamp","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).addColumn("requestMetadata","text").execute(),await i.schema.createTable("oauth_clients").addColumn("id","text",(t)=>t.primaryKey()).addColumn("clientId","text",(t)=>t.notNull().unique()).addColumn("clientSecret","text").addColumn("clientName","text",(t)=>t.notNull()).addColumn("redirectUris","text",(t)=>t.notNull()).addColumn("grantTypes","text",(t)=>t.notNull()).addColumn("scope","text").addColumn("clientUri","text").addColumn("logoUri","text").addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("oauth_authorization_codes").addColumn("code","text",(t)=>t.primaryKey()).addColumn("clientId","text",(t)=>t.notNull().references("oauth_clients.clientId").onDelete("cascade")).addColumn("userId","text",(t)=>t.notNull().references("user.id").onDelete("cascade")).addColumn("redirectUri","text",(t)=>t.notNull()).addColumn("scope","text").addColumn("codeChallenge","text").addColumn("codeChallengeMethod","text").addColumn("expiresAt","text",(t)=>t.notNull()).addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("oauth_refresh_tokens").addColumn("token","text",(t)=>t.primaryKey()).addColumn("clientId","text",(t)=>t.notNull().references("oauth_clients.clientId").onDelete("cascade")).addColumn("userId","text",(t)=>t.notNull().references("user.id").onDelete("cascade")).addColumn("scope","text").addColumn("expiresAt","text").addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("downstream_tokens").addColumn("id","text",(t)=>t.primaryKey()).addColumn("connectionId","text",(t)=>t.notNull().references("connections.id").onDelete("cascade")).addColumn("userId","text",(t)=>t.references("user.id").onDelete("cascade")).addColumn("accessToken","text",(t)=>t.notNull()).addColumn("refreshToken","text").addColumn("scope","text").addColumn("expiresAt","text").addColumn("createdAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).addColumn("updatedAt","text",(t)=>t.notNull().defaultTo(RE`CURRENT_TIMESTAMP`)).execute(),await i.schema.createIndex("idx_connections_organizationId").on("connections").column("organizationId").execute(),await i.schema.createIndex("idx_audit_logs_organizationId").on("audit_logs").column("organizationId").execute(),await i.schema.createIndex("idx_audit_logs_userId").on("audit_logs").column("userId").execute(),await i.schema.createIndex("idx_audit_logs_timestamp").on("audit_logs").column("timestamp").execute()}async function EJl(i){await i.schema.dropTable("downstream_tokens").execute(),await i.schema.dropTable("oauth_refresh_tokens").execute(),await i.schema.dropTable("oauth_authorization_codes").execute(),await i.schema.dropTable("oauth_clients").execute(),await i.schema.dropTable("audit_logs").execute(),await i.schema.dropTable("api_keys").execute(),await i.schema.dropTable("connections").execute()}var hzt=()=>{};var Hji={};Pi(Hji,{up:()=>vJl,down:()=>wJl});import{sql as Ezt}from"kysely";async function vJl(i){await i.schema.createTable("organization_settings").addColumn("organizationId","text",(t)=>t.primaryKey().references("organization.id").onDelete("cascade")).addColumn("modelsBindingConnectionId","text",(t)=>t.references("connections.id").onDelete("set null")).addColumn("createdAt","text",(t)=>t.notNull().defaultTo(Ezt`CURRENT_TIMESTAMP`)).addColumn("updatedAt","text",(t)=>t.notNull().defaultTo(Ezt`CURRENT_TIMESTAMP`)).execute()}async function wJl(i){await i.schema.dropTable("organization_settings").execute()}var vzt=()=>{};var Lji={};Pi(Lji,{up:()=>xJl,down:()=>rJl});async function xJl(i){await i.schema.alterTable("connections").renameColumn("name","title").execute(),await i.schema.alterTable("connections").renameColumn("createdById","created_by").execute(),await i.schema.alterTable("connections").renameColumn("createdAt","created_at").execute(),await i.schema.alterTable("connections").renameColumn("updatedAt","updated_at").execute(),await i.schema.alterTable("connections").renameColumn("organizationId","organization_id").execute(),await i.schema.alterTable("connections").renameColumn("connectionType","connection_type").execute(),await i.schema.alterTable("connections").renameColumn("connectionUrl","connection_url").execute(),await i.schema.alterTable("connections").renameColumn("connectionToken","connection_token").execute(),await i.schema.alterTable("connections").renameColumn("connectionHeaders","connection_headers").execute(),await i.schema.alterTable("connections").renameColumn("oauthConfig","oauth_config").execute(),await i.schema.alterTable("connections").renameColumn("appName","app_name").execute(),await i.schema.alterTable("connections").renameColumn("appId","app_id").execute()}async function rJl(i){await i.schema.alterTable("connections").renameColumn("title","name").execute(),await i.schema.alterTable("connections").renameColumn("created_by","createdById").execute(),await i.schema.alterTable("connections").renameColumn("created_at","createdAt").execute(),await i.schema.alterTable("connections").renameColumn("updated_at","updatedAt").execute(),await i.schema.alterTable("connections").renameColumn("organization_id","organizationId").execute(),await i.schema.alterTable("connections").renameColumn("connection_type","connectionType").execute(),await i.schema.alterTable("connections").renameColumn("connection_url","connectionUrl").execute(),await i.schema.alterTable("connections").renameColumn("connection_token","connectionToken").execute(),await i.schema.alterTable("connections").renameColumn("connection_headers","connectionHeaders").execute(),await i.schema.alterTable("connections").renameColumn("oauth_config","oauthConfig").execute(),await i.schema.alterTable("connections").renameColumn("app_name","appName").execute(),await i.schema.alterTable("connections").renameColumn("app_id","appId").execute()}var Rji={};Pi(Rji,{up:()=>DJl,down:()=>OJl});async function DJl(i){await i.schema.createTable("organization_settings_new").addColumn("organizationId","text",(t)=>t.primaryKey().references("organization.id").onDelete("cascade")).addColumn("createdAt","text",(t)=>t.notNull()).addColumn("updatedAt","text",(t)=>t.notNull()).execute(),await i.insertInto("organization_settings_new").columns(["organizationId","createdAt","updatedAt"]).expression((t)=>t.selectFrom("organization_settings").select(["organizationId","createdAt","updatedAt"])).execute(),await i.schema.dropTable("organization_settings").execute(),await i.schema.alterTable("organization_settings_new").renameTo("organization_settings").execute()}async function OJl(i){await i.schema.createTable("organization_settings_new").addColumn("organizationId","text",(t)=>t.primaryKey().references("organization.id").onDelete("cascade")).addColumn("modelsBindingConnectionId","text",(t)=>t.references("connections.id").onDelete("set null")).addColumn("createdAt","text",(t)=>t.notNull()).addColumn("updatedAt","text",(t)=>t.notNull()).execute(),await i.insertInto("organization_settings_new").columns(["organizationId","modelsBindingConnectionId","createdAt","updatedAt"]).expression((t)=>t.selectFrom("organization_settings").select(["organizationId",t.val(null).as("modelsBindingConnectionId"),"createdAt","updatedAt"])).execute(),await i.schema.dropTable("organization_settings").execute(),await i.schema.alterTable("organization_settings_new").renameTo("organization_settings").execute()}var Cji={};Pi(Cji,{up:()=>yJl,down:()=>XJl});async function yJl(i){await i.schema.alterTable("connections").addColumn("configuration_state","text").execute(),await i.schema.alterTable("connections").addColumn("configuration_scopes","text").execute()}async function XJl(i){await i.schema.alterTable("connections").dropColumn("configuration_state").execute(),await i.schema.alterTable("connections").dropColumn("configuration_scopes").execute()}var eji={};Pi(eji,{up:()=>JJl,down:()=>UJl});import{sql as NJl}from"kysely";async function JJl(i){await i.schema.alterTable("organization_settings").addColumn("sidebar_items",NJl`text`).execute()}async function UJl(i){await i.schema.alterTable("organization_settings").dropColumn("sidebar_items").execute()}var wzt=()=>{};var Mji={};Pi(Mji,{up:()=>FJl,down:()=>ZJl});async function FJl(i){await i.schema.createTable("monitoring_logs").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organization_id","text",(t)=>t.notNull().references("organization.id").onDelete("cascade")).addColumn("connection_id","text",(t)=>t.notNull().references("connections.id").onDelete("cascade")).addColumn("connection_title","text",(t)=>t.notNull()).addColumn("tool_name","text",(t)=>t.notNull()).addColumn("input","text",(t)=>t.notNull()).addColumn("output","text",(t)=>t.notNull()).addColumn("is_error","integer",(t)=>t.notNull()).addColumn("error_message","text").addColumn("duration_ms","integer",(t)=>t.notNull()).addColumn("timestamp","text",(t)=>t.notNull()).addColumn("user_id","text").addColumn("request_id","text",(t)=>t.notNull()).execute(),await i.schema.createIndex("monitoring_logs_org_timestamp").on("monitoring_logs").columns(["organization_id","timestamp"]).execute(),await i.schema.createIndex("monitoring_logs_connection_timestamp").on("monitoring_logs").columns(["connection_id","timestamp"]).execute(),await i.schema.createIndex("monitoring_logs_is_error").on("monitoring_logs").columns(["organization_id","is_error","timestamp"]).execute()}async function ZJl(i){await i.schema.dropIndex("monitoring_logs_is_error").execute(),await i.schema.dropIndex("monitoring_logs_connection_timestamp").execute(),await i.schema.dropIndex("monitoring_logs_org_timestamp").execute(),await i.schema.dropTable("monitoring_logs").execute()}var qji={};Pi(qji,{up:()=>TJl,down:()=>IJl});import{sql as xL}from"kysely";async function TJl(i){await i.schema.createTable("events").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organization_id","text",(t)=>t.notNull().references("organization.id").onDelete("cascade")).addColumn("type","text",(t)=>t.notNull()).addColumn("source","text",(t)=>t.notNull()).addColumn("specversion","text",(t)=>t.notNull().defaultTo("1.0")).addColumn("subject","text").addColumn("time","text",(t)=>t.notNull()).addColumn("datacontenttype","text",(t)=>t.notNull().defaultTo("application/json")).addColumn("dataschema","text").addColumn("data","text").addColumn("cron","varchar(255)").addColumn("status","text",(t)=>t.notNull().defaultTo("pending")).addColumn("attempts","integer",(t)=>t.notNull().defaultTo(0)).addColumn("last_error","text").addColumn("next_retry_at","text").addColumn("created_at","text",(t)=>t.notNull().defaultTo(xL`CURRENT_TIMESTAMP`)).addColumn("updated_at","text",(t)=>t.notNull().defaultTo(xL`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("event_subscriptions").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organization_id","text",(t)=>t.notNull().references("organization.id").onDelete("cascade")).addColumn("connection_id","text",(t)=>t.notNull().references("connections.id").onDelete("cascade")).addColumn("publisher","text").addColumn("event_type","text",(t)=>t.notNull()).addColumn("filter","text").addColumn("enabled","integer",(t)=>t.notNull().defaultTo(1)).addColumn("created_at","text",(t)=>t.notNull().defaultTo(xL`CURRENT_TIMESTAMP`)).addColumn("updated_at","text",(t)=>t.notNull().defaultTo(xL`CURRENT_TIMESTAMP`)).execute(),await i.schema.createTable("event_deliveries").addColumn("id","text",(t)=>t.primaryKey()).addColumn("event_id","text",(t)=>t.notNull()).addColumn("subscription_id","text",(t)=>t.notNull().references("event_subscriptions.id").onDelete("cascade")).addColumn("status","text",(t)=>t.notNull().defaultTo("pending")).addColumn("attempts","integer",(t)=>t.notNull().defaultTo(0)).addColumn("last_error","text").addColumn("delivered_at","text").addColumn("next_retry_at","text").addColumn("created_at","text",(t)=>t.notNull().defaultTo(xL`CURRENT_TIMESTAMP`)).execute(),await i.schema.createIndex("idx_events_org_status").on("events").columns(["organization_id","status"]).execute(),await i.schema.createIndex("idx_events_source").on("events").columns(["source"]).execute(),await i.schema.createIndex("idx_events_type").on("events").columns(["type"]).execute(),await i.schema.createIndex("idx_events_retry").on("events").columns(["status","next_retry_at"]).execute(),await i.schema.createIndex("idx_subscriptions_connection").on("event_subscriptions").columns(["connection_id"]).execute(),await i.schema.createIndex("idx_subscriptions_type").on("event_subscriptions").columns(["event_type"]).execute(),await i.schema.createIndex("idx_subscriptions_org_enabled").on("event_subscriptions").columns(["organization_id","enabled"]).execute(),await i.schema.createIndex("idx_subscriptions_unique").on("event_subscriptions").columns(["connection_id","event_type","publisher","filter"]).unique().execute(),await i.schema.createIndex("idx_deliveries_event").on("event_deliveries").columns(["event_id"]).execute(),await i.schema.createIndex("idx_deliveries_subscription_status").on("event_deliveries").columns(["subscription_id","status"]).execute(),await i.schema.createIndex("idx_deliveries_retry").on("event_deliveries").columns(["status","next_retry_at"]).execute()}async function IJl(i){await i.schema.dropIndex("idx_deliveries_retry").execute(),await i.schema.dropIndex("idx_deliveries_subscription_status").execute(),await i.schema.dropIndex("idx_deliveries_event").execute(),await i.schema.dropIndex("idx_subscriptions_unique").execute(),await i.schema.dropIndex("idx_subscriptions_org_enabled").execute(),await i.schema.dropIndex("idx_subscriptions_type").execute(),await i.schema.dropIndex("idx_subscriptions_connection").execute(),await i.schema.dropIndex("idx_events_retry").execute(),await i.schema.dropIndex("idx_events_type").execute(),await i.schema.dropIndex("idx_events_source").execute(),await i.schema.dropIndex("idx_events_org_status").execute(),await i.schema.dropTable("event_deliveries").execute(),await i.schema.dropTable("event_subscriptions").execute(),await i.schema.dropTable("events").execute()}var xzt=()=>{};var Vji={};Pi(Vji,{up:()=>BJl,down:()=>YJl});import{sql as QJl}from"kysely";async function BJl(i){await i.schema.dropTable("audit_logs").ifExists().execute()}async function YJl(i){await i.schema.createTable("audit_logs").ifNotExists().addColumn("id","text",(t)=>t.primaryKey()).addColumn("organizationId","text").addColumn("userId","text",(t)=>t.references("user.id").onDelete("set null")).addColumn("connectionId","text",(t)=>t.references("connections.id").onDelete("set null")).addColumn("toolName","text",(t)=>t.notNull()).addColumn("allowed","integer",(t)=>t.notNull()).addColumn("duration","integer").addColumn("timestamp","text",(t)=>t.notNull().defaultTo(QJl`CURRENT_TIMESTAMP`)).addColumn("requestMetadata","text").execute(),await i.schema.createIndex("idx_audit_logs_organizationId").on("audit_logs").column("organizationId").execute(),await i.schema.createIndex("idx_audit_logs_userId").on("audit_logs").column("userId").execute(),await i.schema.createIndex("idx_audit_logs_timestamp").on("audit_logs").column("timestamp").execute()}var rzt=()=>{};var mji={};Pi(mji,{up:()=>PJl,down:()=>GJl});import{sql as N0i}from"kysely";async function PJl(i){await i.schema.createTable("gateways").addColumn("id","text",(t)=>t.primaryKey()).addColumn("organization_id","text",(t)=>t.notNull().references("organization.id").onDelete("cascade")).addColumn("title","text",(t)=>t.notNull()).addColumn("description","text").addColumn("tool_selection_strategy","text").addColumn("status","text",(t)=>t.notNull().defaultTo("active")).addColumn("is_default","integer",(t)=>t.notNull().defaultTo(0)).addColumn("created_at","text",(t)=>t.notNull().defaultTo(N0i`CURRENT_TIMESTAMP`)).addColumn("updated_at","text",(t)=>t.notNull().defaultTo(N0i`CURRENT_TIMESTAMP`)).addColumn("created_by","text",(t)=>t.notNull().references("user.id").onDelete("cascade")).addColumn("updated_by","text").execute(),await i.schema.createTable("gateway_connections").addColumn("id","text",(t)=>t.primaryKey()).addColumn("gateway_id","text",(t)=>t.notNull().references("gateways.id").onDelete("cascade")).addColumn("connection_id","text",(t)=>t.notNull().references("connections.id").onDelete("cascade")).addColumn("selected_tools","text").addColumn("created_at","text",(t)=>t.notNull().defaultTo(N0i`CURRENT_TIMESTAMP`)).execute(),await i.schema.createIndex("idx_gateways_org").on("gateways").columns(["organization_id"]).execute(),await i.schema.createIndex("idx_gateways_org_status").on("gateways").columns(["organization_id","status"]).execute(),await N0i`CREATE UNIQUE INDEX idx_gateways_default_per_org ON gateways (organization_id) WHERE is_default = 1`.execute(i),await i.schema.createIndex("idx_gateway_connections_gateway").on("gateway_connections").columns(["gateway_id"]).execute(),await i.schema.createIndex("idx_gateway_connections_connection").on("gateway_connections").columns(["connection_id"]).execute(),await i.schema.createIndex("idx_gateway_connections_unique").on("gateway_connections").columns(["gateway_id","connection_id"]).unique().execute()}async function GJl(i){await i.schema.dropIndex("idx_gateway_connections_unique").execute(),await i.schema.dropIndex("idx_gateway_connections_connection").execute(),await i.schema.dropIndex("idx_gateway_connections_gateway").execute(),await i.schema.dropIndex("idx_gateways_default_per_org").execute(),await i.schema.dropIndex("idx_gateways_org_status").execute(),await i.schema.dropIndex("idx_gateways_org").execute(),await i.schema.dropTable("gateway_connections").execute(),await i.schema.dropTable("gateways").execute()}var Dzt=()=>{};var aji={};Pi(aji,{up:()=>AJl,down:()=>WJl});async function AJl(i){await i.schema.alterTable("gateways").addColumn("icon","text").execute()}async function WJl(i){await i.schema.alterTable("gateways").dropColumn("icon").execute()}var oji={};Pi(oji,{up:()=>jJl,down:()=>kJl});import{sql as J0i}from"kysely";async function jJl(i){await i.schema.alterTable("gateways").addColumn("tool_selection_mode","text",(t)=>t.notNull().defaultTo("inclusion")).execute(),await J0i`
104666
104666
  UPDATE gateways
104667
104667
  SET tool_selection_mode = CASE
@@ -106636,10 +106636,10 @@ Git operations live in two layers:
106636
106636
  - PR-level operations (open, close, merge, review, comment) \u2192 GitHub
106637
106637
  MCP tools. For rebasing a branch on its base, use git CLI \u2014 never
106638
106638
  \`update_pull_request_branch\`, which merges instead of rebasing.
106639
- </repo-environment>`}var M2=50,SM=30,rS=15,Fy="New chat";function O$i(i,t){let u=i?.maxOutputTokens??Uf0,l=i?.contextWindow;if(!l)return u;let n=l-t*2;return Math.max(1024,Math.min(u,n))}var bM=()=>`msg_${eE()}`,Uf0=32768,y$i=300000;var Zy=x(()=>{DL()});function Gdu(i){return`<organization-filesystem>
106639
+ </repo-environment>`}var M2=50,SM=30,rS=15,Fy="New chat";function O$i(i,t){let u=i?.maxOutputTokens??Uf0,l=i?.contextWindow;if(!l)return u;let n=l-t*2;return Math.max(1024,Math.min(u,n))}var bM=()=>`msg_${eE()}`,Uf0=32768,y$i=300000;var Zy=x(()=>{DL()});function Gdu(i,t){let u=i.length>0?`Available sets: ${i.join(", ")}.`:"No sets are configured on this deployment.";return`<organization-filesystem>
106640
106640
  The organization filesystem is mounted at \`org/\` in your sandbox (when available):
106641
- - the folder named after your organization (its slug \u2014 run \`ls org/\` to see it) \u2014 the org's shared home folder, editable and shared across every agent, member, and run. Organize it freely with subfolders. Check it for relevant context before starting non-trivial work, and record durable knowledge as you learn it: decisions, preferences, project facts, gotchas. Prefer small focused markdown files over one big log, and update stale notes instead of appending duplicates.
106642
- - \`org/public/<set>/\` \u2014 curated read-only skill sets. ${i.length>0?`Available sets: ${i.join(", ")}.`:"No sets are configured on this deployment."} Each skill is a folder with a SKILL.md \u2014 read it before applying the skill.
106641
+ - ${t?`\`org/${t}/\``:"the folder named after your organization (its slug is the single entry under `org/`)"} \u2014 the org's shared home folder, editable and shared across every agent, member, and run. Organize it freely with subfolders. Consult it only when a task needs background you don't already have (past decisions, preferences, project facts, gotchas) \u2014 then read it first. Do NOT browse it in response to greetings, small talk, or questions you can answer directly. Record durable knowledge here as you learn it; prefer small focused markdown files over one big log, and update stale notes instead of appending duplicates.
106642
+ - \`org/public/<set>/\` \u2014 curated read-only skill sets. ${u} Each skill is a folder with a SKILL.md \u2014 read it before applying the skill.
106643
106643
  - \`org/upload/\` \u2014 files the user attached to this conversation are already here; read them directly (no copy step needed).
106644
106644
  - \`org/output/\` \u2014 write final deliverables here; they are shared back to the organization under this run's folder.
106645
106645
 
@@ -107979,7 +107979,7 @@ You're talking to ${f}${c}. Address them by name when it's natural.`)}let n=u.re
107979
107979
 
107980
107980
  ${l.join(`
107981
107981
 
107982
- `)}`}async function pBu(i){let t=[],u=[],l=(n,f)=>{if(!f?.trim())return;t.push(f),u.push(n)};if(l("base",r$i()),i.kind==="agent"&&i.planMode){let{resolveModeConfig:n}=await Promise.resolve().then(() => (y7i(),hQu)),f=n("plan",{isCliAgent:!1});l("planMode",f.planPrompt)}if(i.virtualMcp.repo)l("repoEnv",Pdu(i.virtualMcp.repo));if(l("orgFs",Gdu(Zh().map((n)=>n.set))),i.kind==="agent"){if(i.isDecopilot)l("identity",D$i())}else l("identity",ZY0);if(l("prompts",await qBu(i.ctx,i.organization,i.passthroughClient)),i.kind==="agent"&&i.userContext?.agents)l("agents",aBu(i.userContext.agents,i.virtualMcp.id));if(l("connections",await VBu(i.ctx,i.organization,i.connectionsData)),l("todoWrite",zM()),l("agentInstructions",i.agentInstructions),i.kind==="agent"&&i.user)l("userContext",sBu({user:i.user,currentThreadId:i.currentThreadId,userContext:i.userContext??{}}));return Q7i(t,i.date??new Date)}var ZY0=`You are a focused subtask agent delegated a specific task by a parent agent. You are NOT the parent agent.
107982
+ `)}`}async function pBu(i){let t=[],u=[],l=(n,f)=>{if(!f?.trim())return;t.push(f),u.push(n)};if(l("base",r$i()),i.kind==="agent"&&i.planMode){let{resolveModeConfig:n}=await Promise.resolve().then(() => (y7i(),hQu)),f=n("plan",{isCliAgent:!1});l("planMode",f.planPrompt)}if(i.virtualMcp.repo)l("repoEnv",Pdu(i.virtualMcp.repo));if(l("orgFs",Gdu(Zh().map((n)=>n.set),i.organization.slug)),i.kind==="agent"){if(i.isDecopilot)l("identity",D$i())}else l("identity",ZY0);if(l("prompts",await qBu(i.ctx,i.organization,i.passthroughClient)),i.kind==="agent"&&i.userContext?.agents)l("agents",aBu(i.userContext.agents,i.virtualMcp.id));if(l("connections",await VBu(i.ctx,i.organization,i.connectionsData)),l("todoWrite",zM()),l("agentInstructions",i.agentInstructions),i.kind==="agent"&&i.user)l("userContext",sBu({user:i.user,currentThreadId:i.currentThreadId,userContext:i.userContext??{}}));return Q7i(t,i.date??new Date)}var ZY0=`You are a focused subtask agent delegated a specific task by a parent agent. You are NOT the parent agent.
107983
107983
 
107984
107984
  ## Rules (non-negotiable)
107985
107985
 
@@ -1100,10 +1100,10 @@ Git operations live in two layers:
1100
1100
  - PR-level operations (open, close, merge, review, comment) \u2192 GitHub
1101
1101
  MCP tools. For rebasing a branch on its base, use git CLI \u2014 never
1102
1102
  \`update_pull_request_branch\`, which merges instead of rebasing.
1103
- </repo-environment>`}var PU=50,fl=30,Hv=15,UL="New chat";function X81($,Z){let G=$?.maxOutputTokens??yk8,X=$?.contextWindow;if(!X)return G;let Q=X-Z*2;return Math.max(1024,Math.min(G,Q))}var gl=()=>`msg_${Ke()}`,yk8=32768,Q81=300000;var FL=D(()=>{Ok1()});function Nl0($){return`<organization-filesystem>
1103
+ </repo-environment>`}var PU=50,fl=30,Hv=15,UL="New chat";function X81($,Z){let G=$?.maxOutputTokens??yk8,X=$?.contextWindow;if(!X)return G;let Q=X-Z*2;return Math.max(1024,Math.min(G,Q))}var gl=()=>`msg_${Ke()}`,yk8=32768,Q81=300000;var FL=D(()=>{Ok1()});function Nl0($,Z){let G=$.length>0?`Available sets: ${$.join(", ")}.`:"No sets are configured on this deployment.";return`<organization-filesystem>
1104
1104
  The organization filesystem is mounted at \`org/\` in your sandbox (when available):
1105
- - the folder named after your organization (its slug \u2014 run \`ls org/\` to see it) \u2014 the org's shared home folder, editable and shared across every agent, member, and run. Organize it freely with subfolders. Check it for relevant context before starting non-trivial work, and record durable knowledge as you learn it: decisions, preferences, project facts, gotchas. Prefer small focused markdown files over one big log, and update stale notes instead of appending duplicates.
1106
- - \`org/public/<set>/\` \u2014 curated read-only skill sets. ${$.length>0?`Available sets: ${$.join(", ")}.`:"No sets are configured on this deployment."} Each skill is a folder with a SKILL.md \u2014 read it before applying the skill.
1105
+ - ${Z?`\`org/${Z}/\``:"the folder named after your organization (its slug is the single entry under `org/`)"} \u2014 the org's shared home folder, editable and shared across every agent, member, and run. Organize it freely with subfolders. Consult it only when a task needs background you don't already have (past decisions, preferences, project facts, gotchas) \u2014 then read it first. Do NOT browse it in response to greetings, small talk, or questions you can answer directly. Record durable knowledge here as you learn it; prefer small focused markdown files over one big log, and update stale notes instead of appending duplicates.
1106
+ - \`org/public/<set>/\` \u2014 curated read-only skill sets. ${G} Each skill is a folder with a SKILL.md \u2014 read it before applying the skill.
1107
1107
  - \`org/upload/\` \u2014 files the user attached to this conversation are already here; read them directly (no copy step needed).
1108
1108
  - \`org/output/\` \u2014 write final deliverables here; they are shared back to the organization under this run's folder.
1109
1109
 
@@ -2443,7 +2443,7 @@ You're talking to ${Y}${J}. Address them by name when it's natural.`)}let Q=G.re
2443
2443
 
2444
2444
  ${X.join(`
2445
2445
 
2446
- `)}`}async function rW$($){let Z=[],G=[],X=(Q,Y)=>{if(!Y?.trim())return;Z.push(Y),G.push(Q)};if(X("base",Z81()),$.kind==="agent"&&$.planMode){let{resolveModeConfig:Q}=await Promise.resolve().then(() => (NN1(),K3$)),Y=Q("plan",{isCliAgent:!1});X("planMode",Y.planPrompt)}if($.virtualMcp.repo)X("repoEnv",Hl0($.virtualMcp.repo));if(X("orgFs",Nl0($J().map((Q)=>Q.set))),$.kind==="agent"){if($.isDecopilot)X("identity",G81())}else X("identity",JZ4);if(X("prompts",await mW$($.ctx,$.organization,$.passthroughClient)),$.kind==="agent"&&$.userContext?.agents)X("agents",pW$($.userContext.agents,$.virtualMcp.id));if(X("connections",await iW$($.ctx,$.organization,$.connectionsData)),X("todoWrite",yl()),X("agentInstructions",$.agentInstructions),$.kind==="agent"&&$.user)X("userContext",oW$({user:$.user,currentThreadId:$.currentThreadId,userContext:$.userContext??{}}));return PN1(Z,$.date??new Date)}var JZ4=`You are a focused subtask agent delegated a specific task by a parent agent. You are NOT the parent agent.
2446
+ `)}`}async function rW$($){let Z=[],G=[],X=(Q,Y)=>{if(!Y?.trim())return;Z.push(Y),G.push(Q)};if(X("base",Z81()),$.kind==="agent"&&$.planMode){let{resolveModeConfig:Q}=await Promise.resolve().then(() => (NN1(),K3$)),Y=Q("plan",{isCliAgent:!1});X("planMode",Y.planPrompt)}if($.virtualMcp.repo)X("repoEnv",Hl0($.virtualMcp.repo));if(X("orgFs",Nl0($J().map((Q)=>Q.set),$.organization.slug)),$.kind==="agent"){if($.isDecopilot)X("identity",G81())}else X("identity",JZ4);if(X("prompts",await mW$($.ctx,$.organization,$.passthroughClient)),$.kind==="agent"&&$.userContext?.agents)X("agents",pW$($.userContext.agents,$.virtualMcp.id));if(X("connections",await iW$($.ctx,$.organization,$.connectionsData)),X("todoWrite",yl()),X("agentInstructions",$.agentInstructions),$.kind==="agent"&&$.user)X("userContext",oW$({user:$.user,currentThreadId:$.currentThreadId,userContext:$.userContext??{}}));return PN1(Z,$.date??new Date)}var JZ4=`You are a focused subtask agent delegated a specific task by a parent agent. You are NOT the parent agent.
2447
2447
 
2448
2448
  ## Rules (non-negotiable)
2449
2449
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "3.28.1",
3
+ "version": "3.28.2",
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{e as W,r as B,j as e,c as X,l as Y}from"./index-Dlc4tDxO.js";import{i as Z}from"./ChevronRight-BJSYQUmF.js";import{S as tt}from"./scroll-area-CifcP4Wg.js";import{aa as et,ab as rt,e as ot}from"./index-CwnBaaeQ.js";import{c as it}from"./save-referenced-block-C-C4ro26.js";import{S as mt}from"./schema-form-D_d0W0_5.js";import{S as pt}from"./save-status-CJhEsrLH.js";import"./select-Dz7DPkoH.js";import"./tooltip-D0rD3x8T.js";import"./Check-DHmAQH53.js";import"./ChevronDown-CN6qoGcG.js";import"./ChevronUp-CTGwFzLw.js";import"./agent-capabilities-Deuuzqbm.js";import"./chat-context-BOn4WPpq.js";import"./tab-id-By_JW--7.js";import"./use-mcp-client-BoOtVD9g.js";import"./decopilot-sse-pool-Bj1W2y0B.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-B-zlmqyw.js";import"./use-virtual-mcp-_FyR-EfH.js";import"./use-collections-CH3Uvmj5.js";import"./use-ai-providers-BL6EQsm8.js";import"./use-organization-settings-BQtNgLEs.js";import"./pair-BfYvjacw.js";import"./agent-icon-D1ySfhKA.js";import"./AlertCircle-De-QnqNt.js";import"./Tool01-DPPRaW86.js";import"./SwitchHorizontal01-CLZ8VEjC.js";import"./RefreshCcw01-CcpA4rje.js";import"./XCircle-BdbzgmP6.js";import"./ArrowUpRight-B0GfNpsw.js";import"./ZapSquare-AN7R7mTa.js";import"./Users03-CKUicuTa.js";import"./CheckCircle-DKSRB9Xd.js";import"./ChevronLeft-HFx1Uufy.js";import"./DotsVertical-jUGLCiy5.js";import"./Container-DZBZNA8Y.js";import"./Eye-CGoLCmzu.js";import"./ZoomOut-Xe1itnU7.js";import"./Globe01--hrfRyvA.js";import"./FilterLines-DYSfUppO.js";import"./Star01-BjpgI7im.js";import"./Palette-B9PbEO6t.js";import"./HardDrive-yKlUP3QG.js";import"./Stars02-Cv3Kyp_N.js";import"./Key01-DqH2W8Qa.js";import"./LayoutLeft-CLZVvVLM.js";import"./LinkExternal01-CaYoYL1Y.js";import"./Monitor01-BRL4_dKI.js";import"./Sun-C0I4hv8e.js";import"./Play-Btpg8EpH.js";import"./Plus-Cv0T2Pov.js";import"./SearchMd-BP9M1g2N.js";import"./Settings02-BMRrFVdB.js";import"./Shield01-rOhEAWZ1.js";import"./Stars01-yuWjNyMF.js";import"./Trash01-s7FZsfBC.js";import"./Upload01-xUCMslnL.js";import"./User01-BsF0RS3z.js";import"./Users01-D-iBSVXa.js";import"./XClose-N2P2hiYb.js";import"./X-CMYaHMo4.js";import"./Zap-gqEvk94k.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DHiMTnai.js";import"./file-type-icon-BYSeb5A3.js";import"./dialog-IkiImd7I.js";import"./content-blocks-o63cs2vh.js";import"./types-Bt2jh4HB.js";import"./shell-layout-D-4Zna-j.js";import"./avatar-AI83PqVE.js";import"./required-auth-layout-q1UX5iFV.js";import"./useRouterState-CfhsEB7J.js";import"./use-org-sso-BCRYycoj.js";import"./integration-icon-DylMdkB7.js";import"./use-navigate-to-agent-_X_kAEcz.js";import"./use-connection-BGpjiuJJ.js";import"./use-mcp-prompts-CYbN8Yyl.js";import"./form-ChQh_wIn.js";import"./label-CmtFIrH6.js";import"./input-CDaarCl_.js";import"./spinner-DUmur8qx.js";import"./drawer-DO_U_Bhd.js";import"./collection-search-B-CX-Cb7.js";import"./tabs-_yym-ubf.js";import"./toggle-group-BYYoZiYB.js";import"./connect-desktop-dialog-DRFjva34.js";import"./agent-icons-DpDt_xvu.js";import"./checkbox-Cwl_z5GL.js";import"./skeleton-bErIIEAe.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BkfPlxIX.js";import"./card-DmbfBYZU.js";import"./popover-DaxAVDXR.js";import"./command-BHuAtd3n.js";import"./index-C5R8l9NR.js";import"./useInfiniteQuery-Dzg2BCY9.js";import"./infiniteQueryObserver-D4Z6Hq7s.js";import"./sortable.esm-D_73qywG.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DEvkcpmQ.js";import"./use-registry-connections-CPtcwe6P.js";import"./extract-connection-data-Uz57CpVC.js";import"./generate-id-BrtbvnKY.js";import"./collections-CXYJ8MVZ.js";import"./collection-tabs-CdfD34L4.js";import"./badge-CikIA9ZK.js";import"./textarea-BhyLj2Dp.js";import"./connection-form-helpers-BxYEqmM8.js";import"./use-infinite-scroll-BlDyJWAa.js";import"./useSuspenseInfiniteQuery-D3ys-EbO.js";import"./index-DFp-rnQf.js";import"./dropdown-menu-C-Cxaez8.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-D7iIgnMy.js";import"./sidebar-BT1O99E-.js";import"./sheet-C2OErkZR.js";import"./toolbar-BQgYgute.js";import"./use-create-virtual-mcp-8G8o89BT.js";import"./github-repo-picker-13FobS0K.js";import"./use-mcp-tools-DlzThqmJ.js";import"./alert-dialog-CBzhgusU.js";import"./index-CweEMiqH.js";import"./use-org-auth-client-ziK5gAU8.js";import"./hover-card-5iaAH0_M.js";import"./task-status-B3M1uY2i.js";import"./use-status-sounds-CZU7jLXq.js";import"./empty-state-o52Hq4fy.js";import"./resizable-B_wg5OKG.js";import"./use-capability-DqPX2R7m.js";import"./header-tab-button-Qu1eh6fb.js";import"./index-Dcfw-W2O.js";import"./user-CXZKnlfK.js";import"./tools-list-Bib10JJv.js";import"./switch-CRVfQAZr.js";import"./use-debounced-autosave-BnF-F24h.js";import"./index-NNvehl9i.js";import"./search-input-eml2HEUh.js";import"./use-secrets-wimlaYjN.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-BIWbMpHu.js";import"./view-mode-toggle-BO9qiFWG.js";import"./select-model-B6KC9bZ9.js";import"./use-automations-jCgcI_Hn.js";import"./monaco-editor--8410HRL.js";import"./automation-runs-BcknuTTv.js";import"./table-70fRVfwQ.js";import"./use-members-BLEStPtC.js";import"./automation-list-row-7qb4yrwv.js";import"./calendar-DZmZKFmb.js";import"./image-field-C3Pv1Di2.js";import"./use-file-configs-CDby3RwC.js";function to(E){const t=W.c(51),{orgSlug:R,virtualMcpId:P,branch:$,blockKey:r,block:m,meta:p,decofile:C,title:F,excludeFields:K,schemaPending:M}=E,V=M===void 0?!1:M,a=typeof m?.__resolveType=="string"?m.__resolveType:"";let v;t[0]!==K||t[1]!==p||t[2]!==a?(v=et(a,p,K),t[0]=K,t[1]=p,t[2]=a,t[3]=v):v=t[3];const s=v;let b;t[4]!==s?(b=!!s&&Object.keys(s.properties??{}).length>0,t[4]=s,t[5]=b):b=t[5];const T=b;let g;t[6]!==m||t[7]!==r||t[8]!==p||t[9]!==F?(g=F??(m?rt(r,m,p):r),t[6]=m,t[7]=r,t[8]=p,t[9]=F,t[10]=g):g=t[10];const n=g;let j;t[11]!==$||t[12]!==R||t[13]!==P?(j={orgSlug:R,virtualMcpId:P,branch:$},t[11]=$,t[12]=R,t[13]=P,t[14]=j):j=t[14];const{save:c,isPending:A}=ot(j);let y;t[15]!==c?(y=it((l,i)=>c(l,i)),t[15]=c,t[16]=y):y=t[16];const L=y,[G,H]=B.useState(r),[J,q]=B.useState(null),[z,Q]=B.useState(0);let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=[],t[17]=S):S=t[17];const[o,O]=B.useState(S);G!==r&&(H(r),q(null),Q(st),O([]));let N;t[18]!==m?(N=m??{},t[18]=m,t[19]=N):N=t[19];const D=J??N;let k;t[20]!==r||t[21]!==a||t[22]!==c?(k=l=>{const i=l;q(i),c(r,{...i,__resolveType:a})},t[20]=r,t[21]=a,t[22]=c,t[23]=k):k=t[23];const I=k;let _;t[24]!==o||t[25]!==n?(_=o.length>0?[n,...o]:[],t[24]=o,t[25]=n,t[26]=_):_=t[26];const h=_;let d;t[27]!==o||t[28]!==h||t[29]!==n?(d=h.length>0?e.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:h.map((l,i)=>{const U=i===h.length-1;return e.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&e.jsx(Z,{className:"size-3 shrink-0 text-muted-foreground/60"}),e.jsx("button",{type:"button",onClick:()=>O(i===0?[]:o.slice(0,i)),title:l,className:X("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",U?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:l})]},`${l}-${i}`)})}):e.jsx("span",{className:"text-sm font-medium",children:n}),t[27]=o,t[28]=h,t[29]=n,t[30]=d):d=t[30];let f;t[31]!==A?(f=e.jsx(pt,{isPending:A,isError:!1}),t[31]=A,t[32]=f):f=t[32];let u;t[33]!==d||t[34]!==f?(u=e.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[d,f]}),t[33]=d,t[34]=f,t[35]=u):u=t[35];let x;t[36]!==r||t[37]!==o||t[38]!==C||t[39]!==D||t[40]!==z||t[41]!==I||t[42]!==T||t[43]!==p||t[44]!==L||t[45]!==s||t[46]!==V?(x=e.jsx(tt,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-6",children:e.jsx("div",{className:"mx-auto max-w-xl",children:T?e.jsx(mt,{schema:s,value:D,onChange:I,basePath:"",breadcrumbPath:o,onBreadcrumbChange:O,decofile:C,meta:p,onSaveReferencedBlock:L},`${r}:${z}`):V?e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[e.jsx(Y,{size:16,className:"animate-spin"}),"Loading app schema…"]}):e.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[36]=r,t[37]=o,t[38]=C,t[39]=D,t[40]=z,t[41]=I,t[42]=T,t[43]=p,t[44]=L,t[45]=s,t[46]=V,t[47]=x):x=t[47];let w;return t[48]!==u||t[49]!==x?(w=e.jsxs("div",{className:"flex h-full flex-col",children:[u,x]}),t[48]=u,t[49]=x,t[50]=w):w=t[50],w}function st(E){return E+1}export{to as AppEditor};
@@ -1 +0,0 @@
1
- import{e as it,r as E,j as e,l as rt}from"./index-Dlc4tDxO.js";import{S as mt,d as pt,a as st,b as at}from"./sheet-C2OErkZR.js";import{S as nt}from"./scroll-area-CifcP4Wg.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-Cz5Nib_0.js";import{m as xt}from"./index-CwnBaaeQ.js";import"./X-CMYaHMo4.js";import"./select-Dz7DPkoH.js";import"./tooltip-D0rD3x8T.js";import"./Check-DHmAQH53.js";import"./ChevronDown-CN6qoGcG.js";import"./ChevronUp-CTGwFzLw.js";import"./label-CmtFIrH6.js";import"./switch-CRVfQAZr.js";import"./schema-form-D_d0W0_5.js";import"./agent-icon-D1ySfhKA.js";import"./AlertCircle-De-QnqNt.js";import"./Tool01-DPPRaW86.js";import"./SwitchHorizontal01-CLZ8VEjC.js";import"./RefreshCcw01-CcpA4rje.js";import"./XCircle-BdbzgmP6.js";import"./ArrowUpRight-B0GfNpsw.js";import"./ZapSquare-AN7R7mTa.js";import"./Users03-CKUicuTa.js";import"./CheckCircle-DKSRB9Xd.js";import"./ChevronLeft-HFx1Uufy.js";import"./ChevronRight-BJSYQUmF.js";import"./DotsVertical-jUGLCiy5.js";import"./Container-DZBZNA8Y.js";import"./Eye-CGoLCmzu.js";import"./ZoomOut-Xe1itnU7.js";import"./Globe01--hrfRyvA.js";import"./FilterLines-DYSfUppO.js";import"./Star01-BjpgI7im.js";import"./Palette-B9PbEO6t.js";import"./HardDrive-yKlUP3QG.js";import"./Stars02-Cv3Kyp_N.js";import"./Key01-DqH2W8Qa.js";import"./LayoutLeft-CLZVvVLM.js";import"./LinkExternal01-CaYoYL1Y.js";import"./Monitor01-BRL4_dKI.js";import"./Sun-C0I4hv8e.js";import"./Play-Btpg8EpH.js";import"./Plus-Cv0T2Pov.js";import"./SearchMd-BP9M1g2N.js";import"./Settings02-BMRrFVdB.js";import"./Shield01-rOhEAWZ1.js";import"./Stars01-yuWjNyMF.js";import"./Trash01-s7FZsfBC.js";import"./Upload01-xUCMslnL.js";import"./User01-BsF0RS3z.js";import"./Users01-D-iBSVXa.js";import"./XClose-N2P2hiYb.js";import"./Zap-gqEvk94k.js";import"./calendar-DZmZKFmb.js";import"./input-CDaarCl_.js";import"./popover-DaxAVDXR.js";import"./textarea-BhyLj2Dp.js";import"./dropdown-menu-C-Cxaez8.js";import"./image-field-C3Pv1Di2.js";import"./dialog-IkiImd7I.js";import"./skeleton-bErIIEAe.js";import"./tabs-_yym-ubf.js";import"./use-file-configs-CDby3RwC.js";import"./studio-tools-B-zlmqyw.js";import"./useInfiniteQuery-Dzg2BCY9.js";import"./infiniteQueryObserver-D4Z6Hq7s.js";import"./agent-capabilities-Deuuzqbm.js";import"./chat-context-BOn4WPpq.js";import"./tab-id-By_JW--7.js";import"./use-mcp-client-BoOtVD9g.js";import"./decopilot-sse-pool-Bj1W2y0B.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-_FyR-EfH.js";import"./use-collections-CH3Uvmj5.js";import"./use-ai-providers-BL6EQsm8.js";import"./use-organization-settings-BQtNgLEs.js";import"./pair-BfYvjacw.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DHiMTnai.js";import"./file-type-icon-BYSeb5A3.js";import"./content-blocks-o63cs2vh.js";import"./types-Bt2jh4HB.js";import"./shell-layout-D-4Zna-j.js";import"./avatar-AI83PqVE.js";import"./required-auth-layout-q1UX5iFV.js";import"./useRouterState-CfhsEB7J.js";import"./use-org-sso-BCRYycoj.js";import"./integration-icon-DylMdkB7.js";import"./use-navigate-to-agent-_X_kAEcz.js";import"./use-connection-BGpjiuJJ.js";import"./use-mcp-prompts-CYbN8Yyl.js";import"./form-ChQh_wIn.js";import"./spinner-DUmur8qx.js";import"./drawer-DO_U_Bhd.js";import"./collection-search-B-CX-Cb7.js";import"./toggle-group-BYYoZiYB.js";import"./connect-desktop-dialog-DRFjva34.js";import"./agent-icons-DpDt_xvu.js";import"./checkbox-Cwl_z5GL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BkfPlxIX.js";import"./card-DmbfBYZU.js";import"./command-BHuAtd3n.js";import"./index-C5R8l9NR.js";import"./sortable.esm-D_73qywG.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DEvkcpmQ.js";import"./use-registry-connections-CPtcwe6P.js";import"./extract-connection-data-Uz57CpVC.js";import"./generate-id-BrtbvnKY.js";import"./collections-CXYJ8MVZ.js";import"./collection-tabs-CdfD34L4.js";import"./badge-CikIA9ZK.js";import"./connection-form-helpers-BxYEqmM8.js";import"./use-infinite-scroll-BlDyJWAa.js";import"./useSuspenseInfiniteQuery-D3ys-EbO.js";import"./index-DFp-rnQf.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-D7iIgnMy.js";import"./sidebar-BT1O99E-.js";import"./toolbar-BQgYgute.js";import"./use-create-virtual-mcp-8G8o89BT.js";import"./github-repo-picker-13FobS0K.js";import"./use-mcp-tools-DlzThqmJ.js";import"./alert-dialog-CBzhgusU.js";import"./index-CweEMiqH.js";import"./use-org-auth-client-ziK5gAU8.js";import"./hover-card-5iaAH0_M.js";import"./task-status-B3M1uY2i.js";import"./use-status-sounds-CZU7jLXq.js";import"./empty-state-o52Hq4fy.js";import"./resizable-B_wg5OKG.js";import"./use-capability-DqPX2R7m.js";import"./header-tab-button-Qu1eh6fb.js";import"./index-Dcfw-W2O.js";import"./user-CXZKnlfK.js";import"./tools-list-Bib10JJv.js";import"./use-debounced-autosave-BnF-F24h.js";import"./index-NNvehl9i.js";import"./search-input-eml2HEUh.js";import"./use-secrets-wimlaYjN.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-BIWbMpHu.js";import"./view-mode-toggle-BO9qiFWG.js";import"./select-model-B6KC9bZ9.js";import"./use-automations-jCgcI_Hn.js";import"./monaco-editor--8410HRL.js";import"./automation-runs-BcknuTTv.js";import"./table-70fRVfwQ.js";import"./use-members-BLEStPtC.js";import"./automation-list-row-7qb4yrwv.js";function Si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{Si as SeoSheet};
@@ -1 +0,0 @@
1
- import{e as H,q as $,j}from"./index-Dlc4tDxO.js";import{h as q,g as O,s as b}from"./pair-BfYvjacw.js";import{u as v}from"./use-mcp-client-BoOtVD9g.js";import{a as L,c as B}from"./use-mcp-tools-DlzThqmJ.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as k,M as G,a as E}from"./types-Bt2jh4HB.js";import{a as V,c as z}from"./chat-context-BOn4WPpq.js";import{u as F}from"./shell-layout-D-4Zna-j.js";import"./agent-icon-D1ySfhKA.js";import"./AlertCircle-De-QnqNt.js";import"./Tool01-DPPRaW86.js";import"./SwitchHorizontal01-CLZ8VEjC.js";import"./RefreshCcw01-CcpA4rje.js";import"./XCircle-BdbzgmP6.js";import"./ArrowUpRight-B0GfNpsw.js";import"./ZapSquare-AN7R7mTa.js";import"./Users03-CKUicuTa.js";import"./CheckCircle-DKSRB9Xd.js";import"./Check-DHmAQH53.js";import"./ChevronDown-CN6qoGcG.js";import"./ChevronLeft-HFx1Uufy.js";import"./ChevronRight-BJSYQUmF.js";import"./ChevronUp-CTGwFzLw.js";import"./DotsVertical-jUGLCiy5.js";import"./Container-DZBZNA8Y.js";import"./Eye-CGoLCmzu.js";import"./ZoomOut-Xe1itnU7.js";import"./Globe01--hrfRyvA.js";import"./FilterLines-DYSfUppO.js";import"./Star01-BjpgI7im.js";import"./Palette-B9PbEO6t.js";import"./HardDrive-yKlUP3QG.js";import"./Stars02-Cv3Kyp_N.js";import"./Key01-DqH2W8Qa.js";import"./LayoutLeft-CLZVvVLM.js";import"./LinkExternal01-CaYoYL1Y.js";import"./Monitor01-BRL4_dKI.js";import"./Sun-C0I4hv8e.js";import"./Play-Btpg8EpH.js";import"./Plus-Cv0T2Pov.js";import"./SearchMd-BP9M1g2N.js";import"./Settings02-BMRrFVdB.js";import"./Shield01-rOhEAWZ1.js";import"./Stars01-yuWjNyMF.js";import"./Trash01-s7FZsfBC.js";import"./Upload01-xUCMslnL.js";import"./User01-BsF0RS3z.js";import"./Users01-D-iBSVXa.js";import"./XClose-N2P2hiYb.js";import"./X-CMYaHMo4.js";import"./Zap-gqEvk94k.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-CifcP4Wg.js";import"./select-Dz7DPkoH.js";import"./tooltip-D0rD3x8T.js";import"./use-copy-DHiMTnai.js";import"./file-type-icon-BYSeb5A3.js";import"./dialog-IkiImd7I.js";import"./tab-id-By_JW--7.js";import"./decopilot-sse-pool-Bj1W2y0B.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-B-zlmqyw.js";import"./integration-icon-DylMdkB7.js";import"./use-virtual-mcp-_FyR-EfH.js";import"./use-collections-CH3Uvmj5.js";import"./use-navigate-to-agent-_X_kAEcz.js";import"./use-connection-BGpjiuJJ.js";import"./use-mcp-prompts-CYbN8Yyl.js";import"./form-ChQh_wIn.js";import"./label-CmtFIrH6.js";import"./input-CDaarCl_.js";import"./spinner-DUmur8qx.js";import"./use-ai-providers-BL6EQsm8.js";import"./use-organization-settings-BQtNgLEs.js";import"./avatar-AI83PqVE.js";import"./required-auth-layout-q1UX5iFV.js";import"./useRouterState-CfhsEB7J.js";import"./use-org-sso-BCRYycoj.js";const J={};function K(S){const t=H.c(37),{client:r,resourceURI:g,tool:e,connectionId:s,orgId:a,args:c}=S,{sendMessage:u}=V(),{setAppContext:d,clearAppContext:o}=z(),{setChatOpen:f,openTab:m}=F(),p=`${s}:${e.name}`;let l;t[0]!==m?(l=h=>h==="inline"?(m("0"),"inline"):"fullscreen",t[0]=m,t[1]=l):l=t[1];const i=l,n=c??J;let T;t[2]!==r||t[3]!==e.name||t[4]!==n?(T={client:r,toolName:e.name,toolArguments:n},t[2]=r,t[3]=e.name,t[4]=n,t[5]=T):T=t[5];const{data:x}=B(T);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=O(e._meta);R=b(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let I;t[9]!==e.inputSchema?(I=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=I):I=t[10];let N;t[11]!==U||t[12]!==I||t[13]!==e?(N={...e,name:U,inputSchema:I},t[11]=U,t[12]=I,t[13]=e,t[14]=N):N=t[14];const y=N;let _;t[15]!==u||t[16]!==f?(_=h=>{const w=Y(h.content);w.content.length>0&&(f(!0),u({tiptapDoc:w}))},t[15]=u,t[16]=f,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let M;t[20]!==d||t[21]!==p?(M=h=>d(p,h),t[20]=d,t[21]=p,t[22]=M):M=t[22];let P;t[23]!==o||t[24]!==p?(P=()=>o(p),t[23]=o,t[24]=p,t[25]=P):P=t[25];let A;return t[26]!==r||t[27]!==D||t[28]!==i||t[29]!==a||t[30]!==g||t[31]!==C||t[32]!==M||t[33]!==P||t[34]!==n||t[35]!==x?(A=j.jsx(G,{resourceURI:g,orgId:a,toolInfo:C,toolInput:n,toolResult:x,displayMode:"fullscreen",minHeight:E.fullscreen.minHeight,maxHeight:E.fullscreen.maxHeight,client:r,onMessage:D,onUpdateModelContext:M,onTeardown:P,onRequestDisplayMode:i,className:"h-full"}),t[26]=r,t[27]=D,t[28]=i,t[29]=a,t[30]=g,t[31]=C,t[32]=M,t[33]=P,t[34]=n,t[35]=x,t[36]=A):A=t[36],A}function Pe(S){const t=H.c(20),{connectionId:r,toolName:g,args:e}=S,{org:s}=$();let a;t[0]!==r||t[1]!==s.id||t[2]!==s.slug?(a={connectionId:r,orgId:s.id,orgSlug:s.slug},t[0]=r,t[1]=s.id,t[2]=s.slug,t[3]=a):a=t[3];const c=v(a);let u;t[4]!==c?(u={client:c},t[4]=c,t[5]=u):u=t[5];const{data:d}=L(u);let o,f,m;t[6]!==g||t[7]!==d.tools?(o=q(decodeURIComponent(g)),m=d.tools.find(i=>i.name===o)??d.tools.find(i=>{const n=O(i._meta);if(!n)return!1;if(b(i.name,n)===o)return!0;const x=b(o,n);return x!==o&&i.name===x}),f=m?._meta?k(m._meta):void 0,t[6]=g,t[7]=d.tools,t[8]=o,t[9]=f,t[10]=m):(o=t[8],f=t[9],m=t[10]);const p=f;if(!m||!p){let i;return t[11]!==o?(i=j.jsx("div",{className:"flex items-center justify-center h-full w-full",children:j.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',o,'" not found or has no UI']})}),t[11]=o,t[12]=i):i=t[12],i}let l;return t[13]!==e||t[14]!==c||t[15]!==r||t[16]!==s.id||t[17]!==p||t[18]!==m?(l=j.jsx(K,{client:c,resourceURI:p,tool:m,connectionId:r,orgId:s.id,args:e}),t[13]=e,t[14]=c,t[15]=r,t[16]=s.id,t[17]=p,t[18]=m,t[19]=l):l=t[19],l}export{Pe as AppViewContent};