decocms 2.304.15 → 2.304.16

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 (236) hide show
  1. package/dist/client/assets/{AlertCircle-CbUYZGF-.js → AlertCircle-YdvcZKe8.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DHj5-FLY.js → ArrowNarrowLeft-spQjUruy.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-BK_iYZ-J.js → ArrowUpRight-B1ajIZNC.js} +1 -1
  4. package/dist/client/assets/Check-D7cmovlU.js +1 -0
  5. package/dist/client/assets/{CheckCircle-D9qlmIve.js → CheckCircle-BQ3_L_yP.js} +1 -1
  6. package/dist/client/assets/ChevronDown-BfDxcbjR.js +1 -0
  7. package/dist/client/assets/{ChevronRight-BIm0-OSp.js → ChevronRight-BoDMW1uU.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-ClqSoLtD.js → ChevronUp-CRQBEG-R.js} +1 -1
  9. package/dist/client/assets/{Container-BCDxdJoG.js → Container-B6Z-4M-T.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-DEE8M0V4.js → DotsVertical-BxlMGXPv.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-DM7IwrPj.js → LinkExternal01-Dmf65eFo.js} +1 -1
  12. package/dist/client/assets/{Lock01-BmjkKSvK.js → Lock01-CHWOYjbh.js} +1 -1
  13. package/dist/client/assets/{Palette-BrJL0UcN.js → Palette-96pDg1d-.js} +1 -1
  14. package/dist/client/assets/{Play-DSYx2GJ2.js → Play-ChzLrbkr.js} +1 -1
  15. package/dist/client/assets/{Plus-BrBimbff.js → Plus-Cd4I0_d-.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-Cr84gVY8.js → RefreshCcw01-BBhbyLOk.js} +1 -1
  17. package/dist/client/assets/{SearchMd-IP-R-mtT.js → SearchMd-cj9P259i.js} +1 -1
  18. package/dist/client/assets/{Settings02-BOckjEVU.js → Settings02-Cx39xFqG.js} +1 -1
  19. package/dist/client/assets/{Shield01-CJggUHAQ.js → Shield01-DDhNoo0b.js} +1 -1
  20. package/dist/client/assets/Star01-UQZ7hTDj.js +1 -0
  21. package/dist/client/assets/{Sun-B7BWJEHb.js → Sun-Cr3NKiIh.js} +1 -1
  22. package/dist/client/assets/{Tool01-D1Rvo01i.js → Tool01-DXbOwd1n.js} +1 -1
  23. package/dist/client/assets/{Trash01-DaGrAtTq.js → Trash01-DqDMVyTa.js} +1 -1
  24. package/dist/client/assets/{User01-DmtseI1g.js → User01-C7C_-f57.js} +1 -1
  25. package/dist/client/assets/{Users03-DH9QAbco.js → Users03-DGRxeg5O.js} +1 -1
  26. package/dist/client/assets/{X-viKat0oa.js → X-8IHaEYtM.js} +1 -1
  27. package/dist/client/assets/{XCircle-DZEMwZj2.js → XCircle-kdEx_GGF.js} +1 -1
  28. package/dist/client/assets/{XClose-DY7O9VST.js → XClose-D8EpU_uy.js} +1 -1
  29. package/dist/client/assets/{Zap-BMzMPNv3.js → Zap-DdUb_mPC.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-BDbWe-zU.js → ZapSquare-Biix1-55.js} +1 -1
  31. package/dist/client/assets/{accordion-YgNI8iqn.js → accordion-MNTOVO1w.js} +1 -1
  32. package/dist/client/assets/agent-icon-BBG09Kki.js +1 -0
  33. package/dist/client/assets/agents-list-Cd2ZNqCV.js +1 -0
  34. package/dist/client/assets/ai-providers-BM3nrPzC.js +1 -0
  35. package/dist/client/assets/{alert-dialog-BvuFarFf.js → alert-dialog-ChbEbjde.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DQeYnh5P.js → auth-catchall-CBAL823O.js} +1 -1
  37. package/dist/client/assets/automation-list-row-ZDJkdIwJ.js +1 -0
  38. package/dist/client/assets/automations-_nxja9xP.js +1 -0
  39. package/dist/client/assets/{avatar-C4FRugJb.js → avatar-97M2j8Mc.js} +1 -1
  40. package/dist/client/assets/{badge-_ZGDO29b.js → badge-CGsQT5nT.js} +1 -1
  41. package/dist/client/assets/brand-context-D6w2oIn3.js +1 -0
  42. package/dist/client/assets/{card-oSxwoJvZ.js → card-DfJe5L79.js} +1 -1
  43. package/dist/client/assets/{chat-context-C4Hx_rZK.js → chat-context-Cmy5JYgW.js} +1 -1
  44. package/dist/client/assets/checkbox-C1M4-v1p.js +1 -0
  45. package/dist/client/assets/collection-detail-Bwwayl0Z.js +1 -0
  46. package/dist/client/assets/collection-display-button-C5vtHGnK.js +1 -0
  47. package/dist/client/assets/{collection-search-u94VKjvs.js → collection-search-CzQYdsP4.js} +1 -1
  48. package/dist/client/assets/{collection-search-D_DqZCmL.js → collection-search-DT89ZZmI.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-LzV9CSI7.js → collection-table-wrapper-Bna3sxAQ.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-DW1xYGdq.js → collection-tabs-ComzcUW9.js} +1 -1
  51. package/dist/client/assets/{collections-Cn7VbUFT.js → collections-CTGZthcG.js} +1 -1
  52. package/dist/client/assets/{command-CgMn1LbK.js → command-DjJw7GWb.js} +1 -1
  53. package/dist/client/assets/{connection-card-BPUe3B60.js → connection-card-DQlGg9mJ.js} +1 -1
  54. package/dist/client/assets/connection-detail-Z4nXqSbX.js +1 -0
  55. package/dist/client/assets/{connection-form-helpers-CUlzSClK.js → connection-form-helpers-DiGKAKlz.js} +1 -1
  56. package/dist/client/assets/connections-DAoFEFST.js +1 -0
  57. package/dist/client/assets/{constants-CfwGLQ49.js → constants-B9wErdMg.js} +1 -1
  58. package/dist/client/assets/{constants-CVDNjJTw.js → constants-XC36TPvL.js} +1 -1
  59. package/dist/client/assets/{dialog-CoECADf1.js → dialog-B9n71g4e.js} +1 -1
  60. package/dist/client/assets/{domain-settings-D6RV8b16.js → domain-settings-DAaCjfZg.js} +1 -1
  61. package/dist/client/assets/{drawer-DTk8g2vK.js → drawer-Dy5NJxEk.js} +1 -1
  62. package/dist/client/assets/dropdown-menu-bofOMeLm.js +1 -0
  63. package/dist/client/assets/{dynamic-plugin-layout-DCoYGhHP.js → dynamic-plugin-layout-DdC9w75r.js} +1 -1
  64. package/dist/client/assets/{empty-state-Be0X9mox.js → empty-state-Bl1VCnIe.js} +1 -1
  65. package/dist/client/assets/{empty-state-DoKR-jUX.js → empty-state-iSyeAylK.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-CuIeY90s.js → extract-connection-data-BmWiFxHJ.js} +1 -1
  67. package/dist/client/assets/{features-38ZozsmE.js → features-BKkpnrxu.js} +1 -1
  68. package/dist/client/assets/{form-BC40Nvzi.js → form-DABXYYeF.js} +1 -1
  69. package/dist/client/assets/general-DukQ3tYy.js +1 -0
  70. package/dist/client/assets/{index-CvarGBFr.js → index-B40-ao-L.js} +1 -1
  71. package/dist/client/assets/{index-Bcf94soS.js → index-BBoaHd8c.js} +1 -1
  72. package/dist/client/assets/{index-CbBINyFK.js → index-BOl2sMex.js} +1 -1
  73. package/dist/client/assets/{index-DXHNyf1g.css → index-B_4-KoG_.css} +1 -1
  74. package/dist/client/assets/{index-B0TkoX1b.js → index-BscyP7Up.js} +1 -1
  75. package/dist/client/assets/{index-DjgN9qrV.js → index-C77ixooi.js} +1 -1
  76. package/dist/client/assets/index-C7yEMUwG.js +1 -0
  77. package/dist/client/assets/{index-nmtbWm5V.js → index-CA228xnt.js} +2 -2
  78. package/dist/client/assets/{index-M_qlHNIS.js → index-CeXie2Ys.js} +1 -1
  79. package/dist/client/assets/{index-Dl2t23Jt.js → index-CzhKzgtD.js} +2 -2
  80. package/dist/client/assets/index-D3A4ePI7.js +1 -0
  81. package/dist/client/assets/index-DI9Yp0oo.js +1 -0
  82. package/dist/client/assets/{index-CwBiuTbX.js → index-DT7Nf9M6.js} +25 -25
  83. package/dist/client/assets/{index-BBrIielu.js → index-DTr35K1t.js} +1 -1
  84. package/dist/client/assets/{index-_TsJo9Ju.js → index-DtIEOBO6.js} +5 -5
  85. package/dist/client/assets/{index-CFyIm5CH.js → index-abagjRmB.js} +1 -1
  86. package/dist/client/assets/index-iDFI-Ppt.js +1 -0
  87. package/dist/client/assets/{infiniteQueryObserver-cqTNhL_G.js → infiniteQueryObserver-d4mpZ_Ot.js} +1 -1
  88. package/dist/client/assets/{input-CluxDyoT.js → input-CNEsKnKX.js} +1 -1
  89. package/dist/client/assets/{integration-icon-BipCD_m-.js → integration-icon-CSgHR76X.js} +1 -1
  90. package/dist/client/assets/{label-CHKFYnQo.js → label-9fjD1g94.js} +1 -1
  91. package/dist/client/assets/{layout-CV5Wi0Ex.js → layout-DEdN-ZCr.js} +1 -1
  92. package/dist/client/assets/{lean-canvas-recruit-modal-CnBIlbd0.js → lean-canvas-recruit-modal-CEK7JzdS.js} +1 -1
  93. package/dist/client/assets/{login-DdkQloeb.js → login-C6yxrHRy.js} +1 -1
  94. package/dist/client/assets/{members-BgSG3QM0.js → members-D68Ow5uj.js} +2 -2
  95. package/dist/client/assets/{monaco-editor-BfaMmupR.js → monaco-editor-Dndvvjot.js} +1 -1
  96. package/dist/client/assets/{monitoring-stats-row-C8V4hqSK.js → monitoring-stats-row-CKay1MEI.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-BaZqye0L.js → oauth-callback-CaaulaeP.js} +1 -1
  98. package/dist/client/assets/{oauth-callback-ai-provider-oz8YNRBq.js → oauth-callback-ai-provider-ChlN62-d.js} +1 -1
  99. package/dist/client/assets/{onboarding-WJDxBlF8.js → onboarding-Dx3oU4tF.js} +1 -1
  100. package/dist/client/assets/{org-layout-Ax0KGzlT.js → org-layout-UCoBgLht.js} +1 -1
  101. package/dist/client/assets/{org-plugin-layout-C5mxyCcm.js → org-plugin-layout-CqAgklZh.js} +1 -1
  102. package/dist/client/assets/{pair-JxQa_xAh.js → pair-D1mFwARy.js} +1 -1
  103. package/dist/client/assets/{plugin-empty-state-C_q24wh6.js → plugin-empty-state-B0cmsL9S.js} +1 -1
  104. package/dist/client/assets/plugin-header-BI8T-ddq.js +1 -0
  105. package/dist/client/assets/{plugin-layout-NPftDH-k.js → plugin-layout-B1I7qSQF.js} +1 -1
  106. package/dist/client/assets/{popover-vU5pf5HQ.js → popover-DJiufSUD.js} +1 -1
  107. package/dist/client/assets/profile-CGXuDNln.js +1 -0
  108. package/dist/client/assets/project-app-view-DP_-ui4r.js +1 -0
  109. package/dist/client/assets/registry-CFvs_APs.js +2 -0
  110. package/dist/client/assets/{registry-layout-D-sbU1qd.js → registry-layout-DIzJFcIj.js} +2 -2
  111. package/dist/client/assets/{required-auth-layout-BYto5m3H.js → required-auth-layout-sXjdshcq.js} +1 -1
  112. package/dist/client/assets/{reset-password-DL944kGr.js → reset-password-cZPjvgcJ.js} +1 -1
  113. package/dist/client/assets/roles-CkThyhxD.js +1 -0
  114. package/dist/client/assets/{scroll-area-D4F3EM5Z.js → scroll-area-DM7jZQf0.js} +1 -1
  115. package/dist/client/assets/{search-input-CslwpPEh.js → search-input-BfUlR4kV.js} +1 -1
  116. package/dist/client/assets/select-WtZOfOpo.js +1 -0
  117. package/dist/client/assets/select-model-Cy_Vxqx-.js +4 -0
  118. package/dist/client/assets/{settings-layout-CFCdg7G4.js → settings-layout-CbLLwkfV.js} +1 -1
  119. package/dist/client/assets/{settings-section-qcMAXuoQ.js → settings-section-R1g2TNeE.js} +1 -1
  120. package/dist/client/assets/{shell-layout-CzPr_0c2.js → shell-layout-I_eJIv1K.js} +1 -1
  121. package/dist/client/assets/{skeleton-eOgaLAHa.js → skeleton-DLLoz0n0.js} +1 -1
  122. package/dist/client/assets/{sso-Dozga0JK.js → sso-CzSINRFs.js} +1 -1
  123. package/dist/client/assets/{store-BA7fLJKJ.js → store-BCviRvz9.js} +1 -1
  124. package/dist/client/assets/store-registry-C9ivXmwu.js +2 -0
  125. package/dist/client/assets/{switch-W_Nrj6rK.js → switch-BH6A3p0g.js} +1 -1
  126. package/dist/client/assets/{table-rVVQNhet.js → table-qL_Cu6WT.js} +1 -1
  127. package/dist/client/assets/{tabs-6T1N4Szc.js → tabs-DIK24gms.js} +1 -1
  128. package/dist/client/assets/{task-status-DsmpMdW6.js → task-status-Bjp5sDvq.js} +1 -1
  129. package/dist/client/assets/{textarea-Cld3tG5R.js → textarea-DVl7iYt4.js} +1 -1
  130. package/dist/client/assets/{toggle-group-COcCk4lG.js → toggle-group-WOk-6cmR.js} +1 -1
  131. package/dist/client/assets/{tools-list-COvHAWAZ.js → tools-list-BAADgwcR.js} +1 -1
  132. package/dist/client/assets/{tooltip-CxizQODk.js → tooltip-DSuAs--v.js} +1 -1
  133. package/dist/client/assets/{types-CvYZZZog.js → types-bCWMch03.js} +1 -1
  134. package/dist/client/assets/{use-ai-providers-Bt2yRX0n.js → use-ai-providers-B7R2KmGt.js} +1 -1
  135. package/dist/client/assets/{use-collections-CwD8DZNY.js → use-collections-DFXlD5a6.js} +1 -1
  136. package/dist/client/assets/{use-connection-pSv7eY2y.js → use-connection-mkdAsO3d.js} +1 -1
  137. package/dist/client/assets/{use-copy-CHAuyAMC.js → use-copy-C4DghPLz.js} +1 -1
  138. package/dist/client/assets/{use-create-virtual-mcp-1DfbQRRy.js → use-create-virtual-mcp-ksck6WCZ.js} +1 -1
  139. package/dist/client/assets/use-debounced-autosave-CLtNf_EP.js +1 -0
  140. package/dist/client/assets/{use-decopilot-events-CXVUS53e.js → use-decopilot-events-BqnGpCsr.js} +1 -1
  141. package/dist/client/assets/{use-delete-connection-BNRuOYcY.js → use-delete-connection-CJCTY6PR.js} +1 -1
  142. package/dist/client/assets/{use-infinite-scroll-Ca5zEcXn.js → use-infinite-scroll-DyWtuvVN.js} +1 -1
  143. package/dist/client/assets/{use-list-state-Jttwyvy3.js → use-list-state-DJhZm6uG.js} +1 -1
  144. package/dist/client/assets/{use-mcp-tools-BdYIFx9S.js → use-mcp-tools-CZiN_apo.js} +1 -1
  145. package/dist/client/assets/{use-members-s6X83kyp.js → use-members-XoLKujIR.js} +1 -1
  146. package/dist/client/assets/{use-navigate-to-agent-Tn-rhKXX.js → use-navigate-to-agent-BJZA0vn3.js} +1 -1
  147. package/dist/client/assets/{use-org-auth-client-CS0Acn4M.js → use-org-auth-client-DFDdOgNz.js} +1 -1
  148. package/dist/client/assets/{use-org-sso-CPzDtjox.js → use-org-sso-ntNZ64id.js} +1 -1
  149. package/dist/client/assets/{use-organization-roles-TW9At1F2.js → use-organization-roles-DvvUCO6J.js} +1 -1
  150. package/dist/client/assets/{use-organization-settings-Dak2xww8.js → use-organization-settings-BcP9GxNe.js} +1 -1
  151. package/dist/client/assets/{use-registry-connections-CMFnR2M3.js → use-registry-connections-C3Shxtge.js} +1 -1
  152. package/dist/client/assets/{use-status-sounds-D0-nlwJm.js → use-status-sounds-BhmdTf72.js} +1 -1
  153. package/dist/client/assets/{use-tasks-yxuEm5KK.js → use-tasks-CFKcirif.js} +1 -1
  154. package/dist/client/assets/{use-view-mode-w75x4zz0.js → use-view-mode-DPFNPRhw.js} +1 -1
  155. package/dist/client/assets/{use-virtual-mcp-BHEEZv3B.js → use-virtual-mcp-D6IJdvj4.js} +1 -1
  156. package/dist/client/assets/useInfiniteQuery-nrn6q72G.js +1 -0
  157. package/dist/client/assets/useSuspenseInfiniteQuery-BQugVIVu.js +1 -0
  158. package/dist/client/assets/{user-QrqGbmQG.js → user-s33U8vUh.js} +1 -1
  159. package/dist/client/assets/{view-mode-toggle-C9HAxT_f.js → view-mode-toggle-DTQbwKIC.js} +1 -1
  160. package/dist/client/assets/workflow-BNc2v09H.js +1 -0
  161. package/dist/client/assets/workflow-detail-Dh3EHXZU.js +1 -0
  162. package/dist/client/index.html +2 -2
  163. package/dist/server/cli.js +1 -1
  164. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  165. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  166. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  167. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  168. package/dist/server/node_modules/environment/index.d.ts +74 -0
  169. package/dist/server/node_modules/environment/index.js +47 -0
  170. package/dist/server/node_modules/environment/package.json +74 -0
  171. package/dist/server/node_modules/environment/readme.md +94 -0
  172. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  173. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  174. package/dist/server/node_modules/escape-string-regexp/license +9 -0
  175. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  176. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  177. package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
  178. package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
  179. package/dist/server/node_modules/is-unicode-supported/license +9 -0
  180. package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
  181. package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
  182. package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
  183. package/dist/server/node_modules/restore-cursor/index.js +11 -0
  184. package/dist/server/node_modules/restore-cursor/license +9 -0
  185. package/dist/server/node_modules/restore-cursor/package.json +55 -0
  186. package/dist/server/node_modules/restore-cursor/readme.md +31 -0
  187. package/dist/server/node_modules/string-width/index.d.ts +39 -0
  188. package/dist/server/node_modules/string-width/index.js +82 -0
  189. package/dist/server/node_modules/string-width/license +9 -0
  190. package/dist/server/node_modules/string-width/package.json +64 -0
  191. package/dist/server/node_modules/string-width/readme.md +66 -0
  192. package/package.json +1 -1
  193. package/dist/client/assets/ChevronDown-tb8ftSUO.js +0 -1
  194. package/dist/client/assets/Star01-PFA-ZRDO.js +0 -1
  195. package/dist/client/assets/agent-icon-BXkkrCT3.js +0 -1
  196. package/dist/client/assets/agents-list-pk00bfJc.js +0 -1
  197. package/dist/client/assets/ai-providers-Dveb48ZT.js +0 -1
  198. package/dist/client/assets/automation-list-row-Uxaz0oZ0.js +0 -1
  199. package/dist/client/assets/automations-D7r6frZo.js +0 -1
  200. package/dist/client/assets/brand-context-5BxhNz9E.js +0 -1
  201. package/dist/client/assets/checkbox-CzxaEVzA.js +0 -1
  202. package/dist/client/assets/collection-detail-Be4vkD6s.js +0 -1
  203. package/dist/client/assets/collection-display-button-CPI0oCFf.js +0 -1
  204. package/dist/client/assets/connection-detail-CPlnEGaw.js +0 -1
  205. package/dist/client/assets/connections-BhKrBMUX.js +0 -1
  206. package/dist/client/assets/dropdown-menu-C6XDnng5.js +0 -1
  207. package/dist/client/assets/general-CvDecDeA.js +0 -1
  208. package/dist/client/assets/index-B1-8qqRf.js +0 -1
  209. package/dist/client/assets/index-BycfnvwM.js +0 -1
  210. package/dist/client/assets/index-DHF2V7ZS.js +0 -1
  211. package/dist/client/assets/index-DQfkXdA9.js +0 -1
  212. package/dist/client/assets/plugin-header-CBh0Saol.js +0 -1
  213. package/dist/client/assets/profile-CW9gorWX.js +0 -1
  214. package/dist/client/assets/project-app-view-DZI64J4I.js +0 -1
  215. package/dist/client/assets/registry-Q3WKF7CA.js +0 -2
  216. package/dist/client/assets/roles-CJua0nhs.js +0 -1
  217. package/dist/client/assets/select-C0JTp_6a.js +0 -1
  218. package/dist/client/assets/select-model-D0i0wiFX.js +0 -4
  219. package/dist/client/assets/store-registry-D0a7tFCj.js +0 -2
  220. package/dist/client/assets/useInfiniteQuery-3jN4yA7O.js +0 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-CEYJOeyf.js +0 -1
  222. package/dist/client/assets/workflow-D70YjEfw.js +0 -1
  223. package/dist/client/assets/workflow-detail-1NvP9qC0.js +0 -1
  224. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  225. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  226. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  227. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  228. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  229. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  230. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  231. package/dist/server/node_modules/onetime/index.d.ts +0 -64
  232. package/dist/server/node_modules/onetime/index.js +0 -44
  233. package/dist/server/node_modules/onetime/package.json +0 -43
  234. package/dist/server/node_modules/onetime/readme.md +0 -94
  235. /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
  236. /package/dist/server/node_modules/{onetime → environment}/license +0 -0
@@ -1 +1 @@
1
- import{r as u,e as w}from"./index-Dl2t23Jt.js";import{u as E}from"./use-view-mode-w75x4zz0.js";function J(a){const e=`deco-filters-${a}`,[s,i]=u.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[s,t=>{i(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function N(a){const e=w.c(7),[s,i]=u.useState(a),[r,t]=u.useState(a?"desc":null);let l;e[0]!==r||e[1]!==s?(l=S=>{s!==S?(i(S),t("asc")):r==="asc"?t("desc"):r==="desc"&&(i(void 0),t(null))},e[0]=r,e[1]=s,e[2]=l):l=e[2];const d=l;let o;return e[3]!==d||e[4]!==r||e[5]!==s?(o={sortKey:s,sortDirection:r,handleSort:d},e[3]=d,e[4]=r,e[5]=s,e[6]=o):o=e[6],o}function W(a){const e=w.c(20),{namespace:s,resource:i,defaultSortKey:r,defaultViewMode:t}=a,l=r===void 0?"title":r,d=t===void 0?"table":t,[o,S]=u.useState(""),b=u.useDeferredValue(o),D=`${s}-${i}`,[p,F]=J(D),c=`mesh-${i}-filter-visible-${s}`;let g;e[0]!==c?(g=()=>globalThis.localStorage?.getItem(c)==="true",e[0]=c,e[1]=g):g=e[1];const[n,x]=u.useState(g);let h;e[2]!==c?(h=T=>{x(T),globalThis.localStorage?.setItem(c,String(T))},e[2]=c,e[3]=h):h=e[3];const f=h;let m;e[4]!==n||e[5]!==f?(m=()=>{f(!n)},e[4]=n,e[5]=f,e[6]=m):m=e[6];const V=m,[$,K]=E(`mesh-${i}-${s}`,d),{sortKey:I,sortDirection:v,handleSort:B}=N(l),M=I;let y;return e[7]!==n||e[8]!==p||e[9]!==B||e[10]!==o||e[11]!==b||e[12]!==f||e[13]!==F||e[14]!==K||e[15]!==v||e[16]!==M||e[17]!==V||e[18]!==$?(y={search:o,searchTerm:b,setSearch:S,filters:p,setFilters:F,filterBarVisible:n,setFilterBarVisible:f,toggleFilterBar:V,viewMode:$,setViewMode:K,sortKey:M,sortDirection:v,handleSort:B},e[7]=n,e[8]=p,e[9]=B,e[10]=o,e[11]=b,e[12]=f,e[13]=F,e[14]=K,e[15]=v,e[16]=M,e[17]=V,e[18]=$,e[19]=y):y=e[19],y}export{W as u};
1
+ import{r as u,e as w}from"./index-CzhKzgtD.js";import{u as E}from"./use-view-mode-DPFNPRhw.js";function J(a){const e=`deco-filters-${a}`,[s,i]=u.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[s,t=>{i(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function N(a){const e=w.c(7),[s,i]=u.useState(a),[r,t]=u.useState(a?"desc":null);let l;e[0]!==r||e[1]!==s?(l=S=>{s!==S?(i(S),t("asc")):r==="asc"?t("desc"):r==="desc"&&(i(void 0),t(null))},e[0]=r,e[1]=s,e[2]=l):l=e[2];const d=l;let o;return e[3]!==d||e[4]!==r||e[5]!==s?(o={sortKey:s,sortDirection:r,handleSort:d},e[3]=d,e[4]=r,e[5]=s,e[6]=o):o=e[6],o}function W(a){const e=w.c(20),{namespace:s,resource:i,defaultSortKey:r,defaultViewMode:t}=a,l=r===void 0?"title":r,d=t===void 0?"table":t,[o,S]=u.useState(""),b=u.useDeferredValue(o),D=`${s}-${i}`,[p,F]=J(D),c=`mesh-${i}-filter-visible-${s}`;let g;e[0]!==c?(g=()=>globalThis.localStorage?.getItem(c)==="true",e[0]=c,e[1]=g):g=e[1];const[n,x]=u.useState(g);let h;e[2]!==c?(h=T=>{x(T),globalThis.localStorage?.setItem(c,String(T))},e[2]=c,e[3]=h):h=e[3];const f=h;let m;e[4]!==n||e[5]!==f?(m=()=>{f(!n)},e[4]=n,e[5]=f,e[6]=m):m=e[6];const V=m,[$,K]=E(`mesh-${i}-${s}`,d),{sortKey:I,sortDirection:v,handleSort:B}=N(l),M=I;let y;return e[7]!==n||e[8]!==p||e[9]!==B||e[10]!==o||e[11]!==b||e[12]!==f||e[13]!==F||e[14]!==K||e[15]!==v||e[16]!==M||e[17]!==V||e[18]!==$?(y={search:o,searchTerm:b,setSearch:S,filters:p,setFilters:F,filterBarVisible:n,setFilterBarVisible:f,toggleFilterBar:V,viewMode:$,setViewMode:K,sortKey:M,sortDirection:v,handleSort:B},e[7]=n,e[8]=p,e[9]=B,e[10]=o,e[11]=b,e[12]=f,e[13]=F,e[14]=K,e[15]=v,e[16]=M,e[17]=V,e[18]=$,e[19]=y):y=e[19],y}export{W as u};
@@ -1 +1 @@
1
- import{e as m,a as C,n as p,w as q}from"./index-Dl2t23Jt.js";import{K as T}from"./constants-CfwGLQ49.js";function M(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function O(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function w(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function F(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function P(a){const e=m.c(8);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{M as a,O as b,w as c,P as d,F as u};
1
+ import{e as m,a as C,n as p,w as q}from"./index-CzhKzgtD.js";import{K as T}from"./constants-B9wErdMg.js";function M(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function O(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function w(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function F(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function P(a){const e=m.c(8);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{M as a,O as b,w as c,P as d,F as u};
@@ -1 +1 @@
1
- import{e as n,s as i,w as l,K as m}from"./index-Dl2t23Jt.js";import{u as a}from"./use-org-auth-client-CS0Acn4M.js";function p(){const e=n.c(7),{locator:o}=i(),u=a();let t;e[0]!==o?(t=m.members(o),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.organization.listMembers(),e[2]=u,e[3]=s):s=e[3];let r;return e[4]!==t||e[5]!==s?(r={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=r):r=e[6],l(r)}export{p as u};
1
+ import{e as n,s as i,w as l,K as m}from"./index-CzhKzgtD.js";import{u as a}from"./use-org-auth-client-DFDdOgNz.js";function p(){const e=n.c(7),{locator:o}=i(),u=a();let t;e[0]!==o?(t=m.members(o),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.organization.listMembers(),e[2]=u,e[3]=s):s=e[3];let r;return e[4]!==t||e[5]!==s?(r={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=r):r=e[6],l(r)}export{p as u};
@@ -1 +1 @@
1
- import{e as x,b as C,Q as b,f as k,s as v}from"./index-Dl2t23Jt.js";import{b as y}from"./use-virtual-mcp-BHEEZv3B.js";function N(s,i){const e=x.c(16),{data:l}=C.useSession(),a=l?.user?.id??"anon",$=`mesh:pinned-agents:${s}:${a}`;let r;e[0]!==i?(r=o=>o??i,e[0]=i,e[1]=r):r=e[1];const[n,t]=b($,r);let c;e[2]!==t?(c=o=>{t(f=>f.includes(o)?f:[...f,o])},e[2]=t,e[3]=c):c=e[3];const u=c;let d;e[4]!==t?(d=o=>{t(f=>f.filter(A=>A!==o))},e[4]=t,e[5]=d):d=e[5];const h=d;let g;e[6]!==t?(g=o=>{t(o)},e[6]=t,e[7]=g):g=e[7];const I=g;let p;e[8]!==n?(p=o=>n.includes(o),e[8]=n,e[9]=p):p=e[9];const P=p;let m;return e[10]!==P||e[11]!==u||e[12]!==n||e[13]!==I||e[14]!==h?(m={pinnedIds:n,pin:u,unpin:h,reorder:I,isPinned:P},e[10]=P,e[11]=u,e[12]=n,e[13]=I,e[14]=h,e[15]=m):m=e[15],m}function D(){const s=x.c(6),i=k(),{org:e}=v(),l=y();let a;s[0]!==l?(a=l.filter(U).map(S),s[0]=l,s[1]=a):a=s[1];const $=a,{pin:r}=N(e.id,$);let n;return s[2]!==i||s[3]!==e.slug||s[4]!==r?(n=(t,c)=>{r(t);const u=crypto.randomUUID();i({to:"/$org/$taskId",params:{org:e.slug,taskId:u},search:{...c?.search??{},virtualmcpid:t}})},s[2]=i,s[3]=e.slug,s[4]=r,s[5]=n):n=s[5],n}function S(s){return s.id}function U(s){return!!s.pinned}export{D as a,N as u};
1
+ import{e as x,b as C,Q as b,f as k,s as v}from"./index-CzhKzgtD.js";import{b as y}from"./use-virtual-mcp-D6IJdvj4.js";function N(s,i){const e=x.c(16),{data:l}=C.useSession(),a=l?.user?.id??"anon",$=`mesh:pinned-agents:${s}:${a}`;let r;e[0]!==i?(r=o=>o??i,e[0]=i,e[1]=r):r=e[1];const[n,t]=b($,r);let c;e[2]!==t?(c=o=>{t(f=>f.includes(o)?f:[...f,o])},e[2]=t,e[3]=c):c=e[3];const u=c;let d;e[4]!==t?(d=o=>{t(f=>f.filter(A=>A!==o))},e[4]=t,e[5]=d):d=e[5];const h=d;let g;e[6]!==t?(g=o=>{t(o)},e[6]=t,e[7]=g):g=e[7];const I=g;let p;e[8]!==n?(p=o=>n.includes(o),e[8]=n,e[9]=p):p=e[9];const P=p;let m;return e[10]!==P||e[11]!==u||e[12]!==n||e[13]!==I||e[14]!==h?(m={pinnedIds:n,pin:u,unpin:h,reorder:I,isPinned:P},e[10]=P,e[11]=u,e[12]=n,e[13]=I,e[14]=h,e[15]=m):m=e[15],m}function D(){const s=x.c(6),i=k(),{org:e}=v(),l=y();let a;s[0]!==l?(a=l.filter(U).map(S),s[0]=l,s[1]=a):a=s[1];const $=a,{pin:r}=N(e.id,$);let n;return s[2]!==i||s[3]!==e.slug||s[4]!==r?(n=(t,c)=>{r(t);const u=crypto.randomUUID();i({to:"/$org/$taskId",params:{org:e.slug,taskId:u},search:{...c?.search??{},virtualmcpid:t}})},s[2]=i,s[3]=e.slug,s[4]=r,s[5]=n):n=s[5],n}function S(s){return s.id}function U(s){return!!s.pinned}export{D as a,N as u};
@@ -1 +1 @@
1
- import{e as h,s as x,b as i}from"./index-Dl2t23Jt.js";function q(){const e=h.c(29),{org:y}=x(),n=y.id;let v;e[0]!==n?(v=R=>(M=>i.organization[R]({...M??{},organizationId:n})),e[0]=n,e[1]=v):v=e[1];const t=v;let z;e[2]!==n?(z=R=>(M=>{const f={...M??{}},O=f.query??{};return f.query={...O,organizationId:n},i.organization[R](f)}),e[2]=n,e[3]=z):z=e[3];const b=z;let o,a;e[4]!==b?(o=b("listMembers"),a=b("listRoles"),e[4]=b,e[5]=o,e[6]=a):(o=e[5],a=e[6]);let r,l,s,c,u,g,d,m,p;e[7]!==t?(c=t("inviteMember"),u=t("removeMember"),g=t("updateMemberRole"),d=t("addMember"),m=t("createRole"),p=t("updateRole"),r=t("deleteRole"),l=t("cancelInvitation"),s=t("update"),e[7]=t,e[8]=r,e[9]=l,e[10]=s,e[11]=c,e[12]=u,e[13]=g,e[14]=d,e[15]=m,e[16]=p):(r=e[8],l=e[9],s=e[10],c=e[11],u=e[12],g=e[13],d=e[14],m=e[15],p=e[16]);let I;return e[17]!==r||e[18]!==l||e[19]!==s||e[20]!==o||e[21]!==a||e[22]!==c||e[23]!==u||e[24]!==g||e[25]!==d||e[26]!==m||e[27]!==p?(I={organization:{listMembers:o,listRoles:a,inviteMember:c,removeMember:u,updateMemberRole:g,addMember:d,createRole:m,updateRole:p,deleteRole:r,cancelInvitation:l,update:s,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[17]=r,e[18]=l,e[19]=s,e[20]=o,e[21]=a,e[22]=c,e[23]=u,e[24]=g,e[25]=d,e[26]=m,e[27]=p,e[28]=I):I=e[28],I}export{q as u};
1
+ import{e as h,s as x,b as i}from"./index-CzhKzgtD.js";function q(){const e=h.c(29),{org:y}=x(),n=y.id;let v;e[0]!==n?(v=R=>(M=>i.organization[R]({...M??{},organizationId:n})),e[0]=n,e[1]=v):v=e[1];const t=v;let z;e[2]!==n?(z=R=>(M=>{const f={...M??{}},O=f.query??{};return f.query={...O,organizationId:n},i.organization[R](f)}),e[2]=n,e[3]=z):z=e[3];const b=z;let o,a;e[4]!==b?(o=b("listMembers"),a=b("listRoles"),e[4]=b,e[5]=o,e[6]=a):(o=e[5],a=e[6]);let r,l,s,c,u,g,d,m,p;e[7]!==t?(c=t("inviteMember"),u=t("removeMember"),g=t("updateMemberRole"),d=t("addMember"),m=t("createRole"),p=t("updateRole"),r=t("deleteRole"),l=t("cancelInvitation"),s=t("update"),e[7]=t,e[8]=r,e[9]=l,e[10]=s,e[11]=c,e[12]=u,e[13]=g,e[14]=d,e[15]=m,e[16]=p):(r=e[8],l=e[9],s=e[10],c=e[11],u=e[12],g=e[13],d=e[14],m=e[15],p=e[16]);let I;return e[17]!==r||e[18]!==l||e[19]!==s||e[20]!==o||e[21]!==a||e[22]!==c||e[23]!==u||e[24]!==g||e[25]!==d||e[26]!==m||e[27]!==p?(I={organization:{listMembers:o,listRoles:a,inviteMember:c,removeMember:u,updateMemberRole:g,addMember:d,createRole:m,updateRole:p,deleteRole:r,cancelInvitation:l,update:s,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[17]=r,e[18]=l,e[19]=s,e[20]=o,e[21]=a,e[22]=c,e[23]=u,e[24]=g,e[25]=d,e[26]=m,e[27]=p,e[28]=I):I=e[28],I}export{q as u};
@@ -1 +1 @@
1
- import{e as u,n as S,o as l,a as y,K as c}from"./index-Dl2t23Jt.js";function w(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoStatus(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/status`);if(!r.ok)throw new Error("Failed to check SSO status");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function q(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoConfig(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`);if(!r.ok)throw new Error("Failed to fetch SSO config");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function C(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to save SSO config")}return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function O(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`,{method:"DELETE"});if(!r.ok)throw new Error("Failed to delete SSO config");return r.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function m(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:r})});if(!f.ok)throw new Error("Failed to toggle SSO enforcement");return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}export{q as a,C as b,O as c,m as d,w as u};
1
+ import{e as u,n as S,o as l,a as y,K as c}from"./index-CzhKzgtD.js";function w(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoStatus(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/status`);if(!r.ok)throw new Error("Failed to check SSO status");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function q(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoConfig(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`);if(!r.ok)throw new Error("Failed to fetch SSO config");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function C(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to save SSO config")}return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function O(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`,{method:"DELETE"});if(!r.ok)throw new Error("Failed to delete SSO config");return r.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function m(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:r})});if(!f.ok)throw new Error("Failed to toggle SSO enforcement");return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}export{q as a,C as b,O as c,m as d,w as u};
@@ -1 +1 @@
1
- import{u as p}from"./use-org-auth-client-CS0Acn4M.js";import{s as P,n as b,K as y}from"./index-Dl2t23Jt.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ")}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const a=[];let n=!1;const u=[];let c=!1;const r=new Set;let s=!1,f=0,o=!1;for(const[l,e]of Object.entries(t)){if(l==="self"){e.includes("*")?n=!0:a.push(...e);continue}if(l==="models"){e.includes("*:*")?o=!0:f=e.length;continue}if(l==="*"){if(c=!0,e.includes("*"))s=!0;else for(const i of e)r.add(i);continue}if(u.push(l),e.includes("*"))s=!0;else for(const i of e)r.add(i)}return{staticPermissions:a,allowsAllStaticPermissions:n,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(r),allowsAllTools:s,modelCount:f,allowsAllModels:o}}function I(){const{locator:t}=P(),a=p(),{data:n,isLoading:u,error:c,refetch:r}=b({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const o=await a.organization.listRoles();return o?.error?(console.error("[useOrganizationRoles] API error:",o.error),[]):o?.data??[]}catch(o){return console.error("[useOrganizationRoles] Fetch error:",o),[]}},staleTime:3e4}),s=w.map(o=>({role:o.value,label:o.label,isBuiltin:o.isBuiltin}));if(n&&Array.isArray(n))for(const o of n){const l=o.role;if(!l||w.some(R=>R.value===l))continue;const{staticPermissions:e,allowsAllStaticPermissions:i,connectionIds:g,allowsAllConnections:m,toolNames:h,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(o.permission);s.push({id:o.id,role:l,label:B(l),isBuiltin:!1,permission:o.permission??void 0,staticPermissionCount:i?-1:e.length,allowsAllStaticPermissions:i,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:h.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(o=>!o.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(o=>o.isBuiltin),isLoading:u,error:c,refetch:r}}export{I as u};
1
+ import{u as p}from"./use-org-auth-client-DFDdOgNz.js";import{s as P,n as b,K as y}from"./index-CzhKzgtD.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ")}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const a=[];let n=!1;const u=[];let c=!1;const r=new Set;let s=!1,f=0,o=!1;for(const[l,e]of Object.entries(t)){if(l==="self"){e.includes("*")?n=!0:a.push(...e);continue}if(l==="models"){e.includes("*:*")?o=!0:f=e.length;continue}if(l==="*"){if(c=!0,e.includes("*"))s=!0;else for(const i of e)r.add(i);continue}if(u.push(l),e.includes("*"))s=!0;else for(const i of e)r.add(i)}return{staticPermissions:a,allowsAllStaticPermissions:n,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(r),allowsAllTools:s,modelCount:f,allowsAllModels:o}}function I(){const{locator:t}=P(),a=p(),{data:n,isLoading:u,error:c,refetch:r}=b({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const o=await a.organization.listRoles();return o?.error?(console.error("[useOrganizationRoles] API error:",o.error),[]):o?.data??[]}catch(o){return console.error("[useOrganizationRoles] Fetch error:",o),[]}},staleTime:3e4}),s=w.map(o=>({role:o.value,label:o.label,isBuiltin:o.isBuiltin}));if(n&&Array.isArray(n))for(const o of n){const l=o.role;if(!l||w.some(R=>R.value===l))continue;const{staticPermissions:e,allowsAllStaticPermissions:i,connectionIds:g,allowsAllConnections:m,toolNames:h,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(o.permission);s.push({id:o.id,role:l,label:B(l),isBuiltin:!1,permission:o.permission??void 0,staticPermissionCount:i?-1:e.length,allowsAllStaticPermissions:i,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:h.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(o=>!o.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(o=>o.isBuiltin),isLoading:u,error:c,refetch:r}}export{I as u};
@@ -1 +1 @@
1
- import{e as c,s as m,K as f,n as E,o as A,a as I,w as h}from"./index-Dl2t23Jt.js";import{S as g,u as _,d as z}from"./constants-CfwGLQ49.js";const d={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null},p={enabled:!1,chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};function y(t){const e=c.c(12),{org:n}=m();let s;e[0]!==n.id||e[1]!==n.slug?(s={connectionId:g,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const l=_(s);let i;e[3]!==n.id?(i=f.organizationSettings(n.id),e[3]=n.id,e[4]=i):i=e[4];let a;e[5]!==l||e[6]!==n.id?(a=async()=>{const u=await l.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return u?.isError?{...d,organizationId:n.id}:u.structuredContent??{...d,organizationId:n.id}},e[5]=l,e[6]=n.id,e[7]=a):a=e[7];const r=t;let o;return e[8]!==i||e[9]!==a||e[10]!==r?(o={queryKey:i,queryFn:a,staleTime:6e4,select:r},e[8]=i,e[9]=a,e[10]=r,e[11]=o):o=e[11],E(o)}function M(t,e){const n=c.c(11);let s;n[0]!==t||n[1]!==e?(s={connectionId:g,orgId:t,orgSlug:e},n[0]=t,n[1]=e,n[2]=s):s=n[2];const l=_(s);let i;n[3]!==t?(i=f.organizationSettings(t),n[3]=t,n[4]=i):i=n[4];let a;n[5]!==l||n[6]!==t?(a=async()=>{const u=await l.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return u?.isError?{...d,organizationId:t}:u.structuredContent??{...d,organizationId:t}},n[5]=l,n[6]=t,n[7]=a):a=n[7];let r;n[8]!==i||n[9]!==a?(r={queryKey:i,queryFn:a,staleTime:6e4},n[8]=i,n[9]=a,n[10]=r):r=n[10];const{data:o}=h(r);return o}function S(){const t=c.c(12),{org:e}=m();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 s=_(n),l=A();let i;t[3]!==s||t[4]!==e.id?(i=async o=>{const u=await s.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e.id,...o}});if(u?.isError)throw new Error(u.content?.[0]?.text??"Failed to update organization settings");const T=u.structuredContent;if(!T)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return T},t[3]=s,t[4]=e.id,t[5]=i):i=t[5];let a;t[6]!==e.id||t[7]!==l?(a=o=>{l.setQueryData(f.organizationSettings(e.id),u=>({...u??d,...o}))},t[6]=e.id,t[7]=l,t[8]=a):a=t[8];let r;return t[9]!==i||t[10]!==a?(r={mutationFn:i,onSuccess:a},t[9]=i,t[10]=a,t[11]=r):r=t[11],I(r)}function C(t){return t?{enabled:t.enabled??!1,chat:{fast:t.chat?.fast??null,smart:t.chat?.smart??null,thinking:t.chat?.thinking??null},image:t.image??null,webResearch:t.webResearch??null}:p}function P(){const{data:t}=y(N);return t??p}function N(t){return C(t.simple_mode)}function D(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({simple_mode:i},a),s=(i,a)=>e.mutateAsync({simple_mode:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function O(){const{data:t}=y(R);return t??null}function R(t){return t.registry_config}function $(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({registry_config:i},a),s=(i,a)=>e.mutateAsync({registry_config:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function U(){const{data:t}=y(w);return t??null}function w(t){return t.default_home_agents}function q(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({default_home_agents:i},a),s=(i,a)=>e.mutateAsync({default_home_agents:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function F(){const t=c.c(5),{org:e}=m(),n=O();let s;t[0]!==e.id?(s=z.REGISTRY(e.id),t[0]=e.id,t[1]=s):s=t[1];const l=s;let i;return t[2]!==l||t[3]!==n?(i=a=>{if(!n)return a===l;const r=n.registries[a];return r?r.enabled:a===l},t[2]=l,t[3]=n,t[4]=i):i=t[4],i}export{F as a,M as b,q as c,S as d,P as e,D as f,O as g,$ as h,U as u};
1
+ import{e as c,s as m,K as f,n as E,o as A,a as I,w as h}from"./index-CzhKzgtD.js";import{S as g,u as _,d as z}from"./constants-B9wErdMg.js";const d={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null},p={enabled:!1,chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};function y(t){const e=c.c(12),{org:n}=m();let s;e[0]!==n.id||e[1]!==n.slug?(s={connectionId:g,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const l=_(s);let i;e[3]!==n.id?(i=f.organizationSettings(n.id),e[3]=n.id,e[4]=i):i=e[4];let a;e[5]!==l||e[6]!==n.id?(a=async()=>{const u=await l.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return u?.isError?{...d,organizationId:n.id}:u.structuredContent??{...d,organizationId:n.id}},e[5]=l,e[6]=n.id,e[7]=a):a=e[7];const r=t;let o;return e[8]!==i||e[9]!==a||e[10]!==r?(o={queryKey:i,queryFn:a,staleTime:6e4,select:r},e[8]=i,e[9]=a,e[10]=r,e[11]=o):o=e[11],E(o)}function M(t,e){const n=c.c(11);let s;n[0]!==t||n[1]!==e?(s={connectionId:g,orgId:t,orgSlug:e},n[0]=t,n[1]=e,n[2]=s):s=n[2];const l=_(s);let i;n[3]!==t?(i=f.organizationSettings(t),n[3]=t,n[4]=i):i=n[4];let a;n[5]!==l||n[6]!==t?(a=async()=>{const u=await l.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return u?.isError?{...d,organizationId:t}:u.structuredContent??{...d,organizationId:t}},n[5]=l,n[6]=t,n[7]=a):a=n[7];let r;n[8]!==i||n[9]!==a?(r={queryKey:i,queryFn:a,staleTime:6e4},n[8]=i,n[9]=a,n[10]=r):r=n[10];const{data:o}=h(r);return o}function S(){const t=c.c(12),{org:e}=m();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 s=_(n),l=A();let i;t[3]!==s||t[4]!==e.id?(i=async o=>{const u=await s.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e.id,...o}});if(u?.isError)throw new Error(u.content?.[0]?.text??"Failed to update organization settings");const T=u.structuredContent;if(!T)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return T},t[3]=s,t[4]=e.id,t[5]=i):i=t[5];let a;t[6]!==e.id||t[7]!==l?(a=o=>{l.setQueryData(f.organizationSettings(e.id),u=>({...u??d,...o}))},t[6]=e.id,t[7]=l,t[8]=a):a=t[8];let r;return t[9]!==i||t[10]!==a?(r={mutationFn:i,onSuccess:a},t[9]=i,t[10]=a,t[11]=r):r=t[11],I(r)}function C(t){return t?{enabled:t.enabled??!1,chat:{fast:t.chat?.fast??null,smart:t.chat?.smart??null,thinking:t.chat?.thinking??null},image:t.image??null,webResearch:t.webResearch??null}:p}function P(){const{data:t}=y(N);return t??p}function N(t){return C(t.simple_mode)}function D(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({simple_mode:i},a),s=(i,a)=>e.mutateAsync({simple_mode:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function O(){const{data:t}=y(R);return t??null}function R(t){return t.registry_config}function $(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({registry_config:i},a),s=(i,a)=>e.mutateAsync({registry_config:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function U(){const{data:t}=y(w);return t??null}function w(t){return t.default_home_agents}function q(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({default_home_agents:i},a),s=(i,a)=>e.mutateAsync({default_home_agents:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let l;return t[3]!==e||t[4]!==n||t[5]!==s?(l={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=l):l=t[6],l}function F(){const t=c.c(5),{org:e}=m(),n=O();let s;t[0]!==e.id?(s=z.REGISTRY(e.id),t[0]=e.id,t[1]=s):s=t[1];const l=s;let i;return t[2]!==l||t[3]!==n?(i=a=>{if(!n)return a===l;const r=n.registries[a];return r?r.enabled:a===l},t[2]=l,t[3]=n,t[4]=i):i=t[4],i}export{F as a,M as b,q as c,S as d,P as e,D as f,O as g,$ as h,U as u};
@@ -1 +1 @@
1
- import{e as a,s as C}from"./index-Dl2t23Jt.js";import{u as R}from"./use-connection-pSv7eY2y.js";import{d as u}from"./constants-CfwGLQ49.js";import{g as p}from"./use-organization-settings-Dak2xww8.js";function E(){const e=a.c(17),{org:i}=C(),o=p();let n;e[0]!==i.id?(n=u.REGISTRY(i.id),e[0]=i.id,e[1]=n):n=e[1];const c=n;let l;e[2]!==i.id?(l=u.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=l):l=e[3];const d=l;let r;e[4]!==d||e[5]!==c?(r=[c,d],e[4]=d,e[5]=c,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const m of s)t.add(m)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const g=R();let f;if(e[12]!==g||e[13]!==t){let s;e[15]!==t?(s=m=>t.has(m.id),e[15]=t,e[16]=s):s=e[16],f=g.filter(s),e[12]=g,e[13]=t,e[14]=f}else f=e[14];return f}export{E as u};
1
+ import{e as a,s as C}from"./index-CzhKzgtD.js";import{u as R}from"./use-connection-mkdAsO3d.js";import{d as u}from"./constants-B9wErdMg.js";import{g as p}from"./use-organization-settings-BcP9GxNe.js";function E(){const e=a.c(17),{org:i}=C(),o=p();let n;e[0]!==i.id?(n=u.REGISTRY(i.id),e[0]=i.id,e[1]=n):n=e[1];const c=n;let l;e[2]!==i.id?(l=u.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=l):l=e[3];const d=l;let r;e[4]!==d||e[5]!==c?(r=[c,d],e[4]=d,e[5]=c,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const m of s)t.add(m)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const g=R();let f;if(e[12]!==g||e[13]!==t){let s;e[15]!==t?(s=m=>t.has(m.id),e[15]=t,e[16]=s):s=e[16],f=g.filter(s),e[12]=g,e[13]=t,e[14]=f}else f=e[14];return f}export{E as u};
@@ -1 +1 @@
1
- import{e as r,P as u}from"./index-Dl2t23Jt.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-CXVUS53e.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
1
+ import{e as r,P as u}from"./index-CzhKzgtD.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-BqnGpCsr.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
@@ -1 +1 @@
1
- import{e as p,s as y,o as A,K as C}from"./index-Dl2t23Jt.js";import{a as S}from"./use-collections-CwD8DZNY.js";import{S as x,u as E}from"./constants-CfwGLQ49.js";function M(){const t=p.c(13),{org:e,locator:c}=y();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:x,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const m=E(n),l=A(),i=S(e.id,"THREADS",m),s=i.create;let r;t[3]!==c||t[4]!==s||t[5]!==l?(r=async(f,d)=>{const g=await s.mutateAsync(f,d);return l.invalidateQueries({queryKey:C.tasksPrefix(c)}),g},t[3]=c,t[4]=s,t[5]=l,t[6]=r):r=t[6];const u=r;let o;t[7]!==s||t[8]!==u?(o={...s,mutateAsync:u},t[7]=s,t[8]=u,t[9]=o):o=t[9];let a;return t[10]!==i||t[11]!==o?(a={...i,create:o},t[10]=i,t[11]=o,t[12]=a):a=t[12],a}export{M as u};
1
+ import{e as p,s as y,o as A,K as C}from"./index-CzhKzgtD.js";import{a as S}from"./use-collections-DFXlD5a6.js";import{S as x,u as E}from"./constants-B9wErdMg.js";function M(){const t=p.c(13),{org:e,locator:c}=y();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:x,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const m=E(n),l=A(),i=S(e.id,"THREADS",m),s=i.create;let r;t[3]!==c||t[4]!==s||t[5]!==l?(r=async(f,d)=>{const g=await s.mutateAsync(f,d);return l.invalidateQueries({queryKey:C.tasksPrefix(c)}),g},t[3]=c,t[4]=s,t[5]=l,t[6]=r):r=t[6];const u=r;let o;t[7]!==s||t[8]!==u?(o={...s,mutateAsync:u},t[7]=s,t[8]=u,t[9]=o):o=t[9];let a;return t[10]!==i||t[11]!==o?(a={...i,create:o},t[10]=i,t[11]=o,t[12]=a):a=t[12],a}export{M as u};
@@ -1 +1 @@
1
- import{e as p,r as f}from"./index-Dl2t23Jt.js";import{u as w}from"./tooltip-CxizQODk.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-CzhKzgtD.js";import{u as w}from"./tooltip-DSuAs--v.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 l,s as u}from"./index-Dl2t23Jt.js";import{c as g,a,u as C}from"./use-collections-CwD8DZNY.js";import{S as c,u as r}from"./constants-CfwGLQ49.js";function M(s){const o=l.c(5);let t;o[0]!==s?(t=s===void 0?{}:s,o[0]=s,o[1]=t):t=o[1];const n=t,{org:i}=u();let e;o[2]!==i.id||o[3]!==i.slug?(e={connectionId:c,orgId:i.id,orgSlug:i.slug},o[2]=i.id,o[3]=i.slug,o[4]=e):e=o[4];const d=r(e);return g(i.id,"VIRTUAL_MCP",d,n)}function m(s){const o=l.c(3),{org:t}=u();let n;o[0]!==t.id||o[1]!==t.slug?(n={connectionId:c,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=n):n=o[2];const i=r(n);return C(t.id,"VIRTUAL_MCP",s??void 0,i)}function V(){const s=l.c(3),{org:o}=u();let t;s[0]!==o.id||s[1]!==o.slug?(t={connectionId:c,orgId:o.id,orgSlug:o.slug},s[0]=o.id,s[1]=o.slug,s[2]=t):t=s[2];const n=r(t);return a(o.id,"VIRTUAL_MCP",n)}export{V as a,M as b,m as u};
1
+ import{e as l,s as u}from"./index-CzhKzgtD.js";import{c as g,a,u as C}from"./use-collections-DFXlD5a6.js";import{S as c,u as r}from"./constants-B9wErdMg.js";function M(s){const o=l.c(5);let t;o[0]!==s?(t=s===void 0?{}:s,o[0]=s,o[1]=t):t=o[1];const n=t,{org:i}=u();let e;o[2]!==i.id||o[3]!==i.slug?(e={connectionId:c,orgId:i.id,orgSlug:i.slug},o[2]=i.id,o[3]=i.slug,o[4]=e):e=o[4];const d=r(e);return g(i.id,"VIRTUAL_MCP",d,n)}function m(s){const o=l.c(3),{org:t}=u();let n;o[0]!==t.id||o[1]!==t.slug?(n={connectionId:c,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=n):n=o[2];const i=r(n);return C(t.id,"VIRTUAL_MCP",s??void 0,i)}function V(){const s=l.c(3),{org:o}=u();let t;s[0]!==o.id||s[1]!==o.slug?(t={connectionId:c,orgId:o.id,orgSlug:o.slug},s[0]=o.id,s[1]=o.slug,s[2]=t):t=s[2];const n=r(t);return a(o.id,"VIRTUAL_MCP",n)}export{V as a,M as b,m as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-d4mpZ_Ot.js";import{c2 as i}from"./index-CzhKzgtD.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./infiniteQueryObserver-d4mpZ_Ot.js";import{c2 as u,c3 as n}from"./index-CzhKzgtD.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 S,s as b,n as C,K as k,c as y,j as t}from"./index-Dl2t23Jt.js";import{A as E}from"./avatar-C4FRugJb.js";import{S as A,u as _}from"./constants-CfwGLQ49.js";function K(m){const e=S.c(12),{org:u}=b();let x;e[0]!==u.id||e[1]!==u.slug?(x={connectionId:A,orgId:u.id,orgSlug:u.slug},e[0]=u.id,e[1]=u.slug,e[2]=x):x=e[2];const g=_(x);let d;e[3]!==m?(d=k.user(m),e[3]=m,e[4]=d):d=e[4];let s;e[5]!==g||e[6]!==m?(s=async()=>{const c=await g.callTool({name:"USER_GET",arguments:{id:m}});return(c.structuredContent??c).user},e[5]=g,e[6]=m,e[7]=s):s=e[7];const l=!!m;let o;return e[8]!==d||e[9]!==s||e[10]!==l?(o={queryKey:d,queryFn:s,staleTime:3e5,retry:1,enabled:l},e[8]=d,e[9]=s,e[10]=l,e[11]=o):o=e[11],C(o)}function T(m){const e=S.c(36),{id:u,size:x,showEmail:g,avatarOnly:d,className:s}=m,l=x===void 0?"xs":x,o=g===void 0?!1:g,c=d===void 0?!1:d,{data:r,isLoading:w,isError:U}=K(u);if(w){let a;e[0]!==s?(a=y("flex items-center gap-2",s),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==l?(i=t.jsx(E.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=i):i=e[3];let n;e[4]!==c||e[5]!==o?(n=!c&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),o&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=c,e[5]=o,e[6]=n):n=e[6];let f;return e[7]!==a||e[8]!==i||e[9]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[7]=a,e[8]=i,e[9]=n,e[10]=f):f=e[10],f}if(U||!r){let a;e[11]!==s?(a=y("flex items-center gap-2",s),e[11]=s,e[12]=a):a=e[12];let i;e[13]!==l?(i=t.jsx(E,{shape:"circle",size:l,fallback:"?",muted:!0}),e[13]=l,e[14]=i):i=e[14];let n;e[15]!==c?(n=!c&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=c,e[16]=n):n=e[16];let f;return e[17]!==a||e[18]!==i||e[19]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[17]=a,e[18]=i,e[19]=n,e[20]=f):f=e[20],f}let p;e[21]!==s?(p=y("flex items-center gap-2",s),e[21]=s,e[22]=p):p=e[22];const N=r.image??void 0;let v;e[23]!==l||e[24]!==N||e[25]!==r.name?(v=t.jsx(E,{shape:"circle",size:l,url:N,fallback:r.name}),e[23]=l,e[24]=N,e[25]=r.name,e[26]=v):v=e[26];let j;e[27]!==c||e[28]!==o||e[29]!==r.email||e[30]!==r.name?(j=!c&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:r.name}),o&&t.jsx("div",{className:"text-xs text-muted-foreground",children:r.email})]}),e[27]=c,e[28]=o,e[29]=r.email,e[30]=r.name,e[31]=j):j=e[31];let h;return e[32]!==p||e[33]!==v||e[34]!==j?(h=t.jsxs("div",{className:p,children:[v,j]}),e[32]=p,e[33]=v,e[34]=j,e[35]=h):h=e[35],h}export{T as U};
1
+ import{e as S,s as b,n as C,K as k,c as y,j as t}from"./index-CzhKzgtD.js";import{A as E}from"./avatar-97M2j8Mc.js";import{S as A,u as _}from"./constants-B9wErdMg.js";function K(m){const e=S.c(12),{org:u}=b();let x;e[0]!==u.id||e[1]!==u.slug?(x={connectionId:A,orgId:u.id,orgSlug:u.slug},e[0]=u.id,e[1]=u.slug,e[2]=x):x=e[2];const g=_(x);let d;e[3]!==m?(d=k.user(m),e[3]=m,e[4]=d):d=e[4];let s;e[5]!==g||e[6]!==m?(s=async()=>{const c=await g.callTool({name:"USER_GET",arguments:{id:m}});return(c.structuredContent??c).user},e[5]=g,e[6]=m,e[7]=s):s=e[7];const l=!!m;let o;return e[8]!==d||e[9]!==s||e[10]!==l?(o={queryKey:d,queryFn:s,staleTime:3e5,retry:1,enabled:l},e[8]=d,e[9]=s,e[10]=l,e[11]=o):o=e[11],C(o)}function T(m){const e=S.c(36),{id:u,size:x,showEmail:g,avatarOnly:d,className:s}=m,l=x===void 0?"xs":x,o=g===void 0?!1:g,c=d===void 0?!1:d,{data:r,isLoading:w,isError:U}=K(u);if(w){let a;e[0]!==s?(a=y("flex items-center gap-2",s),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==l?(i=t.jsx(E.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=i):i=e[3];let n;e[4]!==c||e[5]!==o?(n=!c&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),o&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=c,e[5]=o,e[6]=n):n=e[6];let f;return e[7]!==a||e[8]!==i||e[9]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[7]=a,e[8]=i,e[9]=n,e[10]=f):f=e[10],f}if(U||!r){let a;e[11]!==s?(a=y("flex items-center gap-2",s),e[11]=s,e[12]=a):a=e[12];let i;e[13]!==l?(i=t.jsx(E,{shape:"circle",size:l,fallback:"?",muted:!0}),e[13]=l,e[14]=i):i=e[14];let n;e[15]!==c?(n=!c&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=c,e[16]=n):n=e[16];let f;return e[17]!==a||e[18]!==i||e[19]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[17]=a,e[18]=i,e[19]=n,e[20]=f):f=e[20],f}let p;e[21]!==s?(p=y("flex items-center gap-2",s),e[21]=s,e[22]=p):p=e[22];const N=r.image??void 0;let v;e[23]!==l||e[24]!==N||e[25]!==r.name?(v=t.jsx(E,{shape:"circle",size:l,url:N,fallback:r.name}),e[23]=l,e[24]=N,e[25]=r.name,e[26]=v):v=e[26];let j;e[27]!==c||e[28]!==o||e[29]!==r.email||e[30]!==r.name?(j=!c&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:r.name}),o&&t.jsx("div",{className:"text-xs text-muted-foreground",children:r.email})]}),e[27]=c,e[28]=o,e[29]=r.email,e[30]=r.name,e[31]=j):j=e[31];let h;return e[32]!==p||e[33]!==v||e[34]!==j?(h=t.jsxs("div",{className:p,children:[v,j]}),e[32]=p,e[33]=v,e[34]=j,e[35]=h):h=e[35],h}export{T as U};
@@ -1 +1 @@
1
- import{e as P,r as v,c as m,j as o}from"./index-Dl2t23Jt.js";import{T as L,a as M,b as q}from"./tooltip-CxizQODk.js";const A={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function F(W){const e=P.c(29),{value:s,onValueChange:j,options:i,size:_,fullWidth:C,className:y}=W,$=_===void 0?"sm":_,u=C===void 0?!1:C,E=v.useRef(null),S=v.useRef(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},e[0]=x):x=e[0];const[f,k]=v.useState(x);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=t=>{if(!t.current)return;const{offsetLeft:R,offsetWidth:T}=t.current;k({left:R,width:T,opacity:1})},e[1]=g):g=e[1];const I=g;let b;e[2]!==i[0].value||e[3]!==s?(b=()=>{const t=s===i[0].value?E:S;I(t)},e[2]=i[0].value,e[3]=s,e[4]=b):b=e[4];let h;e[5]!==i||e[6]!==s?(h=[s,i],e[5]=i,e[6]=s,e[7]=h):h=e[7],v.useEffect(b,h);const d=A[$];let n;e[8]!==y?(n=m("relative flex gap-0 bg-muted rounded-lg",y),e[8]=y,e[9]=n):n=e[9];let l;e[10]!==d||e[11]!==u||e[12]!==j||e[13]!==i||e[14]!==s?(l=i.map((t,R)=>{const T=R===0?E:S,V=o.jsxs("button",{ref:T,type:"button",onClick:()=>j(t.value),className:m("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:[o.jsx("span",{className:m("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&&o.jsx("span",{className:m("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?o.jsxs(L,{children:[o.jsx(M,{asChild:!0,children:V}),o.jsx(q,{side:"bottom",children:t.tooltip})]},t.value):V}),e[10]=d,e[11]=u,e[12]=j,e[13]=i,e[14]=s,e[15]=l):l=e[15];const z=u?"h-12":d.button;let a;e[16]!==z?(a=m("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",z),e[16]=z,e[17]=a):a=e[17];const w=`${f.left}px`,N=`${f.width}px`;let r;e[18]!==f.opacity||e[19]!==w||e[20]!==N?(r={left:w,width:N,opacity:f.opacity},e[18]=f.opacity,e[19]=w,e[20]=N,e[21]=r):r=e[21];let c;e[22]!==a||e[23]!==r?(c=o.jsx("div",{className:a,style:r}),e[22]=a,e[23]=r,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==n||e[27]!==l?(p=o.jsxs("div",{className:n,children:[l,c]}),e[25]=c,e[26]=n,e[27]=l,e[28]=p):p=e[28],p}export{F as V};
1
+ import{e as P,r as v,c as m,j as o}from"./index-CzhKzgtD.js";import{T as L,a as M,b as q}from"./tooltip-DSuAs--v.js";const A={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function F(W){const e=P.c(29),{value:s,onValueChange:j,options:i,size:_,fullWidth:C,className:y}=W,$=_===void 0?"sm":_,u=C===void 0?!1:C,E=v.useRef(null),S=v.useRef(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},e[0]=x):x=e[0];const[f,k]=v.useState(x);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=t=>{if(!t.current)return;const{offsetLeft:R,offsetWidth:T}=t.current;k({left:R,width:T,opacity:1})},e[1]=g):g=e[1];const I=g;let b;e[2]!==i[0].value||e[3]!==s?(b=()=>{const t=s===i[0].value?E:S;I(t)},e[2]=i[0].value,e[3]=s,e[4]=b):b=e[4];let h;e[5]!==i||e[6]!==s?(h=[s,i],e[5]=i,e[6]=s,e[7]=h):h=e[7],v.useEffect(b,h);const d=A[$];let n;e[8]!==y?(n=m("relative flex gap-0 bg-muted rounded-lg",y),e[8]=y,e[9]=n):n=e[9];let l;e[10]!==d||e[11]!==u||e[12]!==j||e[13]!==i||e[14]!==s?(l=i.map((t,R)=>{const T=R===0?E:S,V=o.jsxs("button",{ref:T,type:"button",onClick:()=>j(t.value),className:m("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:[o.jsx("span",{className:m("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&&o.jsx("span",{className:m("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?o.jsxs(L,{children:[o.jsx(M,{asChild:!0,children:V}),o.jsx(q,{side:"bottom",children:t.tooltip})]},t.value):V}),e[10]=d,e[11]=u,e[12]=j,e[13]=i,e[14]=s,e[15]=l):l=e[15];const z=u?"h-12":d.button;let a;e[16]!==z?(a=m("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",z),e[16]=z,e[17]=a):a=e[17];const w=`${f.left}px`,N=`${f.width}px`;let r;e[18]!==f.opacity||e[19]!==w||e[20]!==N?(r={left:w,width:N,opacity:f.opacity},e[18]=f.opacity,e[19]=w,e[20]=N,e[21]=r):r=e[21];let c;e[22]!==a||e[23]!==r?(c=o.jsx("div",{className:a,style:r}),e[22]=a,e[23]=r,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==n||e[27]!==l?(p=o.jsxs("div",{className:n,children:[l,c]}),e[25]=c,e[26]=n,e[27]=l,e[28]=p):p=e[28],p}export{F as V};
@@ -0,0 +1 @@
1
+ import{e as oe,j as t,B as Ce,f as Be,b as ct,s as ze,r as dt,x as Le,o as ut,a as mt,K as Fe,Y as Ke,Z as pt}from"./index-CzhKzgtD.js";import{u as Ve,S as qe}from"./constants-B9wErdMg.js";import{B as ft,g as Me}from"./constants-XC36TPvL.js";import{C as Qe}from"./collection-display-button-C5vtHGnK.js";import{C as ht}from"./collection-search-CzQYdsP4.js";import{C as gt}from"./card-DfJe5L79.js";import{I as Ge}from"./integration-icon-CSgHR76X.js";import{D as He,a as Ye,b as Je,c as O}from"./dropdown-menu-bofOMeLm.js";import{c as Ze}from"./XCircle-kdEx_GGF.js";import{i as Xe}from"./DotsVertical-BxlMGXPv.js";import{y as et,H as Ue}from"./agent-icon-BBG09Kki.js";import{s as tt}from"./RefreshCcw01-BBhbyLOk.js";import{s as st}from"./Trash01-DqDMVyTa.js";import{C as xt}from"./collection-table-wrapper-Bna3sxAQ.js";import{E as We}from"./empty-state-iSyeAylK.js";import{U as jt}from"./user-s33U8vUh.js";import{E as it}from"./empty-state-Bl1VCnIe.js";import{u as Ct}from"./use-list-state-DJhZm6uG.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-ChbEbjde.js";import{a as It,c as At}from"./use-collections-DFXlD5a6.js";import{a as Tt}from"./use-connection-mkdAsO3d.js";import{s as Et}from"./Plus-Cd4I0_d-.js";import{a as Ot}from"./layout-DEdN-ZCr.js";import{P as je}from"./index-BBoaHd8c.js";import"./collections-CTGZthcG.js";import"./XClose-D8EpU_uy.js";import"./Check-D7cmovlU.js";import"./tooltip-DSuAs--v.js";import"./view-mode-toggle-DTQbwKIC.js";import"./badge-CGsQT5nT.js";import"./SearchMd-cj9P259i.js";import"./Container-B6Z-4M-T.js";import"./ChevronRight-BoDMW1uU.js";import"./AlertCircle-YdvcZKe8.js";import"./Tool01-DXbOwd1n.js";import"./ArrowNarrowLeft-spQjUruy.js";import"./ArrowUpRight-B1ajIZNC.js";import"./ZapSquare-Biix1-55.js";import"./Users03-DGRxeg5O.js";import"./CheckCircle-BQ3_L_yP.js";import"./ChevronDown-BfDxcbjR.js";import"./ChevronUp-CRQBEG-R.js";import"./Star01-UQZ7hTDj.js";import"./Palette-96pDg1d-.js";import"./LinkExternal01-Dmf65eFo.js";import"./Lock01-CHWOYjbh.js";import"./Sun-Cr3NKiIh.js";import"./Play-ChzLrbkr.js";import"./Settings02-Cx39xFqG.js";import"./Shield01-DDhNoo0b.js";import"./User01-C7C_-f57.js";import"./X-8IHaEYtM.js";import"./Zap-DdUb_mPC.js";import"./table-qL_Cu6WT.js";import"./avatar-97M2j8Mc.js";import"./use-view-mode-DPFNPRhw.js";function $t(i,e){const s=i.properties||{};for(const n in s){const c=s[n];if(c&&c.type==="string"&&(c.format==="url"||c.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of r)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:r,actions:n}=i;let c;e[0]!==s||e[1]!==r?(c=$t(r,s),e[0]=s,e[1]=r,e[2]=c):c=e[2];const l=c,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let d;e[3]!==n?(d=n&&Object.keys(n).length>0,e[3]=n,e[4]=d):d=e[4];const o=d;let m;e[5]!==l||e[6]!==s.title?(m=t.jsx(Ge,{icon:l,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=l,e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==s.title?(u=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=u):u=e[9];const f=p||"No description";let a;e[10]!==f?(a=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:f}),e[10]=f,e[11]=a):a=e[11];let v;e[12]!==u||e[13]!==a?(v=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[u,a]}),e[12]=u,e[13]=a,e[14]=v):v=e[14];let y;e[15]!==m||e[16]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,v]}),e[15]=m,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:Kt,onMouseDown:Ft,children:t.jsxs(He,{children:[t.jsx(Ye,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Lt,children:t.jsx(Xe,{size:20})})}),t.jsxs(Je,{align:"end",onClick:zt,children:[n.open&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(tt,{size:16}),"Open"]}),n.edit&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(et,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Ze,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(O,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(st,{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 zt(i){return i.stopPropagation()}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}const Mt=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Ut(i){return Object.keys(i).find(e=>Mt.includes(e.toLowerCase()))}function ot(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 Wt(i){const e=oe.c(30),{data:s,schema:r,viewMode:n,search:c,sortKey:l,sortDirection:p,onSort:d,actions:o,onItemClick:m,headerActions:u,emptyState:f,readOnly:a,columns:v,hideToolbar:y,sortableFields:b}=i,x=p===void 0?"asc":p,g=d===void 0?qt:d;let $;e[0]!==o?($=o===void 0?{}:o,e[0]=o,e[1]=$):$=e[1];const h=$,T=m===void 0?Vt:m,E=u===void 0?null:u,N=f===void 0?null:f,k=a===void 0?!1:a,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]!==r||e[4]!==P?(D=j?j.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(r,P),e[2]=j,e[3]=r,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]!==l||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:l,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=l,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==r||e[21]!==c||e[22]!==x||e[23]!==l||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(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"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(kt,{item:A,schema:r,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Ht(j,r,P,h),data:s,sortKey:l,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}),e[13]=h,e[14]=j,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=r,e[21]=c,e[22]=x,e[23]=l,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 Rt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function Bt(i){return i.sortable!==!1}function Vt(){}function qt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(He,{children:[t.jsx(Ye,{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(Je,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(tt,{size:16}),"Open"]}),i.edit&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(et,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Ze,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(O,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(st,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function nt(i){const e=i.type;return Array.isArray(e)?e.every(s=>nt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Gt(i,e){const s=i.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&nt(m)}),n=Ut(s),c=[],l=new Set;n&&r.includes(n)&&(c.push(n),l.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!l.has(o)&&(c.push(o),l.add(o));const d=r.filter(o=>!l.has(o)&&!Re.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of d)c.push(o),l.add(o);for(const o of Re)r.includes(o)&&!l.has(o)&&(c.push(o),l.add(o));return c.map(o=>{const m=s[o],u=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:f=>{const a=f[o];return t.jsx(Ge,{icon:a,name:f.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(a)})},sortable:u,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx(jt,{id:String(a),size:"xs"}):"—"},sortable:u,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx("span",{className:"block truncate max-w-full",children:new Date(a).toLocaleDateString()}):"—"},sortable:u,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(a)})},sortable:u,cellClassName:"max-w-[200px]"}})}function Ht(i,e,s,r){const n=i||Gt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(r).length>0?[...n,Qt(r)]:n}function Yt(i){const e=oe.c(119),{connectionId:s,org:r,activeCollection:n,onItemClick:c}=i,l=n.name,p=n.schema??ft,d=n.hasCreateTool,o=n.hasUpdateTool,m=n.hasDeleteTool,u=Be(),{data:f}=ct.useSession(),a=f?.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 $=Ve(g),h=It(s,l,$),T=`${s}-${l}`;let E;e[7]!==r||e[8]!==T?(E={namespace:r,resource:T,defaultSortKey:"updated_at"},e[7]=r,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,l,$,_),A=!d&&!o&&!m;let ne;e[14]!==b||e[15]!==l||e[16]!==u||e[17]!==c||e[18]!==r?(ne=C=>{if(c){c(C);return}u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:b,collectionName:l,itemId:C.id}})},e[14]=b,e[15]=l,e[16]=u,e[17]=c,e[18]=r,e[19]=ne):ne=e[19];const L=ne;let le;e[20]!==h.create||e[21]!==a?(le=async C=>{const xe=new Date().toISOString();await h.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:xe,updated_at:xe,created_by:a,updated_by:a})},e[20]=h.create,e[21]=a,e[22]=le):le=e[22];const be=le,[F,ve]=dt.useState(null);let re;e[23]===Symbol.for("react.memo_cache_sentinel")?(re=C=>{ve(C)},e[23]=re):re=e[23];const lt=re;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]!==d?(M=d&&{duplicate:be},e[27]=be,e[28]=d,e[29]=M):M=e[29];let U;e[30]!==m?(U=m&&{delete:lt},e[30]=m,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]!==h.delete||e[37]!==F?(ce=async()=>{F&&(await h.delete.mutateAsync(F.id),ve(null))},e[36]=h.delete,e[37]=F,e[38]=ce):ce=e[38];const Ne=ce;let de;e[39]!==h.create||e[40]!==b||e[41]!==l||e[42]!==d||e[43]!==u||e[44]!==r||e[45]!==a?(de=async()=>{if(!d){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:a,updated_by:a};try{const ke=await h.create.mutateAsync(xe);u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:b,collectionName:l,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=h.create,e[40]=b,e[41]=l,e[42]=d,e[43]=u,e[44]=r,e[45]=a,e[46]=de):de=e[46];const we=de;let ue;e[47]!==p?(ue=ot(p),e[47]=p,e[48]=ue):ue=e[48];const Se=ue,rt=(I?.length??0)>0,at=d&&!rt&&!N;let me;e[49]!==h.create||e[50]!==we||e[51]!==d?(me=d?t.jsxs(Ce,{onClick:we,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[49]=h.create,e[50]=we,e[51]=d,e[52]=me):me=e[52];const pe=me,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 ${l}...`;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 V;e[65]!==pe||e[66]!==d?(V=d&&t.jsx("div",{className:"pr-3",children:pe}),e[65]=pe,e[66]=d,e[67]=V):V=e[67];let q;e[68]!==B||e[69]!==V?(q=t.jsxs("div",{className:"flex items-center gap-2",children:[B,V]}),e[68]=B,e[69]=V,e[70]=q):q=e[70];let Q;e[71]!==I?(Q=I??[],e[71]=I,e[72]=Q):Q=e[72];const De=D;let G;e[73]!==L?(G=C=>L(C),e[73]=L,e[74]=G):G=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let H;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(H=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=H):H=e[78];let Y;e[79]!==S||e[80]!==A||e[81]!==ye||e[82]!==p||e[83]!==N||e[84]!==j||e[85]!==P||e[86]!==w||e[87]!==Q||e[88]!==De||e[89]!==G||e[90]!==H||e[91]!==z?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:Q,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:G,readOnly:A,emptyState:H})}),e[79]=S,e[80]=A,e[81]=ye,e[82]=p,e[83]=N,e[84]=j,e[85]=P,e[86]=w,e[87]=Q,e[88]=De,e[89]=G,e[90]=H,e[91]=z,e[92]=Y):Y=e[92];let J;e[93]!==q||e[94]!==Y?(J=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,Y]}),e[93]=q,e[94]=Y,e[95]=J):J=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 Z;e[98]!==Oe?(Z=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]=Z):Z=e[99];let X;e[100]!==h.delete.isPending?(X=t.jsx(vt,{disabled:h.delete.isPending,children:"Cancel"}),e[100]=h.delete.isPending,e[101]=X):X=e[101];const $e=h.delete.isPending?"Deleting...":"Delete";let ee;e[102]!==h.delete.isPending||e[103]!==Ne||e[104]!==$e?(ee=t.jsx(yt,{onClick:Ne,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[102]=h.delete.isPending,e[103]=Ne,e[104]=$e,e[105]=ee):ee=e[105];let te;e[106]!==X||e[107]!==ee?(te=t.jsxs(Pt,{children:[X,ee]}),e[106]=X,e[107]=ee,e[108]=te):te=e[108];let se;e[109]!==Z||e[110]!==te?(se=t.jsxs(_t,{children:[Z,te]}),e[109]=Z,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]!==J||e[117]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,J,ie]}),e[115]=W,e[116]=J,e[117]=ie,e[118]=ge):ge=e[118],ge}function Jt(){const i=oe.c(13),{org:e,project:s}=ze(),r=ut();let n;i[0]!==e.id||i[1]!==e.slug?(n={connectionId:qe,orgId:e.id,orgSlug:e.slug},i[0]=e.id,i[1]=e.slug,i[2]=n):n=i[2];const c=Ve(n);let l;i[3]!==c||i[4]!==s?(l=async m=>{const u=s.enabledPlugins??[];if(u.includes(m))return;const f=[...u,m],a=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s.id,data:{metadata:{enabled_plugins:f}}}});return a.structuredContent??a},i[3]=c,i[4]=s,i[5]=l):l=i[5];let p;i[6]!==e.id||i[7]!==s||i[8]!==r?(p=()=>{r.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),r.invalidateQueries({queryKey:Fe.projects(e.id)})},i[6]=e.id,i[7]=s,i[8]=r,i[9]=p):p=i[9];let d;return i[10]!==l||i[11]!==p?(d={mutationFn:l,onSuccess:p,onError:Zt},i[10]=l,i[11]=p,i[12]=d):d=i[12],mt(d)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function Xt(i){const e=oe.c(12),{pluginId:s,title:r,description:n,icon:c}=i,l=Jt();let p;e[0]!==l||e[1]!==s?(p=async()=>{try{await l.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=l,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,m=l.isPending?"Enabling…":"Enable plugin";let u;e[3]!==l.isPending||e[4]!==d||e[5]!==m?(u=t.jsx(Ce,{onClick:d,disabled:l.isPending,children:m}),e[3]=l.isPending,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;return e[7]!==n||e[8]!==o||e[9]!==u||e[10]!==r?(f=t.jsx(it,{image:o,title:r,description:n,actions:u}),e[7]=n,e[8]=o,e[9]=u,e[10]=r,e[11]=f):f=e[11],f}const es={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function ni(){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(Xt,{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(pt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Yt,{connectionId:qe,org:e.slug,activeCollection:es,onItemClick:c=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:c.id}})})})})}export{ni 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-CzhKzgtD.js";import{a as f}from"./index-BOl2sMex.js";import"./index-CeXie2Ys.js";import"./constants-B9wErdMg.js";import"./collections-CTGZthcG.js";import"./index-abagjRmB.js";import"./use-virtual-mcp-D6IJdvj4.js";import"./use-collections-DFXlD5a6.js";import"./monaco-editor-Dndvvjot.js";import"./index-DTr35K1t.js";import"./accordion-MNTOVO1w.js";import"./agent-icon-BBG09Kki.js";import"./AlertCircle-YdvcZKe8.js";import"./Tool01-DXbOwd1n.js";import"./XClose-D8EpU_uy.js";import"./RefreshCcw01-BBhbyLOk.js";import"./ArrowNarrowLeft-spQjUruy.js";import"./XCircle-kdEx_GGF.js";import"./ArrowUpRight-B1ajIZNC.js";import"./ZapSquare-Biix1-55.js";import"./Users03-DGRxeg5O.js";import"./CheckCircle-BQ3_L_yP.js";import"./Check-D7cmovlU.js";import"./ChevronDown-BfDxcbjR.js";import"./ChevronRight-BoDMW1uU.js";import"./ChevronUp-CRQBEG-R.js";import"./DotsVertical-BxlMGXPv.js";import"./Container-B6Z-4M-T.js";import"./Star01-UQZ7hTDj.js";import"./Palette-96pDg1d-.js";import"./SearchMd-cj9P259i.js";import"./index-BBoaHd8c.js";import"./tooltip-DSuAs--v.js";import"./X-8IHaEYtM.js";import"./LinkExternal01-Dmf65eFo.js";import"./Lock01-CHWOYjbh.js";import"./Sun-Cr3NKiIh.js";import"./Play-ChzLrbkr.js";import"./Plus-Cd4I0_d-.js";import"./Settings02-Cx39xFqG.js";import"./Shield01-DDhNoo0b.js";import"./Trash01-DqDMVyTa.js";import"./User01-C7C_-f57.js";import"./Zap-DdUb_mPC.js";import"./badge-CGsQT5nT.js";import"./select-WtZOfOpo.js";import"./view-mode-toggle-DTQbwKIC.js";import"./layout-DEdN-ZCr.js";import"./use-connection-mkdAsO3d.js";import"./use-mcp-tools-CZiN_apo.js";import"./dialog-B9n71g4e.js";import"./index-B40-ao-L.js";import"./dropdown-menu-bofOMeLm.js";import"./integration-icon-CSgHR76X.js";import"./scroll-area-DM7jZQf0.js";import"./index-C77ixooi.js";import"./empty-state-iSyeAylK.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-CNEsKnKX.js";function gt(){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{gt as default};
@@ -27,8 +27,8 @@
27
27
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
28
28
  <link rel="manifest" href="/manifest.webmanifest" />
29
29
  <meta name="theme-color" content="#D0EC1A" />
30
- <script type="module" crossorigin src="/assets/index-Dl2t23Jt.js"></script>
31
- <link rel="stylesheet" crossorigin href="/assets/index-DXHNyf1g.css">
30
+ <script type="module" crossorigin src="/assets/index-CzhKzgtD.js"></script>
31
+ <link rel="stylesheet" crossorigin href="/assets/index-B_4-KoG_.css">
32
32
  </head>
33
33
  <body>
34
34
  <div id="root"></div>
@@ -1643,7 +1643,7 @@ AS SELECT
1643
1643
  FROM monitoring_metrics
1644
1644
  GROUP BY organization_id, name, bucket, connection_id, tool_name, status
1645
1645
  `}),console.log("[clickhouse-schema] monitoring_metrics_rollup_1m_mv view ready")}finally{await G.close()}}catch(Y){console.error("[clickhouse-schema] Failed to create rollup DDL (queries will fall back to raw table):",Y)}}async function dA1(X){let Y={...process.env},G=o$1(X,Y),Q=G.settings.encryptionKey;console.log(`[settings] ENCRYPTION_KEY = ${JSON.stringify(Q)} (${Q.length} chars)`);let{ensureServices:J}=await Promise.resolve().then(() => (g$1(),h$1)),{outputs:W,services:Z}=await J({home:G.settings.dataDir,externalDatabaseUrl:G.externalDatabaseUrl,externalNatsUrl:G.externalNatsUrl});if(!G.skipMigrations){let{migrateBetterAuth:K}=await Promise.resolve().then(() => (e30(),Qg4));await K(W.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (GU(),Gg4)),{migrateToLatest:U}=await Promise.resolve().then(() => (Fs4(),Hs4)),B=H(W.databaseUrl);await U({keepOpen:!0,database:B,skipBetterAuth:!0})}if(G.settings.clickhouseUrl){let{ensureClickHouseRollup:K}=await Promise.resolve().then(() => U16);await K(G.settings.clickhouseUrl)}let $={...G.settings,databaseUrl:W.databaseUrl,natsUrls:W.natsUrls};return bt1($),{settings:$,services:Z.map((K)=>({name:K.name==="PostgreSQL"?"Postgres":K.name,port:K.port})),managedServiceNames:Z.filter((K)=>K.owner==="managed").map((K)=>K.name)}}var RN0=w(()=>{ft1();l9()});var pA1={};T0(pA1,{updateService:()=>Xa,toggleViewMode:()=>kN0,toggleVibeState:()=>vN0,toggleLogFlow:()=>CN0,subscribeCliState:()=>kX1,setVibe:()=>Ja5,setTuiConsoleIntercepted:()=>cA1,setServerUrl:()=>vX1,setMigrationsDone:()=>CX1,setEnv:()=>_X1,setDevMode:()=>Ga5,setDataDir:()=>Qa5,isTuiConsoleIntercepted:()=>iA1,getCliState:()=>SX1,addLogEntry:()=>Zz});function PU(){for(let X of SN0)X()}function SX1(){return e9}function kX1(X){return SN0.add(X),()=>SN0.delete(X)}function Xa(X){e9={...e9,services:e9.services.map((Y)=>Y.name===X.name?X:Y)},PU()}function CX1(){e9={...e9,migrationsStatus:"done"},PU()}function vX1(X){e9={...e9,serverUrl:X},PU()}function _X1(X){e9={...e9,env:X},PU()}function Zz(X){let Y=[...e9.logs,X];e9={...e9,logs:Y.length>500?Y.slice(-500):Y},PU()}function Ga5(){e9={...e9,services:[...e9.services,{name:"Vite",status:"pending",port:0}]},PU()}function kN0(){e9={...e9,viewMode:e9.viewMode==="requests"?"config":"requests"},PU()}function CN0(){e9={...e9,logFlow:!e9.logFlow},PU()}function Qa5(X){e9={...e9,dataDir:X},PU()}function Ja5(X){e9={...e9,vibe:X},PU()}function vN0(){e9={...e9,vibe:!e9.vibe},PU()}function cA1(X){B16=X}function iA1(){return B16}var e9,SN0,B16=!1;var Wz=w(()=>{e9={services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,env:null,logs:[],viewMode:"requests",logFlow:!1,vibe:!1,dataDir:null},SN0=new Set});import{createServer as N16}from"net";function Za5(X){return new Promise((Y)=>{let G=N16();G.once("error",()=>Y(!1)),G.listen(X,"0.0.0.0",()=>{G.close(()=>Y(!0))})})}async function nA1(X){if(await Za5(X))return X;let Y=await new Promise((G,Q)=>{let J=N16();J.once("error",Q),J.listen(0,"0.0.0.0",()=>{let W=J.address(),Z=typeof W==="object"&&W?W.port:0;J.close(()=>G(Z))})});return console.warn(`Port ${X} is in use, using port ${Y} instead.`),Y}var _N0=()=>{};var fN0={};T0(fN0,{startDevServer:()=>$a5});import{join as Wa5}from"path";function z16(X){return X.replace(/\x1b\[[0-9;]*m/g,"")}function O16(X){let Y=X.getReader(),G=new TextDecoder,Q="";function J(){let W=Q.split(`
1646
- `);Q=W.pop()??"";for(let Z of W){let $=z16(Z).replace(/^\[\d+\]\s*/,"").trim();if(!$)continue;Zz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:$})}}(async()=>{for(;;){let{done:W,value:Z}=await Y.read();if(W)break;Q+=G.decode(Z,{stream:!0}),J()}if(Q.trim()){let W=z16(Q).replace(/^\[\d+\]\s*/,"").trim();if(W)Zz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function $a5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await nA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await dA1({port:String(J),home:X.home,baseUrl:X.baseUrl,localMode:X.localMode,skipMigrations:X.skipMigrations,noTui:X.noTui,vitePort:X.vitePort});for(let z of Z)Xa({name:z.name,status:"ready",port:z.port});_X1(W),CX1();let K=Wa5(import.meta.dir,"..","..","..","..",".."),H=Q===!0,U=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:K,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.baseUrl?{BASE_URL:W.baseUrl}:{}},stdio:["inherit",H?"inherit":"pipe",H?"inherit":"pipe"]});if(!H)O16(U.stdout),O16(U.stderr);let B=G||`http://localhost:${W.port}`;vX1(B),Xa({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (g$1(),h$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var bN0=w(()=>{RN0();Wz();_N0()});import{Box as yN0,Text as xN0}from"ink";import{jsx as w16,jsxs as tA1}from"react/jsx-runtime";function D16(X){if(!X)return"not set";try{let Y=new URL(X);if(Y.password)Y.password="***";if(Y.username&&Y.username.length>3)Y.username=Y.username.slice(0,3)+"***";return Y.pathname="/",Y.search="",Y.hash="",Y.toString()}catch{if(X.length<=10)return X;return X.slice(0,6)+"***"+X.slice(-4)}}function Fa5(X,Y){if(Ka5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Ha5.has(X)){if(Array.isArray(Y)){if(Y.length===0)return{text:"not set",dimColor:!0};return{text:Y.map((W)=>D16(W)).join(", "),color:"cyan"}}let Q=D16(Y);return Q==="not set"?{text:Q,dimColor:!0}:{text:Q,color:"cyan"}}if(Y===void 0||Y===null||Y==="")return{text:"not set",dimColor:!0};let G=String(Y);if(G==="true")return{text:G,color:"green"};if(G==="false")return{text:G,color:"yellow"};try{return new URL(G),{text:G,color:"cyan"}}catch{return{text:G}}}function Ua5(X){return[{title:"Core",entries:[{key:"NODE_ENV",value:X.nodeEnv},{key:"PORT",value:X.port},{key:"BASE_URL",value:X.baseUrl??`http://localhost:${X.port}`},{key:"DATA_DIR",value:X.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:X.databaseUrl},{key:"DATABASE_PG_SSL",value:X.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:X.betterAuthSecret},{key:"ENCRYPTION_KEY",value:X.encryptionKey},{key:"MESH_JWT_SECRET",value:X.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:X.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:X.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:X.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:X.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:X.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:X.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:X.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:X.aiGatewayUrl}]}]}function L16({env:X}){let Y=Ua5(X);return w16(yN0,{flexDirection:"column",children:Y.map((G)=>tA1(yN0,{flexDirection:"column",marginTop:1,children:[tA1(xN0,{dimColor:!0,children:[" ","\u2500\u2500 ",G.title," ","\u2500".repeat(Math.max(0,38-G.title.length))]}),G.entries.map(({key:Q,value:J})=>{let W=Fa5(Q,J);return tA1(yN0,{children:[tA1(xN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),w16(xN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Ka5,Ha5;var E16=w(()=>{Ka5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Ha5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var hN0;var P16=w(()=>{hN0={name:"decocms",version:"2.304.15",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":"bun --bun 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","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1","@freestyle-sh/with-bun":"^0.2.12","@freestyle-sh/with-deno":"^0.0.4","@freestyle-sh/with-nodejs":"^0.2.9","freestyle-sandboxes":"^0.1.46"},dependencies:{"@ai-sdk/anthropic":"^3.0.58","@ai-sdk/google":"^3.0.60","@ai-sdk/openai":"^3.0.50","@anthropic-ai/sdk":"^0.79.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@deco-cx/warp-node":"^0.3.20","@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.2.2","@openrouter/ai-sdk-provider":"^2.2.5","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"^3.13.21","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.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.0","react-dom":"^19.2.0"},devDependencies:{"@ai-sdk/provider":"^3.0.8","@ai-sdk/react":"^3.0.118","@anthropic-ai/claude-agent-sdk":"^0.2.80","@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/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.27.1","@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/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/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.90.11","@tanstack/react-router":"^1.139.7","@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.116","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.5","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","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","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"}}});import{Box as qU,Text as RX}from"ink";import{Spinner as Na5}from"@inkjs/ui";import{useSyncExternalStore as q16}from"react";import{jsx as TY,jsxs as sQ}from"react/jsx-runtime";function La5(X,Y){if(!X||!wa5.has(X))return X;let G=gN0[Y]??gN0[gN0.length-1];return X==="#875f00"?G[0]:G[1]}function A16({status:X}){if(X==="pending")return TY(Na5,{label:""});return TY(RX,{color:"green",children:"\u2713"})}function T16({services:X,migrationsStatus:Y,home:G,serverUrl:Q,vibe:J}){let W=q16(lm0,um0),Z=q16(nm0,pm0);return sQ(qU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(qU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,Da5-U);return sQ(qU,{flexDirection:"row",children:[$.map((N,z)=>{let O=La5(N.color,K);return O?TY(RX,{color:O,children:N.text},z):TY(RX,{children:N.text},z)}),TY(RX,{children:" ".repeat(B+2)}),H?.map((N,z)=>N.color?TY(RX,{color:N.color,children:N.char},z):TY(RX,{children:N.char},z))]},K)}),sQ(RX,{dimColor:!0,children:[" v",hN0.version]})]}):sQ(qU,{flexDirection:"column",marginTop:1,children:[za5.map(($,K)=>TY(RX,{color:Oa5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",hN0.version]})]}),TY(qU,{marginBottom:1,children:TY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),TY(qU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(qU,{gap:2,children:[X.map(($)=>sQ(qU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),TY(A16,{status:$.status})]},$.name)),sQ(qU,{gap:1,children:[TY(RX,{children:"Migrations"}),TY(A16,{status:Y})]})]}),TY(qU,{children:Q?sQ(RX,{children:["Open in browser: ",TY(RX,{color:"cyan",children:Q})]}):TY(RX,{dimColor:!0,children:"Starting..."})}),sQ(qU,{gap:2,children:[sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var za5,Oa5,gN0,Da5=30,wa5;var I16=w(()=>{P16();Tt1();St1();za5=[" \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 "],Oa5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],gN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],wa5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as Ea5}from"react";function Pa5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==aA1.rows||Y!==aA1.columns)aA1={rows:X,columns:Y};return aA1}function qa5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function V16(){return Ea5(qa5,Pa5)}var aA1;var j16=w(()=>{aA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as Aa5,Text as fX1}from"ink";import{useSyncExternalStore as Ta5}from"react";import{jsx as uN0,jsxs as lN0}from"react/jsx-runtime";function Ia5(X){if(X>=500)return"red";if(X>=400)return"yellow";if(X>=300)return"cyan";return"green"}function M16({logs:X,headerHeight:Y}){let{rows:G}=V16(),{logFlow:Q}=Ta5(kX1,SX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return uN0(Aa5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return uN0(fX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return lN0(fX1,{children:[lN0(fX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),uN0(fX1,{color:Ia5(Z.status),children:Z.status}),lN0(fX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var R16=w(()=>{Wz();j16()});var mN0={};T0(mN0,{App:()=>Ca5});import{Box as Va5,Text as ja5,useInput as Ma5}from"ink";import{useSyncExternalStore as Ra5}from"react";import{jsx as rA1,jsxs as va5}from"react/jsx-runtime";function Ca5({home:X}){let Y=Ra5(kX1,SX1);return Ma5((G)=>{if(G==="k"||G==="K")kN0();if(G==="l"||G==="L")CN0();if((G==="v"||G==="V")&&Y.dataDir)_t1(Y.dataDir),vN0();if((G==="n"||G==="N")&&Y.vibe)vt1()}),va5(Va5,{flexDirection:"column",children:[rA1(T16,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?rA1(L16,{env:Y.env}):rA1(ja5,{dimColor:!0,children:"Loading configuration..."}):rA1(M16,{logs:Y.logs,headerHeight:Y.vibe?ka5:Sa5})]})}var Sa5=15,ka5=19;var dN0=w(()=>{E16();I16();R16();Wz();_d()});function S16(X,Y={}){return{PORT:String(X.port),NODE_ENV:X.nodeEnv,BASE_URL:X.baseUrl,DATA_DIR:X.dataDir,DECOCMS_HOME:X.dataDir,DATABASE_URL:X.databaseUrl,DATABASE_PG_SSL:String(X.databasePgSsl),DATABASE_POOL_MAX:String(X.databasePoolMax),NATS_URL:X.natsUrls.join(","),BETTER_AUTH_SECRET:X.betterAuthSecret,ENCRYPTION_KEY:X.encryptionKey,MESH_JWT_SECRET:X.meshJwtSecret,DECOCMS_LOCAL_MODE:String(X.localMode),DISABLE_RATE_LIMIT:String(X.disableRateLimit),STUDIO_PROVISION_SECRET_KEY:X.studioProvisionSecretKey,CONFIG_PATH:X.configPath,...Object.fromEntries(Object.entries(process.env).filter(([G])=>G.startsWith("AUTH_"))),DECO_AI_GATEWAY_ENABLED:String(X.aiGatewayEnabled),DECO_AI_GATEWAY_URL:X.aiGatewayUrl,ENABLE_DECO_IMPORT:String(X.enableDecoImport),S3_ENDPOINT:X.s3Endpoint,S3_BUCKET:X.s3Bucket,S3_REGION:X.s3Region,S3_ACCESS_KEY_ID:X.s3AccessKeyId,S3_SECRET_ACCESS_KEY:X.s3SecretAccessKey,S3_FORCE_PATH_STYLE:String(X.s3ForcePathStyle),OTEL_SERVICE_NAME:X.otelServiceName,CLICKHOUSE_URL:X.clickhouseUrl,OTEL_EXPORTER_OTLP_ENDPOINT:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_PROTOCOL:process.env.OTEL_EXPORTER_OTLP_PROTOCOL,OTEL_RESOURCE_ATTRIBUTES:process.env.OTEL_RESOURCE_ATTRIBUTES,DECO_SUPABASE_URL:X.decoSupabaseUrl,DECO_SUPABASE_SERVICE_KEY:X.decoSupabaseServiceKey,FIRECRAWL_API_KEY:X.firecrawlApiKey,STUDIO_SANDBOX_RUNNER:process.env.STUDIO_SANDBOX_RUNNER,STUDIO_SANDBOX_TEMPLATE_NAME:process.env.STUDIO_SANDBOX_TEMPLATE_NAME,STUDIO_ENV:process.env.STUDIO_ENV,STUDIO_SANDBOX_PREVIEW_URL_PATTERN:process.env.STUDIO_SANDBOX_PREVIEW_URL_PATTERN,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE,STUDIO_SANDBOX_SENTINEL_TOKEN:process.env.STUDIO_SANDBOX_SENTINEL_TOKEN,KUBERNETES_SERVICE_HOST:process.env.KUBERNETES_SERVICE_HOST,KUBERNETES_SERVICE_PORT:process.env.KUBERNETES_SERVICE_PORT,FREESTYLE_API_KEY:process.env.FREESTYLE_API_KEY,BROWSERLESS_TOKEN:process.env.BROWSERLESS_TOKEN,NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS,DECO_CLI:"1",DECO_NO_TUI:"true",...Y}}var bj=k((ha5)=>{ha5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(ha5.HttpAuthLocation||(ha5.HttpAuthLocation={}));ha5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(ha5.HttpApiKeyAuthLocation||(ha5.HttpApiKeyAuthLocation={}));ha5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(ha5.EndpointURLScheme||(ha5.EndpointURLScheme={}));ha5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(ha5.AlgorithmId||(ha5.AlgorithmId={}));var _a5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>ha5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>ha5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},fa5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},ba5=(X)=>{return _a5(X)},ya5=(X)=>{return fa5(X)};ha5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(ha5.FieldPosition||(ha5.FieldPosition={}));var xa5="__smithy_context";ha5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(ha5.IniSectionType||(ha5.IniSectionType={}));ha5.RequestHandlerProtocol=void 0;(function(X){X.HTTP_0_9="http/0.9",X.HTTP_1_0="http/1.0",X.TDS_8_0="tds/8.0"})(ha5.RequestHandlerProtocol||(ha5.RequestHandlerProtocol={}));ha5.SMITHY_CONTEXT_KEY=xa5;ha5.getDefaultClientConfiguration=ba5;ha5.resolveDefaultRuntimeConfig=ya5});var u7=k((na5)=>{var ma5=bj(),da5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},ca5=(X)=>{return{httpHandler:X.httpHandler()}};class k16{name;kind;values;constructor({name:X,kind:Y=ma5.FieldPosition.HEADER,values:G=[]}){this.name=X,this.kind=Y,this.values=G}add(X){this.values.push(X)}set(X){this.values=X}remove(X){this.values=this.values.filter((Y)=>Y!==X)}toString(){return this.values.map((X)=>X.includes(",")||X.includes(" ")?`"${X}"`:X).join(", ")}get(){return this.values}}class C16{entries={};encoding;constructor({fields:X=[],encoding:Y="utf-8"}){X.forEach(this.setField.bind(this)),this.encoding=Y}setField(X){this.entries[X.name.toLowerCase()]=X}getField(X){return this.entries[X.toLowerCase()]}removeField(X){delete this.entries[X.toLowerCase()]}getByType(X){return Object.values(this.entries).filter((Y)=>Y.kind===X)}}class oA1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(X){this.method=X.method||"GET",this.hostname=X.hostname||"localhost",this.port=X.port,this.query=X.query||{},this.headers=X.headers||{},this.body=X.body,this.protocol=X.protocol?X.protocol.slice(-1)!==":"?`${X.protocol}:`:X.protocol:"https:",this.path=X.path?X.path.charAt(0)!=="/"?`/${X.path}`:X.path:"/",this.username=X.username,this.password=X.password,this.fragment=X.fragment}static clone(X){let Y=new oA1({...X,headers:{...X.headers}});if(Y.query)Y.query=ia5(Y.query);return Y}static isInstance(X){if(!X)return!1;let Y=X;return"method"in Y&&"protocol"in Y&&"hostname"in Y&&"path"in Y&&typeof Y.query==="object"&&typeof Y.headers==="object"}clone(){return oA1.clone(this)}}function ia5(X){return Object.keys(X).reduce((Y,G)=>{let Q=X[G];return{...Y,[G]:Array.isArray(Q)?[...Q]:Q}},{})}class v16{statusCode;reason;headers;body;constructor(X){this.statusCode=X.statusCode,this.reason=X.reason,this.headers=X.headers||{},this.body=X.body}static isInstance(X){if(!X)return!1;let Y=X;return typeof Y.statusCode==="number"&&typeof Y.headers==="object"}}function pa5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}na5.Field=k16;na5.Fields=C16;na5.HttpRequest=oA1;na5.HttpResponse=v16;na5.getHttpHandlerExtensionConfiguration=da5;na5.isValidHostname=pa5;na5.resolveHttpHandlerRuntimeConfig=ca5});function Yr5(X){return(Y)=>async(G)=>{let{request:Q}=G;if(X.expectContinueHeader!==!1&&_16.HttpRequest.isInstance(Q)&&Q.body&&X.runtime==="node"&&X.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof X.expectContinueHeader==="number")try{J=(Number(Q.headers?.["content-length"])??X.bodyLengthChecker?.(Q.body)??1/0)>=X.expectContinueHeader}catch(W){}else J=!!X.expectContinueHeader;if(J)Q.headers.Expect="100-continue"}return Y({...G,request:Q})}}var _16,Gr5,f16=(X)=>({applyToStack:(Y)=>{Y.add(Yr5(X),Gr5)}});var b16=w(()=>{_16=X1(u7(),1);Gr5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,sA1,yj,eA1,E9,y16,yX1;var LH=w(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},sA1=wH.WHEN_SUPPORTED,yj={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},eA1=wH.WHEN_SUPPORTED;(function(X){X.MD5="MD5",X.CRC32="CRC32",X.CRC32C="CRC32C",X.CRC64NVME="CRC64NVME",X.SHA1="SHA1",X.SHA256="SHA256"})(E9||(E9={}));(function(X){X.HEADER="header",X.TRAILER="trailer"})(y16||(y16={}));yX1=E9.CRC32});var kq,Ya=(X,Y,G,Q)=>{if(!(Y in X))return;let J=X[Y].toUpperCase();if(!Object.values(G).includes(J))throw TypeError(`Cannot load ${Q} '${Y}'. Expected one of ${Object.values(G)}, got '${X[Y]}'.`);return J};var rN0=w(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(kq||(kq={}))});var Qr5="AWS_REQUEST_CHECKSUM_CALCULATION",Jr5="request_checksum_calculation",x16;var h16=w(()=>{LH();rN0();x16={environmentVariableSelector:(X)=>Ya(X,Qr5,wH,kq.ENV),configFileSelector:(X)=>Ya(X,Jr5,wH,kq.CONFIG),default:sA1}});var Zr5="AWS_RESPONSE_CHECKSUM_VALIDATION",Wr5="response_checksum_validation",g16;var u16=w(()=>{LH();rN0();g16={environmentVariableSelector:(X)=>Ya(X,Zr5,yj,kq.ENV),configFileSelector:(X)=>Ya(X,Wr5,yj,kq.CONFIG),default:eA1}});var sN0=k((Dr5)=>{var $r5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Kr5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Hr5=["TimeoutError","RequestTimeout","RequestTimeoutException"],Fr5=[500,502,503,504],Ur5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Br5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l16=(X)=>X?.$retryable!==void 0,Nr5=(X)=>$r5.includes(X.name),m16=(X)=>X.$metadata?.clockSkewCorrected,d16=(X)=>{let Y=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(X&&X instanceof TypeError))return!1;return Y.has(X.message)},zr5=(X)=>X.$metadata?.httpStatusCode===429||Kr5.includes(X.name)||X.$retryable?.throttling==!0,oN0=(X,Y=0)=>l16(X)||m16(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Hr5.includes(X.name)||Ur5.includes(X?.code||"")||Br5.includes(X?.code||"")||Fr5.includes(X.$metadata?.httpStatusCode||0)||d16(X)||c16(X)||X.cause!==void 0&&Y<=10&&oN0(X.cause,Y+1),Or5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!oN0(X))return!0;return!1}return!1};function c16(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}Dr5.isBrowserNetworkError=d16;Dr5.isClockSkewCorrectedError=m16;Dr5.isClockSkewError=Nr5;Dr5.isNodeJsHttp2TransientError=c16;Dr5.isRetryableByTrait=l16;Dr5.isServerError=Or5;Dr5.isThrottlingError=zr5;Dr5.isTransientError=oN0});var Dw=k((_r5)=>{var Vr5=sN0();_r5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(_r5.RETRY_MODES||(_r5.RETRY_MODES={}));var YT1=3,jr5=_r5.RETRY_MODES.STANDARD;class GT1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(X){this.beta=X?.beta??0.7,this.minCapacity=X?.minCapacity??1,this.minFillRate=X?.minFillRate??0.5,this.scaleConstant=X?.scaleConstant??0.4,this.smooth=X?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(X){let Y;this.updateMeasuredRate();let G=X;if(G?.errorType==="THROTTLING"||Vr5.isThrottlingError(G?.error??X)){let W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),Y=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),Y=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(Y,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(X){if(!this.enabled)return;if(this.refillTokenBucket(),X>this.availableTokens){let Y=(X-this.availableTokens)/this.fillRate*1000;await new Promise((G)=>GT1.setTimeoutFn(G,Y))}this.availableTokens=this.availableTokens-X}refillTokenBucket(){let X=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=X;return}let Y=(X-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+Y),this.lastTimestamp=X}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(X){return this.getPrecise(X*this.beta)}cubicSuccess(X){return this.getPrecise(this.scaleConstant*Math.pow(X-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(X){this.refillTokenBucket(),this.fillRate=Math.max(X,this.minFillRate),this.maxCapacity=Math.max(X,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let X=this.getCurrentTimeInSeconds(),Y=Math.floor(X*2)/2;if(this.requestCount++,Y>this.lastTxRateBucket){let G=this.requestCount/(Y-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=Y}}getPrecise(X){return parseFloat(X.toFixed(8))}}var Mr5=100,Yz0=20000,Rr5=500,eN0=500,Sr5=5,kr5=10,i16=1,Cr5="amz-sdk-invocation-id",vr5="amz-sdk-request";class eQ{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return eQ.v2026?50:100}static throttlingDelay(){return eQ.v2026?1000:500}static cost(){return eQ.v2026?14:5}static throttlingCost(){return eQ.v2026?5:10}static modifiedCostType(){return eQ.v2026?"THROTTLING":"TRANSIENT"}}class p16{x=eQ.delay();computeNextBackoffDelay(X){let Y=Math.random(),G=2,Q=Y*Math.min(this.x*2**X,Yz0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class Xz0{delay;count;cost;longPoll;constructor(X,Y,G,Q){this.delay=X,this.count=Y,this.cost=G,this.longPoll=Q}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Yz0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var XT1={incompatible:1,attempts:2,capacity:3};class xX1{mode=_r5.RETRY_MODES.STANDARD;capacity=eN0;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(X){if(typeof X==="number")this.maxAttemptsProvider=async()=>X;else if(typeof X==="function")this.maxAttemptsProvider=X;else if(X&&typeof X==="object")this.maxAttemptsProvider=async()=>X.maxAttempts,this.baseDelay=X.baseDelay,this.retryBackoffStrategy=X.backoff;this.maxAttemptsProvider??=async()=>YT1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new p16}async acquireInitialRetryToken(X){return new Xz0(eQ.delay(),0,void 0,eQ.v2026&&X.includes(":longpoll"))}async refreshRetryTokenForRetry(X,Y){let G=await this.getMaxAttempts(),Q=this.retryCode(X,Y,G),J=Q===0,W=X.isLongPoll?.();if(J||W){let Z=Y.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?eQ.throttlingDelay():this.baseDelay);let $=this.retryBackoffStrategy.computeNextBackoffDelay(X.getRetryCount()),K=$;if(Y.retryAfterHint instanceof Date)K=Math.max($,Math.min(Y.retryAfterHint.getTime()-Date.now(),$+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:eQ.v2026&&Q===XT1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new Xz0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(eN0,this.capacity+(X.getRetryCost()??i16))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(X){return console.warn(`Max attempts provider could not resolve. Using default of ${YT1}`),YT1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:XT1.incompatible,W=Q<G?0:XT1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:XT1.capacity;return J||W||Z}getCapacityCost(X){return X===eQ.modifiedCostType()?eQ.throttlingCost():eQ.cost()}isRetryableError(X){return X==="THROTTLING"||X==="TRANSIENT"}}class n16{mode=_r5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new GT1,this.standardRetryStrategy=Y?new xX1({maxAttempts:typeof X==="number"?X:3,...Y}):new xX1(X)}async acquireInitialRetryToken(X){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(X)}async refreshRetryTokenForRetry(X,Y){return this.rateLimiter.updateClientSendingRate(Y),this.standardRetryStrategy.refreshRetryTokenForRetry(X,Y)}recordSuccess(X){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(X)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class t16 extends xX1{computeNextBackoffDelay;constructor(X,Y=eQ.delay()){super(typeof X==="function"?X:async()=>X);if(typeof Y==="number")this.computeNextBackoffDelay=()=>Y;else this.computeNextBackoffDelay=Y}async refreshRetryTokenForRetry(X,Y){let G=await super.refreshRetryTokenForRetry(X,Y);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}}_r5.AdaptiveRetryStrategy=n16;_r5.ConfiguredRetryStrategy=t16;_r5.DEFAULT_MAX_ATTEMPTS=YT1;_r5.DEFAULT_RETRY_DELAY_BASE=Mr5;_r5.DEFAULT_RETRY_MODE=jr5;_r5.DefaultRateLimiter=GT1;_r5.INITIAL_RETRY_TOKENS=eN0;_r5.INVOCATION_ID_HEADER=Cr5;_r5.MAXIMUM_RETRY_DELAY=Yz0;_r5.NO_RETRY_INCREMENT=i16;_r5.REQUEST_HEADER=vr5;_r5.RETRY_COST=Sr5;_r5.Retry=eQ;_r5.StandardRetryStrategy=xX1;_r5.THROTTLING_RETRY_DELAY_BASE=Rr5;_r5.TIMEOUT_RETRY_COST=kr5});var WX=k((Jo5)=>{var rr5=Dw(),Gz0={warningEmitted:!1},or5=(X)=>{if(X&&!Gz0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)Gz0.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
1646
+ `);Q=W.pop()??"";for(let Z of W){let $=z16(Z).replace(/^\[\d+\]\s*/,"").trim();if(!$)continue;Zz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:$})}}(async()=>{for(;;){let{done:W,value:Z}=await Y.read();if(W)break;Q+=G.decode(Z,{stream:!0}),J()}if(Q.trim()){let W=z16(Q).replace(/^\[\d+\]\s*/,"").trim();if(W)Zz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function $a5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await nA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await dA1({port:String(J),home:X.home,baseUrl:X.baseUrl,localMode:X.localMode,skipMigrations:X.skipMigrations,noTui:X.noTui,vitePort:X.vitePort});for(let z of Z)Xa({name:z.name,status:"ready",port:z.port});_X1(W),CX1();let K=Wa5(import.meta.dir,"..","..","..","..",".."),H=Q===!0,U=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:K,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.baseUrl?{BASE_URL:W.baseUrl}:{}},stdio:["inherit",H?"inherit":"pipe",H?"inherit":"pipe"]});if(!H)O16(U.stdout),O16(U.stderr);let B=G||`http://localhost:${W.port}`;vX1(B),Xa({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (g$1(),h$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var bN0=w(()=>{RN0();Wz();_N0()});import{Box as yN0,Text as xN0}from"ink";import{jsx as w16,jsxs as tA1}from"react/jsx-runtime";function D16(X){if(!X)return"not set";try{let Y=new URL(X);if(Y.password)Y.password="***";if(Y.username&&Y.username.length>3)Y.username=Y.username.slice(0,3)+"***";return Y.pathname="/",Y.search="",Y.hash="",Y.toString()}catch{if(X.length<=10)return X;return X.slice(0,6)+"***"+X.slice(-4)}}function Fa5(X,Y){if(Ka5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Ha5.has(X)){if(Array.isArray(Y)){if(Y.length===0)return{text:"not set",dimColor:!0};return{text:Y.map((W)=>D16(W)).join(", "),color:"cyan"}}let Q=D16(Y);return Q==="not set"?{text:Q,dimColor:!0}:{text:Q,color:"cyan"}}if(Y===void 0||Y===null||Y==="")return{text:"not set",dimColor:!0};let G=String(Y);if(G==="true")return{text:G,color:"green"};if(G==="false")return{text:G,color:"yellow"};try{return new URL(G),{text:G,color:"cyan"}}catch{return{text:G}}}function Ua5(X){return[{title:"Core",entries:[{key:"NODE_ENV",value:X.nodeEnv},{key:"PORT",value:X.port},{key:"BASE_URL",value:X.baseUrl??`http://localhost:${X.port}`},{key:"DATA_DIR",value:X.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:X.databaseUrl},{key:"DATABASE_PG_SSL",value:X.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:X.betterAuthSecret},{key:"ENCRYPTION_KEY",value:X.encryptionKey},{key:"MESH_JWT_SECRET",value:X.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:X.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:X.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:X.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:X.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:X.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:X.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:X.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:X.aiGatewayUrl}]}]}function L16({env:X}){let Y=Ua5(X);return w16(yN0,{flexDirection:"column",children:Y.map((G)=>tA1(yN0,{flexDirection:"column",marginTop:1,children:[tA1(xN0,{dimColor:!0,children:[" ","\u2500\u2500 ",G.title," ","\u2500".repeat(Math.max(0,38-G.title.length))]}),G.entries.map(({key:Q,value:J})=>{let W=Fa5(Q,J);return tA1(yN0,{children:[tA1(xN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),w16(xN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Ka5,Ha5;var E16=w(()=>{Ka5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Ha5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var hN0;var P16=w(()=>{hN0={name:"decocms",version:"2.304.16",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":"bun --bun 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","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1","@freestyle-sh/with-bun":"^0.2.12","@freestyle-sh/with-deno":"^0.0.4","@freestyle-sh/with-nodejs":"^0.2.9","freestyle-sandboxes":"^0.1.46"},dependencies:{"@ai-sdk/anthropic":"^3.0.58","@ai-sdk/google":"^3.0.60","@ai-sdk/openai":"^3.0.50","@anthropic-ai/sdk":"^0.79.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@deco-cx/warp-node":"^0.3.20","@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.2.2","@openrouter/ai-sdk-provider":"^2.2.5","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"^3.13.21","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.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.0","react-dom":"^19.2.0"},devDependencies:{"@ai-sdk/provider":"^3.0.8","@ai-sdk/react":"^3.0.118","@anthropic-ai/claude-agent-sdk":"^0.2.80","@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/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.27.1","@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/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/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.90.11","@tanstack/react-router":"^1.139.7","@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.116","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.5","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","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","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"}}});import{Box as qU,Text as RX}from"ink";import{Spinner as Na5}from"@inkjs/ui";import{useSyncExternalStore as q16}from"react";import{jsx as TY,jsxs as sQ}from"react/jsx-runtime";function La5(X,Y){if(!X||!wa5.has(X))return X;let G=gN0[Y]??gN0[gN0.length-1];return X==="#875f00"?G[0]:G[1]}function A16({status:X}){if(X==="pending")return TY(Na5,{label:""});return TY(RX,{color:"green",children:"\u2713"})}function T16({services:X,migrationsStatus:Y,home:G,serverUrl:Q,vibe:J}){let W=q16(lm0,um0),Z=q16(nm0,pm0);return sQ(qU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(qU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,Da5-U);return sQ(qU,{flexDirection:"row",children:[$.map((N,z)=>{let O=La5(N.color,K);return O?TY(RX,{color:O,children:N.text},z):TY(RX,{children:N.text},z)}),TY(RX,{children:" ".repeat(B+2)}),H?.map((N,z)=>N.color?TY(RX,{color:N.color,children:N.char},z):TY(RX,{children:N.char},z))]},K)}),sQ(RX,{dimColor:!0,children:[" v",hN0.version]})]}):sQ(qU,{flexDirection:"column",marginTop:1,children:[za5.map(($,K)=>TY(RX,{color:Oa5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",hN0.version]})]}),TY(qU,{marginBottom:1,children:TY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),TY(qU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(qU,{gap:2,children:[X.map(($)=>sQ(qU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),TY(A16,{status:$.status})]},$.name)),sQ(qU,{gap:1,children:[TY(RX,{children:"Migrations"}),TY(A16,{status:Y})]})]}),TY(qU,{children:Q?sQ(RX,{children:["Open in browser: ",TY(RX,{color:"cyan",children:Q})]}):TY(RX,{dimColor:!0,children:"Starting..."})}),sQ(qU,{gap:2,children:[sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&sQ(RX,{dimColor:!0,children:[TY(RX,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var za5,Oa5,gN0,Da5=30,wa5;var I16=w(()=>{P16();Tt1();St1();za5=[" \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 "],Oa5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],gN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],wa5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as Ea5}from"react";function Pa5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==aA1.rows||Y!==aA1.columns)aA1={rows:X,columns:Y};return aA1}function qa5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function V16(){return Ea5(qa5,Pa5)}var aA1;var j16=w(()=>{aA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as Aa5,Text as fX1}from"ink";import{useSyncExternalStore as Ta5}from"react";import{jsx as uN0,jsxs as lN0}from"react/jsx-runtime";function Ia5(X){if(X>=500)return"red";if(X>=400)return"yellow";if(X>=300)return"cyan";return"green"}function M16({logs:X,headerHeight:Y}){let{rows:G}=V16(),{logFlow:Q}=Ta5(kX1,SX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return uN0(Aa5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return uN0(fX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return lN0(fX1,{children:[lN0(fX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),uN0(fX1,{color:Ia5(Z.status),children:Z.status}),lN0(fX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var R16=w(()=>{Wz();j16()});var mN0={};T0(mN0,{App:()=>Ca5});import{Box as Va5,Text as ja5,useInput as Ma5}from"ink";import{useSyncExternalStore as Ra5}from"react";import{jsx as rA1,jsxs as va5}from"react/jsx-runtime";function Ca5({home:X}){let Y=Ra5(kX1,SX1);return Ma5((G)=>{if(G==="k"||G==="K")kN0();if(G==="l"||G==="L")CN0();if((G==="v"||G==="V")&&Y.dataDir)_t1(Y.dataDir),vN0();if((G==="n"||G==="N")&&Y.vibe)vt1()}),va5(Va5,{flexDirection:"column",children:[rA1(T16,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?rA1(L16,{env:Y.env}):rA1(ja5,{dimColor:!0,children:"Loading configuration..."}):rA1(M16,{logs:Y.logs,headerHeight:Y.vibe?ka5:Sa5})]})}var Sa5=15,ka5=19;var dN0=w(()=>{E16();I16();R16();Wz();_d()});function S16(X,Y={}){return{PORT:String(X.port),NODE_ENV:X.nodeEnv,BASE_URL:X.baseUrl,DATA_DIR:X.dataDir,DECOCMS_HOME:X.dataDir,DATABASE_URL:X.databaseUrl,DATABASE_PG_SSL:String(X.databasePgSsl),DATABASE_POOL_MAX:String(X.databasePoolMax),NATS_URL:X.natsUrls.join(","),BETTER_AUTH_SECRET:X.betterAuthSecret,ENCRYPTION_KEY:X.encryptionKey,MESH_JWT_SECRET:X.meshJwtSecret,DECOCMS_LOCAL_MODE:String(X.localMode),DISABLE_RATE_LIMIT:String(X.disableRateLimit),STUDIO_PROVISION_SECRET_KEY:X.studioProvisionSecretKey,CONFIG_PATH:X.configPath,...Object.fromEntries(Object.entries(process.env).filter(([G])=>G.startsWith("AUTH_"))),DECO_AI_GATEWAY_ENABLED:String(X.aiGatewayEnabled),DECO_AI_GATEWAY_URL:X.aiGatewayUrl,ENABLE_DECO_IMPORT:String(X.enableDecoImport),S3_ENDPOINT:X.s3Endpoint,S3_BUCKET:X.s3Bucket,S3_REGION:X.s3Region,S3_ACCESS_KEY_ID:X.s3AccessKeyId,S3_SECRET_ACCESS_KEY:X.s3SecretAccessKey,S3_FORCE_PATH_STYLE:String(X.s3ForcePathStyle),OTEL_SERVICE_NAME:X.otelServiceName,CLICKHOUSE_URL:X.clickhouseUrl,OTEL_EXPORTER_OTLP_ENDPOINT:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_PROTOCOL:process.env.OTEL_EXPORTER_OTLP_PROTOCOL,OTEL_RESOURCE_ATTRIBUTES:process.env.OTEL_RESOURCE_ATTRIBUTES,DECO_SUPABASE_URL:X.decoSupabaseUrl,DECO_SUPABASE_SERVICE_KEY:X.decoSupabaseServiceKey,FIRECRAWL_API_KEY:X.firecrawlApiKey,STUDIO_SANDBOX_RUNNER:process.env.STUDIO_SANDBOX_RUNNER,STUDIO_SANDBOX_TEMPLATE_NAME:process.env.STUDIO_SANDBOX_TEMPLATE_NAME,STUDIO_ENV:process.env.STUDIO_ENV,STUDIO_SANDBOX_PREVIEW_URL_PATTERN:process.env.STUDIO_SANDBOX_PREVIEW_URL_PATTERN,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE,STUDIO_SANDBOX_SENTINEL_TOKEN:process.env.STUDIO_SANDBOX_SENTINEL_TOKEN,KUBERNETES_SERVICE_HOST:process.env.KUBERNETES_SERVICE_HOST,KUBERNETES_SERVICE_PORT:process.env.KUBERNETES_SERVICE_PORT,FREESTYLE_API_KEY:process.env.FREESTYLE_API_KEY,BROWSERLESS_TOKEN:process.env.BROWSERLESS_TOKEN,NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS,DECO_CLI:"1",DECO_NO_TUI:"true",...Y}}var bj=k((ha5)=>{ha5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(ha5.HttpAuthLocation||(ha5.HttpAuthLocation={}));ha5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(ha5.HttpApiKeyAuthLocation||(ha5.HttpApiKeyAuthLocation={}));ha5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(ha5.EndpointURLScheme||(ha5.EndpointURLScheme={}));ha5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(ha5.AlgorithmId||(ha5.AlgorithmId={}));var _a5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>ha5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>ha5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},fa5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},ba5=(X)=>{return _a5(X)},ya5=(X)=>{return fa5(X)};ha5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(ha5.FieldPosition||(ha5.FieldPosition={}));var xa5="__smithy_context";ha5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(ha5.IniSectionType||(ha5.IniSectionType={}));ha5.RequestHandlerProtocol=void 0;(function(X){X.HTTP_0_9="http/0.9",X.HTTP_1_0="http/1.0",X.TDS_8_0="tds/8.0"})(ha5.RequestHandlerProtocol||(ha5.RequestHandlerProtocol={}));ha5.SMITHY_CONTEXT_KEY=xa5;ha5.getDefaultClientConfiguration=ba5;ha5.resolveDefaultRuntimeConfig=ya5});var u7=k((na5)=>{var ma5=bj(),da5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},ca5=(X)=>{return{httpHandler:X.httpHandler()}};class k16{name;kind;values;constructor({name:X,kind:Y=ma5.FieldPosition.HEADER,values:G=[]}){this.name=X,this.kind=Y,this.values=G}add(X){this.values.push(X)}set(X){this.values=X}remove(X){this.values=this.values.filter((Y)=>Y!==X)}toString(){return this.values.map((X)=>X.includes(",")||X.includes(" ")?`"${X}"`:X).join(", ")}get(){return this.values}}class C16{entries={};encoding;constructor({fields:X=[],encoding:Y="utf-8"}){X.forEach(this.setField.bind(this)),this.encoding=Y}setField(X){this.entries[X.name.toLowerCase()]=X}getField(X){return this.entries[X.toLowerCase()]}removeField(X){delete this.entries[X.toLowerCase()]}getByType(X){return Object.values(this.entries).filter((Y)=>Y.kind===X)}}class oA1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(X){this.method=X.method||"GET",this.hostname=X.hostname||"localhost",this.port=X.port,this.query=X.query||{},this.headers=X.headers||{},this.body=X.body,this.protocol=X.protocol?X.protocol.slice(-1)!==":"?`${X.protocol}:`:X.protocol:"https:",this.path=X.path?X.path.charAt(0)!=="/"?`/${X.path}`:X.path:"/",this.username=X.username,this.password=X.password,this.fragment=X.fragment}static clone(X){let Y=new oA1({...X,headers:{...X.headers}});if(Y.query)Y.query=ia5(Y.query);return Y}static isInstance(X){if(!X)return!1;let Y=X;return"method"in Y&&"protocol"in Y&&"hostname"in Y&&"path"in Y&&typeof Y.query==="object"&&typeof Y.headers==="object"}clone(){return oA1.clone(this)}}function ia5(X){return Object.keys(X).reduce((Y,G)=>{let Q=X[G];return{...Y,[G]:Array.isArray(Q)?[...Q]:Q}},{})}class v16{statusCode;reason;headers;body;constructor(X){this.statusCode=X.statusCode,this.reason=X.reason,this.headers=X.headers||{},this.body=X.body}static isInstance(X){if(!X)return!1;let Y=X;return typeof Y.statusCode==="number"&&typeof Y.headers==="object"}}function pa5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}na5.Field=k16;na5.Fields=C16;na5.HttpRequest=oA1;na5.HttpResponse=v16;na5.getHttpHandlerExtensionConfiguration=da5;na5.isValidHostname=pa5;na5.resolveHttpHandlerRuntimeConfig=ca5});function Yr5(X){return(Y)=>async(G)=>{let{request:Q}=G;if(X.expectContinueHeader!==!1&&_16.HttpRequest.isInstance(Q)&&Q.body&&X.runtime==="node"&&X.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof X.expectContinueHeader==="number")try{J=(Number(Q.headers?.["content-length"])??X.bodyLengthChecker?.(Q.body)??1/0)>=X.expectContinueHeader}catch(W){}else J=!!X.expectContinueHeader;if(J)Q.headers.Expect="100-continue"}return Y({...G,request:Q})}}var _16,Gr5,f16=(X)=>({applyToStack:(Y)=>{Y.add(Yr5(X),Gr5)}});var b16=w(()=>{_16=X1(u7(),1);Gr5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,sA1,yj,eA1,E9,y16,yX1;var LH=w(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},sA1=wH.WHEN_SUPPORTED,yj={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},eA1=wH.WHEN_SUPPORTED;(function(X){X.MD5="MD5",X.CRC32="CRC32",X.CRC32C="CRC32C",X.CRC64NVME="CRC64NVME",X.SHA1="SHA1",X.SHA256="SHA256"})(E9||(E9={}));(function(X){X.HEADER="header",X.TRAILER="trailer"})(y16||(y16={}));yX1=E9.CRC32});var kq,Ya=(X,Y,G,Q)=>{if(!(Y in X))return;let J=X[Y].toUpperCase();if(!Object.values(G).includes(J))throw TypeError(`Cannot load ${Q} '${Y}'. Expected one of ${Object.values(G)}, got '${X[Y]}'.`);return J};var rN0=w(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(kq||(kq={}))});var Qr5="AWS_REQUEST_CHECKSUM_CALCULATION",Jr5="request_checksum_calculation",x16;var h16=w(()=>{LH();rN0();x16={environmentVariableSelector:(X)=>Ya(X,Qr5,wH,kq.ENV),configFileSelector:(X)=>Ya(X,Jr5,wH,kq.CONFIG),default:sA1}});var Zr5="AWS_RESPONSE_CHECKSUM_VALIDATION",Wr5="response_checksum_validation",g16;var u16=w(()=>{LH();rN0();g16={environmentVariableSelector:(X)=>Ya(X,Zr5,yj,kq.ENV),configFileSelector:(X)=>Ya(X,Wr5,yj,kq.CONFIG),default:eA1}});var sN0=k((Dr5)=>{var $r5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Kr5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Hr5=["TimeoutError","RequestTimeout","RequestTimeoutException"],Fr5=[500,502,503,504],Ur5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Br5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l16=(X)=>X?.$retryable!==void 0,Nr5=(X)=>$r5.includes(X.name),m16=(X)=>X.$metadata?.clockSkewCorrected,d16=(X)=>{let Y=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(X&&X instanceof TypeError))return!1;return Y.has(X.message)},zr5=(X)=>X.$metadata?.httpStatusCode===429||Kr5.includes(X.name)||X.$retryable?.throttling==!0,oN0=(X,Y=0)=>l16(X)||m16(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Hr5.includes(X.name)||Ur5.includes(X?.code||"")||Br5.includes(X?.code||"")||Fr5.includes(X.$metadata?.httpStatusCode||0)||d16(X)||c16(X)||X.cause!==void 0&&Y<=10&&oN0(X.cause,Y+1),Or5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!oN0(X))return!0;return!1}return!1};function c16(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}Dr5.isBrowserNetworkError=d16;Dr5.isClockSkewCorrectedError=m16;Dr5.isClockSkewError=Nr5;Dr5.isNodeJsHttp2TransientError=c16;Dr5.isRetryableByTrait=l16;Dr5.isServerError=Or5;Dr5.isThrottlingError=zr5;Dr5.isTransientError=oN0});var Dw=k((_r5)=>{var Vr5=sN0();_r5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(_r5.RETRY_MODES||(_r5.RETRY_MODES={}));var YT1=3,jr5=_r5.RETRY_MODES.STANDARD;class GT1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(X){this.beta=X?.beta??0.7,this.minCapacity=X?.minCapacity??1,this.minFillRate=X?.minFillRate??0.5,this.scaleConstant=X?.scaleConstant??0.4,this.smooth=X?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(X){let Y;this.updateMeasuredRate();let G=X;if(G?.errorType==="THROTTLING"||Vr5.isThrottlingError(G?.error??X)){let W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),Y=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),Y=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(Y,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(X){if(!this.enabled)return;if(this.refillTokenBucket(),X>this.availableTokens){let Y=(X-this.availableTokens)/this.fillRate*1000;await new Promise((G)=>GT1.setTimeoutFn(G,Y))}this.availableTokens=this.availableTokens-X}refillTokenBucket(){let X=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=X;return}let Y=(X-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+Y),this.lastTimestamp=X}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(X){return this.getPrecise(X*this.beta)}cubicSuccess(X){return this.getPrecise(this.scaleConstant*Math.pow(X-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(X){this.refillTokenBucket(),this.fillRate=Math.max(X,this.minFillRate),this.maxCapacity=Math.max(X,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let X=this.getCurrentTimeInSeconds(),Y=Math.floor(X*2)/2;if(this.requestCount++,Y>this.lastTxRateBucket){let G=this.requestCount/(Y-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=Y}}getPrecise(X){return parseFloat(X.toFixed(8))}}var Mr5=100,Yz0=20000,Rr5=500,eN0=500,Sr5=5,kr5=10,i16=1,Cr5="amz-sdk-invocation-id",vr5="amz-sdk-request";class eQ{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return eQ.v2026?50:100}static throttlingDelay(){return eQ.v2026?1000:500}static cost(){return eQ.v2026?14:5}static throttlingCost(){return eQ.v2026?5:10}static modifiedCostType(){return eQ.v2026?"THROTTLING":"TRANSIENT"}}class p16{x=eQ.delay();computeNextBackoffDelay(X){let Y=Math.random(),G=2,Q=Y*Math.min(this.x*2**X,Yz0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class Xz0{delay;count;cost;longPoll;constructor(X,Y,G,Q){this.delay=X,this.count=Y,this.cost=G,this.longPoll=Q}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Yz0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var XT1={incompatible:1,attempts:2,capacity:3};class xX1{mode=_r5.RETRY_MODES.STANDARD;capacity=eN0;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(X){if(typeof X==="number")this.maxAttemptsProvider=async()=>X;else if(typeof X==="function")this.maxAttemptsProvider=X;else if(X&&typeof X==="object")this.maxAttemptsProvider=async()=>X.maxAttempts,this.baseDelay=X.baseDelay,this.retryBackoffStrategy=X.backoff;this.maxAttemptsProvider??=async()=>YT1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new p16}async acquireInitialRetryToken(X){return new Xz0(eQ.delay(),0,void 0,eQ.v2026&&X.includes(":longpoll"))}async refreshRetryTokenForRetry(X,Y){let G=await this.getMaxAttempts(),Q=this.retryCode(X,Y,G),J=Q===0,W=X.isLongPoll?.();if(J||W){let Z=Y.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?eQ.throttlingDelay():this.baseDelay);let $=this.retryBackoffStrategy.computeNextBackoffDelay(X.getRetryCount()),K=$;if(Y.retryAfterHint instanceof Date)K=Math.max($,Math.min(Y.retryAfterHint.getTime()-Date.now(),$+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:eQ.v2026&&Q===XT1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new Xz0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(eN0,this.capacity+(X.getRetryCost()??i16))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(X){return console.warn(`Max attempts provider could not resolve. Using default of ${YT1}`),YT1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:XT1.incompatible,W=Q<G?0:XT1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:XT1.capacity;return J||W||Z}getCapacityCost(X){return X===eQ.modifiedCostType()?eQ.throttlingCost():eQ.cost()}isRetryableError(X){return X==="THROTTLING"||X==="TRANSIENT"}}class n16{mode=_r5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new GT1,this.standardRetryStrategy=Y?new xX1({maxAttempts:typeof X==="number"?X:3,...Y}):new xX1(X)}async acquireInitialRetryToken(X){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(X)}async refreshRetryTokenForRetry(X,Y){return this.rateLimiter.updateClientSendingRate(Y),this.standardRetryStrategy.refreshRetryTokenForRetry(X,Y)}recordSuccess(X){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(X)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class t16 extends xX1{computeNextBackoffDelay;constructor(X,Y=eQ.delay()){super(typeof X==="function"?X:async()=>X);if(typeof Y==="number")this.computeNextBackoffDelay=()=>Y;else this.computeNextBackoffDelay=Y}async refreshRetryTokenForRetry(X,Y){let G=await super.refreshRetryTokenForRetry(X,Y);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}}_r5.AdaptiveRetryStrategy=n16;_r5.ConfiguredRetryStrategy=t16;_r5.DEFAULT_MAX_ATTEMPTS=YT1;_r5.DEFAULT_RETRY_DELAY_BASE=Mr5;_r5.DEFAULT_RETRY_MODE=jr5;_r5.DefaultRateLimiter=GT1;_r5.INITIAL_RETRY_TOKENS=eN0;_r5.INVOCATION_ID_HEADER=Cr5;_r5.MAXIMUM_RETRY_DELAY=Yz0;_r5.NO_RETRY_INCREMENT=i16;_r5.REQUEST_HEADER=vr5;_r5.RETRY_COST=Sr5;_r5.Retry=eQ;_r5.StandardRetryStrategy=xX1;_r5.THROTTLING_RETRY_DELAY_BASE=Rr5;_r5.TIMEOUT_RETRY_COST=kr5});var WX=k((Jo5)=>{var rr5=Dw(),Gz0={warningEmitted:!1},or5=(X)=>{if(X&&!Gz0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)Gz0.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
1647
1647
  no longer support Node.js ${X} in January 2026.
1648
1648
 
1649
1649
  To continue receiving updates to AWS services, bug fixes, and security