decocms 2.310.5 → 2.310.6

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 (247) hide show
  1. package/dist/client/assets/{AlertCircle-Cxcba8DN.js → AlertCircle-CFABZy3o.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-CtUMVsB_.js → ArrowNarrowLeft-qjcSXUou.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-ZaII7u8u.js → ArrowUpRight-havdJdQt.js} +1 -1
  4. package/dist/client/assets/{Check-BStFjKto.js → Check-4wEPFmVT.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-CkSmS6Cg.js → CheckCircle-D7ReuLNV.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-CJ0icK2r.js → ChevronDown-CLwgC4lc.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-Dw3Db6I0.js → ChevronRight-DW27S4dx.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-BDsNPBis.js → ChevronUp-DAW3-3dA.js} +1 -1
  9. package/dist/client/assets/{Container-WBb7qbdD.js → Container-C9S2fJrQ.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BPk38qYQ.js → DotsVertical-BReL32xd.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-6x3Iy4Gd.js → LinkExternal01-0Xs4UV_i.js} +1 -1
  12. package/dist/client/assets/{Lock01-DA0MuRwj.js → Lock01-BjKqD6QN.js} +1 -1
  13. package/dist/client/assets/{Palette-DfzN4-9K.js → Palette-Dtg_tDlg.js} +1 -1
  14. package/dist/client/assets/{Play-QsP1MGXe.js → Play-85A9faRd.js} +1 -1
  15. package/dist/client/assets/{Plus-QZEpDFDV.js → Plus-BxG8Erza.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-DKtPikGx.js → RefreshCcw01-DdgK7Krp.js} +1 -1
  17. package/dist/client/assets/{SearchMd-BHubyM0S.js → SearchMd-JVaJZdXg.js} +1 -1
  18. package/dist/client/assets/{Settings02-DpkRLLNd.js → Settings02-BZivkDIL.js} +1 -1
  19. package/dist/client/assets/{Shield01-BvsHGINb.js → Shield01-CAl07SGJ.js} +1 -1
  20. package/dist/client/assets/{Star01-DduN7cUl.js → Star01-DEmigL_c.js} +1 -1
  21. package/dist/client/assets/{Sun-k7d5io6k.js → Sun-TDfj1GPd.js} +1 -1
  22. package/dist/client/assets/{Tool01-BPmEF3oC.js → Tool01-Bhj2T1uN.js} +1 -1
  23. package/dist/client/assets/{Trash01-DhkmMJFO.js → Trash01-CdymalYb.js} +1 -1
  24. package/dist/client/assets/{User01-76gT3tOW.js → User01-BZ9BWkFc.js} +1 -1
  25. package/dist/client/assets/{Users03-DDHNU2o0.js → Users03-DG3Gfjoh.js} +1 -1
  26. package/dist/client/assets/{X-C_O1kj8t.js → X-DzLPqoAC.js} +1 -1
  27. package/dist/client/assets/{XCircle-D9VV2CKm.js → XCircle-DTJod2tn.js} +1 -1
  28. package/dist/client/assets/{XClose-C21czImH.js → XClose-0biyZ-nq.js} +1 -1
  29. package/dist/client/assets/{Zap-TR29R2LK.js → Zap-aKe8CYDP.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-OxHp4t0m.js → ZapSquare-DtdkchqU.js} +1 -1
  31. package/dist/client/assets/{accordion-CTsJVvtX.js → accordion-CHtp00zM.js} +1 -1
  32. package/dist/client/assets/{agent-icon-s17W0wUB.js → agent-icon-D-W_-Msq.js} +1 -1
  33. package/dist/client/assets/{agents-list-VvrcV5iJ.js → agents-list-DuIrLHcS.js} +1 -1
  34. package/dist/client/assets/ai-providers-BTcrVDAh.js +1 -0
  35. package/dist/client/assets/{alert-dialog-CmK4A6kC.js → alert-dialog-DZ7MoPrC.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-8ZQwpXp5.js → auth-catchall-0StMYUgy.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-BCSS4QUj.js → automation-list-row-CS-JiMPM.js} +1 -1
  38. package/dist/client/assets/{automations-DeCusdy6.js → automations-BAEn2v9X.js} +1 -1
  39. package/dist/client/assets/{avatar-CSILDiJX.js → avatar-CtlfIArZ.js} +1 -1
  40. package/dist/client/assets/{badge-COxphYel.js → badge-YKYMjnfu.js} +1 -1
  41. package/dist/client/assets/{brand-context-CWfr5DVG.js → brand-context-DfGmGZnx.js} +1 -1
  42. package/dist/client/assets/{card-CBJhlNRB.js → card-uZ87GViI.js} +1 -1
  43. package/dist/client/assets/{chat-context-De5Jlj4X.js → chat-context-BFxTlymH.js} +1 -1
  44. package/dist/client/assets/{checkbox-DjVRr70r.js → checkbox-BFMSekYh.js} +1 -1
  45. package/dist/client/assets/{collection-detail-DpmRlPMa.js → collection-detail-z1-sDcK2.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-BbDt8MHw.js → collection-display-button-DqIrM4V5.js} +1 -1
  47. package/dist/client/assets/{collection-search-Qnmn9Jjl.js → collection-search-CrNavgfW.js} +1 -1
  48. package/dist/client/assets/{collection-search-CfovRENW.js → collection-search-DV0cCH2j.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-CnIJP88L.js → collection-table-wrapper-CjedtIca.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-BJ2mAaff.js → collection-tabs-D653lS2B.js} +1 -1
  51. package/dist/client/assets/{collections-BNKaenRk.js → collections-kcgqXRh1.js} +1 -1
  52. package/dist/client/assets/{command-DPlcxMzI.js → command-DEZQ8Srq.js} +1 -1
  53. package/dist/client/assets/{connection-card-CuHLr6qd.js → connection-card-DDf_nl47.js} +1 -1
  54. package/dist/client/assets/{connection-detail-b2gPCepr.js → connection-detail-DIAn09sC.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-CAZC18NZ.js → connection-form-helpers-CaEsrTVy.js} +1 -1
  56. package/dist/client/assets/{connections-BQvZQo8B.js → connections-BTFAJALU.js} +1 -1
  57. package/dist/client/assets/{constants-B_3LNOq3.js → constants-9g9gFjnw.js} +1 -1
  58. package/dist/client/assets/{constants-BKat4sJw.js → constants-DsSHL62C.js} +1 -1
  59. package/dist/client/assets/{dialog-DxHqBK-g.js → dialog-B4KlHjek.js} +1 -1
  60. package/dist/client/assets/{domain-settings-Dj6mogBD.js → domain-settings-D1FHhwCI.js} +1 -1
  61. package/dist/client/assets/{drawer-CPYawKkb.js → drawer-5orE9Wr9.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-Do_6-JC4.js → dropdown-menu-BsFYaC7C.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-CGObbc--.js → dynamic-plugin-layout-CwAziEC5.js} +1 -1
  64. package/dist/client/assets/{empty-state-DDT6Axd2.js → empty-state-DnjUFLB3.js} +1 -1
  65. package/dist/client/assets/{empty-state-Bmp0M8wH.js → empty-state-fJhgTnn4.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-ooIvzjyZ.js → extract-connection-data-4I5O_R5k.js} +1 -1
  67. package/dist/client/assets/{features-Ck3YVx8z.js → features-CNtB2JQC.js} +1 -1
  68. package/dist/client/assets/{form-BV__Eo4v.js → form-CDvvEZtA.js} +1 -1
  69. package/dist/client/assets/{general-J5FLwmfS.js → general-Dz0H1FEC.js} +1 -1
  70. package/dist/client/assets/{index-CjZClkan.js → index-B3Ttc_5_.js} +1 -1
  71. package/dist/client/assets/{index-CKPYZoPD.js → index-BJq84O_6.js} +1 -1
  72. package/dist/client/assets/{index-D9tByeUz.js → index-BnEPkkjz.js} +1 -1
  73. package/dist/client/assets/{index-BrMQgHVf.js → index-C1C4QgjJ.js} +1 -1
  74. package/dist/client/assets/{index-CkXbIQAg.js → index-CVzq_PSm.js} +1 -1
  75. package/dist/client/assets/{index-CFiXkeYB.js → index-ChoE-W6u.js} +1 -1
  76. package/dist/client/assets/{index-DO6HBQ4K.js → index-CneSjNEN.js} +1 -1
  77. package/dist/client/assets/{index-D075V-Aw.js → index-CoY1MHFJ.js} +1 -1
  78. package/dist/client/assets/index-Di6eCNBZ.js +1 -0
  79. package/dist/client/assets/{index-BZ3dhBMg.js → index-DrOTgwhJ.js} +1 -1
  80. package/dist/client/assets/{index-Dt0vRnUx.js → index-H-xuVWHv.js} +1 -1
  81. package/dist/client/assets/{index-DJnCb9MX.js → index-TikwA-8X.js} +3 -3
  82. package/dist/client/assets/{index-BKcT0ut5.js → index-WBXw_0um.js} +1 -1
  83. package/dist/client/assets/{index-CQAZn3EK.js → index-_Uov_1Gm.js} +1 -1
  84. package/dist/client/assets/{index-Baly1FX_.js → index-__EZcmD7.js} +1 -1
  85. package/dist/client/assets/{index-BjqwKAPh.js → index-n0iHPcte.js} +2 -2
  86. package/dist/client/assets/{infiniteQueryObserver-BOOXGQo2.js → infiniteQueryObserver-CWqfKiPC.js} +1 -1
  87. package/dist/client/assets/{input-BY95D9hS.js → input-DEYTwRzn.js} +1 -1
  88. package/dist/client/assets/{integration-icon-BTq6hO7n.js → integration-icon-Bkie-XyL.js} +1 -1
  89. package/dist/client/assets/{label-Z9ad9sg6.js → label-DWRjHkWy.js} +1 -1
  90. package/dist/client/assets/{layout-D9TsRZCx.js → layout-CjfRI0kM.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-OmMNmndT.js → lean-canvas-recruit-modal-DGk9eFdJ.js} +1 -1
  92. package/dist/client/assets/{login-C9jgvn5K.js → login-DKUj7zIS.js} +1 -1
  93. package/dist/client/assets/{members-CBmW6KwZ.js → members-BbSPO94a.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-UyxFxpQH.js → monaco-editor-DqaoMZN_.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-DdON8HAn.js → monitoring-stats-row-DhIBV8mS.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-D7SVJIig.js → oauth-callback-4rQ_SIXQ.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-D_zvQ6_C.js → oauth-callback-ai-provider--0vKdiLB.js} +1 -1
  98. package/dist/client/assets/{onboarding-0k8ZSX_k.js → onboarding-CCqg4mEL.js} +1 -1
  99. package/dist/client/assets/{org-layout-D_IQBqiz.js → org-layout-GNTOf2Y_.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-CSiRNaTu.js → org-plugin-layout-DvR4YnGa.js} +1 -1
  101. package/dist/client/assets/{pair-DxZ7l3-Z.js → pair-tqYVnZzb.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-Dp1Lzm8V.js → plugin-empty-state-B7Ew5cqE.js} +1 -1
  103. package/dist/client/assets/{plugin-header-9vDTFdB9.js → plugin-header-HT1h0NLv.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-3ykxXUjf.js → plugin-layout-BRlJ23A-.js} +1 -1
  105. package/dist/client/assets/{popover-Zakke__8.js → popover-BDSYEq1Z.js} +1 -1
  106. package/dist/client/assets/{profile-9LB06cBx.js → profile-CE6TtzAL.js} +1 -1
  107. package/dist/client/assets/{project-app-view-CqdnMjZ0.js → project-app-view-CKGfiYJS.js} +1 -1
  108. package/dist/client/assets/registry-KydgQONl.js +2 -0
  109. package/dist/client/assets/{registry-layout-CJQb6Z8y.js → registry-layout-BgUN22Is.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-BxrX3bDQ.js → required-auth-layout-C2TKIvqH.js} +1 -1
  111. package/dist/client/assets/{reset-password-B5KLP3tu.js → reset-password-CFEVrlT-.js} +1 -1
  112. package/dist/client/assets/{roles-DGvkLiRr.js → roles-UDExR41M.js} +1 -1
  113. package/dist/client/assets/{scroll-area-DkrmJo9D.js → scroll-area-1CfGMim0.js} +1 -1
  114. package/dist/client/assets/{search-input-CdGp9qCd.js → search-input-BUN7olRm.js} +1 -1
  115. package/dist/client/assets/{select-CR2tN9TX.js → select-CDN58G81.js} +1 -1
  116. package/dist/client/assets/{select-model-CQhnH5Rx.js → select-model-BoyVFry8.js} +1 -1
  117. package/dist/client/assets/{settings-layout-DHX6Eu2B.js → settings-layout-DyxDLw6w.js} +1 -1
  118. package/dist/client/assets/{settings-section-67sbTFXw.js → settings-section-gdfEnAUq.js} +1 -1
  119. package/dist/client/assets/{shell-layout-CimuPmyV.js → shell-layout-BAgHU931.js} +1 -1
  120. package/dist/client/assets/{skeleton-CS-2bSP9.js → skeleton-B66wWsdL.js} +1 -1
  121. package/dist/client/assets/{sso-Dr2zYrCj.js → sso-9AzOTM0F.js} +1 -1
  122. package/dist/client/assets/{store-DpWEzwk_.js → store-8UHU7otF.js} +1 -1
  123. package/dist/client/assets/store-registry-JV-2CVIA.js +2 -0
  124. package/dist/client/assets/{switch-zLHY6ITD.js → switch-DIHVY0RD.js} +1 -1
  125. package/dist/client/assets/{table-CegXcKEa.js → table-pLgWKqqj.js} +1 -1
  126. package/dist/client/assets/{tabs-CJQTWD5_.js → tabs-B36z-iXu.js} +1 -1
  127. package/dist/client/assets/{task-status-0vcjP9bK.js → task-status-zPChwtIb.js} +1 -1
  128. package/dist/client/assets/{textarea-fydFuW_3.js → textarea-BJm0Tf5N.js} +1 -1
  129. package/dist/client/assets/{toggle-group-7VcHOdQ-.js → toggle-group-BCvX9smm.js} +1 -1
  130. package/dist/client/assets/{tools-list-DqqciwCd.js → tools-list-DsW7X9uH.js} +1 -1
  131. package/dist/client/assets/{tooltip-D_AU3yF1.js → tooltip-DK9ITTps.js} +1 -1
  132. package/dist/client/assets/{types-Cnb1YG8h.js → types-CHJA9iY7.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-BJDLmjji.js → use-ai-providers-Wa05FQa-.js} +1 -1
  134. package/dist/client/assets/{use-collections-Gut3G1oa.js → use-collections-DEtL7TsG.js} +1 -1
  135. package/dist/client/assets/{use-connection-DPW4E_0G.js → use-connection-BA7MX_A_.js} +1 -1
  136. package/dist/client/assets/{use-copy-B4TaRnHv.js → use-copy-B_9_NtCX.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-DIprfvzX.js → use-create-virtual-mcp-BWms3_Wm.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-DHCyVVfx.js → use-debounced-autosave-RQpwA8uI.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-Cbmf5tlg.js → use-decopilot-events-CAAYd06u.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-WVmPLIlj.js → use-delete-connection-mhnpE7ro.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-T0hVA3O9.js → use-infinite-scroll-CM8Ra6DF.js} +1 -1
  142. package/dist/client/assets/{use-list-state-DA3cifaL.js → use-list-state-BWx4o2vn.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-iAx7skPl.js → use-mcp-tools-D_JiTODV.js} +1 -1
  144. package/dist/client/assets/{use-members-j0TSecaQ.js → use-members-Dh6NCni1.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-BCE8xoYG.js → use-navigate-to-agent-Cr_ZMHfb.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-Csj669Fw.js → use-org-auth-client-D8ifGvzT.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-Cm8qhi19.js → use-org-sso-IjJZMJF0.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-InflUxV2.js → use-organization-roles-sdfgjrG3.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-sGFYoeez.js → use-organization-settings-ZtHNr_4_.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-CA8kz06E.js → use-registry-connections-C9TouqtJ.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-DM61lJPE.js → use-status-sounds-BEFDLRaR.js} +1 -1
  152. package/dist/client/assets/{use-tasks-C2Vyiupf.js → use-tasks-DZC5fx2d.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-BoUYdfcR.js → use-view-mode-C1XifkB4.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-DER1r6QO.js → use-virtual-mcp-w_wFYi9Y.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-tCVYDURJ.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-hHdMeBLO.js +1 -0
  157. package/dist/client/assets/{user-Di0TXJ3H.js → user-BHWnxivf.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-DoU7eK15.js → view-mode-toggle-DUYrFi8F.js} +1 -1
  159. package/dist/client/assets/{workflow-DkCqRbGa.js → workflow-CAeRJIAh.js} +1 -1
  160. package/dist/client/assets/workflow-detail-CsmAVzf-.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +48 -8
  163. package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
  164. package/dist/server/node_modules/ansi-regex/index.js +14 -0
  165. package/dist/server/node_modules/ansi-regex/package.json +61 -0
  166. package/dist/server/node_modules/ansi-regex/readme.md +66 -0
  167. package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  168. package/dist/server/node_modules/emoji-regex/README.md +107 -0
  169. package/dist/server/node_modules/emoji-regex/index.d.ts +3 -0
  170. package/dist/server/node_modules/emoji-regex/index.js +4 -0
  171. package/dist/server/node_modules/emoji-regex/index.mjs +4 -0
  172. package/dist/server/node_modules/emoji-regex/package.json +45 -0
  173. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  174. package/dist/server/node_modules/onetime/index.js +44 -0
  175. package/dist/server/node_modules/{mimic-fn → onetime}/license +1 -1
  176. package/dist/server/node_modules/{mimic-fn → onetime}/package.json +16 -15
  177. package/dist/server/node_modules/onetime/readme.md +94 -0
  178. package/dist/server/server.js +47 -7
  179. package/package.json +1 -1
  180. package/dist/client/assets/ai-providers-CW7mNid6.js +0 -1
  181. package/dist/client/assets/index-DxiAr3ci.js +0 -1
  182. package/dist/client/assets/registry-DqBhBsD3.js +0 -2
  183. package/dist/client/assets/store-registry-CQpdN133.js +0 -2
  184. package/dist/client/assets/useInfiniteQuery-BjzmzsUJ.js +0 -1
  185. package/dist/client/assets/useSuspenseInfiniteQuery-SvwkjZhj.js +0 -1
  186. package/dist/client/assets/workflow-detail-CbEkNnBb.js +0 -1
  187. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  188. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  189. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  190. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  191. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  192. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  193. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  194. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  195. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  196. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  197. package/dist/server/node_modules/pg/LICENSE +0 -21
  198. package/dist/server/node_modules/pg/README.md +0 -95
  199. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  200. package/dist/server/node_modules/pg/lib/client.js +0 -743
  201. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  202. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  203. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  204. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  205. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  206. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  207. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  208. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  209. package/dist/server/node_modules/pg/lib/index.js +0 -73
  210. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  211. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  212. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  213. package/dist/server/node_modules/pg/lib/query.js +0 -252
  214. package/dist/server/node_modules/pg/lib/result.js +0 -109
  215. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  216. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  217. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  218. package/dist/server/node_modules/pg/package.json +0 -76
  219. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  220. package/dist/server/node_modules/pg-int8/README.md +0 -16
  221. package/dist/server/node_modules/pg-int8/index.js +0 -100
  222. package/dist/server/node_modules/pg-int8/package.json +0 -24
  223. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  224. package/dist/server/node_modules/postgres-array/index.js +0 -97
  225. package/dist/server/node_modules/postgres-array/license +0 -21
  226. package/dist/server/node_modules/postgres-array/package.json +0 -35
  227. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  228. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  229. package/dist/server/node_modules/postgres-bytea/license +0 -21
  230. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  231. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  232. package/dist/server/node_modules/postgres-date/index.js +0 -116
  233. package/dist/server/node_modules/postgres-date/license +0 -21
  234. package/dist/server/node_modules/postgres-date/package.json +0 -33
  235. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  236. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  237. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  238. package/dist/server/node_modules/postgres-interval/license +0 -21
  239. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  240. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  241. package/dist/server/node_modules/split2/LICENSE +0 -13
  242. package/dist/server/node_modules/split2/README.md +0 -85
  243. package/dist/server/node_modules/split2/bench.js +0 -27
  244. package/dist/server/node_modules/split2/index.js +0 -141
  245. package/dist/server/node_modules/split2/package.json +0 -39
  246. package/dist/server/node_modules/split2/test.js +0 -409
  247. /package/dist/server/node_modules/{get-east-asian-width → ansi-regex}/license +0 -0
@@ -1 +1 @@
1
- import{e as P,r as v,c as m,j as o}from"./index-BjqwKAPh.js";import{T as L,a as M,b as q}from"./tooltip-D_AU3yF1.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-n0iHPcte.js";import{T as L,a as M,b as q}from"./tooltip-DK9ITTps.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 +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-BjqwKAPh.js";import{u as Ve,S as qe}from"./constants-BKat4sJw.js";import{B as ft,g as Me}from"./constants-B_3LNOq3.js";import{C as Ge}from"./collection-display-button-BbDt8MHw.js";import{C as ht}from"./collection-search-CfovRENW.js";import{C as gt}from"./card-CBJhlNRB.js";import{I as Qe}from"./integration-icon-BTq6hO7n.js";import{D as Ye,a as He,b as Je,c as O}from"./dropdown-menu-Do_6-JC4.js";import{c as Ze}from"./XCircle-D9VV2CKm.js";import{i as Xe}from"./DotsVertical-BPk38qYQ.js";import{i as et}from"./Tool01-BPmEF3oC.js";import{s as tt}from"./RefreshCcw01-DKtPikGx.js";import{s as st}from"./Trash01-DhkmMJFO.js";import{C as xt}from"./collection-table-wrapper-CnIJP88L.js";import{E as Ue}from"./empty-state-Bmp0M8wH.js";import{G as We}from"./agent-icon-s17W0wUB.js";import{U as jt}from"./user-Di0TXJ3H.js";import{E as it}from"./empty-state-DDT6Axd2.js";import{u as Ct}from"./use-list-state-DA3cifaL.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-CmK4A6kC.js";import{a as It,c as At}from"./use-collections-Gut3G1oa.js";import{a as Tt}from"./use-connection-DPW4E_0G.js";import{s as Et}from"./Plus-QZEpDFDV.js";import{a as Ot}from"./layout-D9TsRZCx.js";import{P as je}from"./index-CkXbIQAg.js";import"./collections-BNKaenRk.js";import"./XClose-C21czImH.js";import"./Check-BStFjKto.js";import"./tooltip-D_AU3yF1.js";import"./view-mode-toggle-DoU7eK15.js";import"./badge-COxphYel.js";import"./SearchMd-BHubyM0S.js";import"./Container-WBb7qbdD.js";import"./ChevronRight-Dw3Db6I0.js";import"./table-CegXcKEa.js";import"./AlertCircle-Cxcba8DN.js";import"./ArrowNarrowLeft-CtUMVsB_.js";import"./ArrowUpRight-ZaII7u8u.js";import"./ZapSquare-OxHp4t0m.js";import"./Users03-DDHNU2o0.js";import"./CheckCircle-CkSmS6Cg.js";import"./ChevronDown-CJ0icK2r.js";import"./ChevronUp-BDsNPBis.js";import"./Star01-DduN7cUl.js";import"./Palette-DfzN4-9K.js";import"./LinkExternal01-6x3Iy4Gd.js";import"./Lock01-DA0MuRwj.js";import"./Sun-k7d5io6k.js";import"./Play-QsP1MGXe.js";import"./Settings02-DpkRLLNd.js";import"./Shield01-BvsHGINb.js";import"./User01-76gT3tOW.js";import"./X-C_O1kj8t.js";import"./Zap-TR29R2LK.js";import"./avatar-CSILDiJX.js";import"./use-view-mode-BoUYdfcR.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 l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=$t(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=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]!==r||e[6]!==s.title?(m=t.jsx(Qe,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,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(Ye,{children:[t.jsx(He,{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:l,viewMode:n,search:c,sortKey:r,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]!==l||e[4]!==P?(D=j?j.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ge,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description: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:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Yt(j,l,P,h),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description: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]=l,e[21]=c,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function 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 Gt(i){return{id:"actions",header:"",render:e=>t.jsxs(Ye,{children:[t.jsx(He,{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 Qt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const m=s[o];return m&&nt(m)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.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(Qe,{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 Yt(i,e,s,l){const n=i||Qt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Gt(l)]:n}function Ht(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=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,r,$),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,$,_),A=!d&&!o&&!m;let ne;e[14]!==b||e[15]!==r||e[16]!==u||e[17]!==c||e[18]!==l?(ne=C=>{if(c){c(C);return}u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=u,e[17]=c,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==h.create||e[21]!==a?(re=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]=re):re=e[22];const be=re,[F,ve]=dt.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const rt=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==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:rt},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]!==r||e[42]!==d||e[43]!==u||e[44]!==l||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:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=h.create,e[40]=b,e[41]=r,e[42]=d,e[43]=u,e[44]=l,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,lt=(I?.length??0)>0,at=d&&!lt&&!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(Ge,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let 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 G;e[71]!==I?(G=I??[],e[71]=I,e[72]=G):G=e[72];const De=D;let Q;e[73]!==L?(Q=C=>L(C),e[73]=L,e[74]=Q):Q=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let Y;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(Y=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=Y):Y=e[78];let 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]!==G||e[88]!==De||e[89]!==Q||e[90]!==Y||e[91]!==z?(H=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:G,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:Q,readOnly:A,emptyState: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]=G,e[88]=De,e[89]=Q,e[90]=Y,e[91]=z,e[92]=H):H=e[92];let J;e[93]!==q||e[94]!==H?(J=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,H]}),e[93]=q,e[94]=H,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(),l=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 r;i[3]!==c||i[4]!==s?(r=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]=r):r=i[5];let p;i[6]!==e.id||i[7]!==s||i[8]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[6]=e.id,i[7]=s,i[8]=l,i[9]=p):p=i[9];let d;return i[10]!==r||i[11]!==p?(d={mutationFn:r,onSuccess:p,onError:Zt},i[10]=r,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:l,description:n,icon:c}=i,r=Jt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,m=r.isPending?"Enabling…":"Enable plugin";let u;e[3]!==r.isPending||e[4]!==d||e[5]!==m?(u=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:m}),e[3]=r.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]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:u}),e[7]=n,e[8]=o,e[9]=u,e[10]=l,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(Ht,{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};
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-n0iHPcte.js";import{u as Ve,S as qe}from"./constants-DsSHL62C.js";import{B as ft,g as Me}from"./constants-9g9gFjnw.js";import{C as Ge}from"./collection-display-button-DqIrM4V5.js";import{C as ht}from"./collection-search-DV0cCH2j.js";import{C as gt}from"./card-uZ87GViI.js";import{I as Qe}from"./integration-icon-Bkie-XyL.js";import{D as Ye,a as He,b as Je,c as O}from"./dropdown-menu-BsFYaC7C.js";import{c as Ze}from"./XCircle-DTJod2tn.js";import{i as Xe}from"./DotsVertical-BReL32xd.js";import{i as et}from"./Tool01-Bhj2T1uN.js";import{s as tt}from"./RefreshCcw01-DdgK7Krp.js";import{s as st}from"./Trash01-CdymalYb.js";import{C as xt}from"./collection-table-wrapper-CjedtIca.js";import{E as Ue}from"./empty-state-fJhgTnn4.js";import{G as We}from"./agent-icon-D-W_-Msq.js";import{U as jt}from"./user-BHWnxivf.js";import{E as it}from"./empty-state-DnjUFLB3.js";import{u as Ct}from"./use-list-state-BWx4o2vn.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-DZ7MoPrC.js";import{a as It,c as At}from"./use-collections-DEtL7TsG.js";import{a as Tt}from"./use-connection-BA7MX_A_.js";import{s as Et}from"./Plus-BxG8Erza.js";import{a as Ot}from"./layout-CjfRI0kM.js";import{P as je}from"./index-CVzq_PSm.js";import"./collections-kcgqXRh1.js";import"./XClose-0biyZ-nq.js";import"./Check-4wEPFmVT.js";import"./tooltip-DK9ITTps.js";import"./view-mode-toggle-DUYrFi8F.js";import"./badge-YKYMjnfu.js";import"./SearchMd-JVaJZdXg.js";import"./Container-C9S2fJrQ.js";import"./ChevronRight-DW27S4dx.js";import"./table-pLgWKqqj.js";import"./AlertCircle-CFABZy3o.js";import"./ArrowNarrowLeft-qjcSXUou.js";import"./ArrowUpRight-havdJdQt.js";import"./ZapSquare-DtdkchqU.js";import"./Users03-DG3Gfjoh.js";import"./CheckCircle-D7ReuLNV.js";import"./ChevronDown-CLwgC4lc.js";import"./ChevronUp-DAW3-3dA.js";import"./Star01-DEmigL_c.js";import"./Palette-Dtg_tDlg.js";import"./LinkExternal01-0Xs4UV_i.js";import"./Lock01-BjKqD6QN.js";import"./Sun-TDfj1GPd.js";import"./Play-85A9faRd.js";import"./Settings02-BZivkDIL.js";import"./Shield01-CAl07SGJ.js";import"./User01-BZ9BWkFc.js";import"./X-DzLPqoAC.js";import"./Zap-aKe8CYDP.js";import"./avatar-CtlfIArZ.js";import"./use-view-mode-C1XifkB4.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 l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=$t(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=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]!==r||e[6]!==s.title?(m=t.jsx(Qe,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,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(Ye,{children:[t.jsx(He,{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:l,viewMode:n,search:c,sortKey:r,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]!==l||e[4]!==P?(D=j?j.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ge,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description: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:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Yt(j,l,P,h),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description: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]=l,e[21]=c,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function 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 Gt(i){return{id:"actions",header:"",render:e=>t.jsxs(Ye,{children:[t.jsx(He,{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 Qt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const m=s[o];return m&&nt(m)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.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(Qe,{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 Yt(i,e,s,l){const n=i||Qt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Gt(l)]:n}function Ht(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=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,r,$),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,$,_),A=!d&&!o&&!m;let ne;e[14]!==b||e[15]!==r||e[16]!==u||e[17]!==c||e[18]!==l?(ne=C=>{if(c){c(C);return}u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=u,e[17]=c,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==h.create||e[21]!==a?(re=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]=re):re=e[22];const be=re,[F,ve]=dt.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const rt=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==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:rt},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]!==r||e[42]!==d||e[43]!==u||e[44]!==l||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:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=h.create,e[40]=b,e[41]=r,e[42]=d,e[43]=u,e[44]=l,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,lt=(I?.length??0)>0,at=d&&!lt&&!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(Ge,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let 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 G;e[71]!==I?(G=I??[],e[71]=I,e[72]=G):G=e[72];const De=D;let Q;e[73]!==L?(Q=C=>L(C),e[73]=L,e[74]=Q):Q=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let Y;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(Y=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=Y):Y=e[78];let 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]!==G||e[88]!==De||e[89]!==Q||e[90]!==Y||e[91]!==z?(H=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:G,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:Q,readOnly:A,emptyState: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]=G,e[88]=De,e[89]=Q,e[90]=Y,e[91]=z,e[92]=H):H=e[92];let J;e[93]!==q||e[94]!==H?(J=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,H]}),e[93]=q,e[94]=H,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(),l=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 r;i[3]!==c||i[4]!==s?(r=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]=r):r=i[5];let p;i[6]!==e.id||i[7]!==s||i[8]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[6]=e.id,i[7]=s,i[8]=l,i[9]=p):p=i[9];let d;return i[10]!==r||i[11]!==p?(d={mutationFn:r,onSuccess:p,onError:Zt},i[10]=r,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:l,description:n,icon:c}=i,r=Jt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,m=r.isPending?"Enabling…":"Enable plugin";let u;e[3]!==r.isPending||e[4]!==d||e[5]!==m?(u=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:m}),e[3]=r.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]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:u}),e[7]=n,e[8]=o,e[9]=u,e[10]=l,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(Ht,{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-n0iHPcte.js";import{a as f}from"./index-WBXw_0um.js";import"./index-CoY1MHFJ.js";import"./constants-DsSHL62C.js";import"./collections-kcgqXRh1.js";import"./index-H-xuVWHv.js";import"./use-virtual-mcp-w_wFYi9Y.js";import"./use-collections-DEtL7TsG.js";import"./monaco-editor-DqaoMZN_.js";import"./index-CneSjNEN.js";import"./accordion-CHtp00zM.js";import"./agent-icon-D-W_-Msq.js";import"./AlertCircle-CFABZy3o.js";import"./Tool01-Bhj2T1uN.js";import"./XClose-0biyZ-nq.js";import"./RefreshCcw01-DdgK7Krp.js";import"./ArrowNarrowLeft-qjcSXUou.js";import"./XCircle-DTJod2tn.js";import"./ArrowUpRight-havdJdQt.js";import"./ZapSquare-DtdkchqU.js";import"./Users03-DG3Gfjoh.js";import"./CheckCircle-D7ReuLNV.js";import"./Check-4wEPFmVT.js";import"./ChevronDown-CLwgC4lc.js";import"./ChevronRight-DW27S4dx.js";import"./ChevronUp-DAW3-3dA.js";import"./DotsVertical-BReL32xd.js";import"./Container-C9S2fJrQ.js";import"./Star01-DEmigL_c.js";import"./Palette-Dtg_tDlg.js";import"./SearchMd-JVaJZdXg.js";import"./index-CVzq_PSm.js";import"./tooltip-DK9ITTps.js";import"./X-DzLPqoAC.js";import"./LinkExternal01-0Xs4UV_i.js";import"./Lock01-BjKqD6QN.js";import"./Sun-TDfj1GPd.js";import"./Play-85A9faRd.js";import"./Plus-BxG8Erza.js";import"./Settings02-BZivkDIL.js";import"./Shield01-CAl07SGJ.js";import"./Trash01-CdymalYb.js";import"./User01-BZ9BWkFc.js";import"./Zap-aKe8CYDP.js";import"./badge-YKYMjnfu.js";import"./select-CDN58G81.js";import"./view-mode-toggle-DUYrFi8F.js";import"./layout-CjfRI0kM.js";import"./use-connection-BA7MX_A_.js";import"./use-mcp-tools-D_JiTODV.js";import"./dialog-B4KlHjek.js";import"./index-_Uov_1Gm.js";import"./dropdown-menu-BsFYaC7C.js";import"./integration-icon-Bkie-XyL.js";import"./scroll-area-1CfGMim0.js";import"./index-BJq84O_6.js";import"./empty-state-fJhgTnn4.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-DEYTwRzn.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,7 +27,7 @@
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-BjqwKAPh.js"></script>
30
+ <script type="module" crossorigin src="/assets/index-n0iHPcte.js"></script>
31
31
  <link rel="stylesheet" crossorigin href="/assets/index-CpHJcJk3.css">
32
32
  </head>
33
33
  <body>
@@ -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 cA1(X){let Y={...process.env},G=s$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(() => (u$1(),g$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(() => (XW0(),Qg4));await K(W.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (ZU(),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 yt1($),{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 SN0=w(()=>{bt1();l9()});var nA1={};T0(nA1,{updateService:()=>Ya,toggleViewMode:()=>CN0,toggleVibeState:()=>_N0,toggleLogFlow:()=>vN0,subscribeCliState:()=>CX1,setVibe:()=>et5,setTuiConsoleIntercepted:()=>iA1,setServerUrl:()=>_X1,setMigrationsDone:()=>vX1,setEnv:()=>fX1,setDevMode:()=>ot5,setDataDir:()=>st5,isTuiConsoleIntercepted:()=>pA1,getCliState:()=>kX1,addLogEntry:()=>Wz});function TU(){for(let X of kN0)X()}function kX1(){return e9}function CX1(X){return kN0.add(X),()=>kN0.delete(X)}function Ya(X){e9={...e9,services:e9.services.map((Y)=>Y.name===X.name?X:Y)},TU()}function vX1(){e9={...e9,migrationsStatus:"done"},TU()}function _X1(X){e9={...e9,serverUrl:X},TU()}function fX1(X){e9={...e9,env:X},TU()}function Wz(X){let Y=[...e9.logs,X];e9={...e9,logs:Y.length>500?Y.slice(-500):Y},TU()}function ot5(){e9={...e9,services:[...e9.services,{name:"Vite",status:"pending",port:0}]},TU()}function CN0(){e9={...e9,viewMode:e9.viewMode==="requests"?"config":"requests"},TU()}function vN0(){e9={...e9,logFlow:!e9.logFlow},TU()}function st5(X){e9={...e9,dataDir:X},TU()}function et5(X){e9={...e9,vibe:X},TU()}function _N0(){e9={...e9,vibe:!e9.vibe},TU()}function iA1(X){B16=X}function pA1(){return B16}var e9,kN0,B16=!1;var $z=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},kN0=new Set});import{createServer as N16}from"net";function Xa5(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 tA1(X){if(await Xa5(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 fN0=()=>{};var bN0={};T0(bN0,{startDevServer:()=>Ga5});import{join as Ya5}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;Wz({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)Wz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function Ga5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await tA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await cA1({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)Ya({name:z.name,status:"ready",port:z.port});fX1(W),vX1();let K=Ya5(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}`;_X1(B),Ya({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (u$1(),g$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var yN0=w(()=>{SN0();$z();fN0()});import{Box as xN0,Text as hN0}from"ink";import{jsx as w16,jsxs as aA1}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 Za5(X,Y){if(Qa5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Ja5.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 Wa5(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_SSO_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_SSO_GOOGLE_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=Wa5(X);return w16(xN0,{flexDirection:"column",children:Y.map((G)=>aA1(xN0,{flexDirection:"column",marginTop:1,children:[aA1(hN0,{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=Za5(Q,J);return aA1(xN0,{children:[aA1(hN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),w16(hN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Qa5,Ja5;var E16=w(()=>{Qa5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Ja5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var gN0;var P16=w(()=>{gN0={name:"decocms",version:"2.310.5",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 IU,Text as RX}from"ink";import{Spinner as Ka5}from"@inkjs/ui";import{useSyncExternalStore as q16}from"react";import{jsx as TY,jsxs as sQ}from"react/jsx-runtime";function Na5(X,Y){if(!X||!Ba5.has(X))return X;let G=uN0[Y]??uN0[uN0.length-1];return X==="#875f00"?G[0]:G[1]}function A16({status:X}){if(X==="pending")return TY(Ka5,{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(IU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(IU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,Ua5-U);return sQ(IU,{flexDirection:"row",children:[$.map((N,z)=>{let O=Na5(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",gN0.version]})]}):sQ(IU,{flexDirection:"column",marginTop:1,children:[Ha5.map(($,K)=>TY(RX,{color:Fa5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",gN0.version]})]}),TY(IU,{marginBottom:1,children:TY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),TY(IU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(IU,{gap:2,children:[X.map(($)=>sQ(IU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),TY(A16,{status:$.status})]},$.name)),sQ(IU,{gap:1,children:[TY(RX,{children:"Migrations"}),TY(A16,{status:Y})]})]}),TY(IU,{children:Q?sQ(RX,{children:["Open in browser: ",TY(RX,{color:"cyan",children:Q})]}):TY(RX,{dimColor:!0,children:"Starting..."})}),sQ(IU,{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 Ha5,Fa5,uN0,Ua5=30,Ba5;var I16=w(()=>{P16();It1();kt1();Ha5=[" \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 "],Fa5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],uN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],Ba5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as za5}from"react";function Oa5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==rA1.rows||Y!==rA1.columns)rA1={rows:X,columns:Y};return rA1}function Da5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function V16(){return za5(Da5,Oa5)}var rA1;var j16=w(()=>{rA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as wa5,Text as bX1}from"ink";import{useSyncExternalStore as La5}from"react";import{jsx as lN0,jsxs as mN0}from"react/jsx-runtime";function Ea5(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}=La5(CX1,kX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return lN0(wa5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return lN0(bX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return mN0(bX1,{children:[mN0(bX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),lN0(bX1,{color:Ea5(Z.status),children:Z.status}),mN0(bX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var R16=w(()=>{$z();j16()});var dN0={};T0(dN0,{App:()=>ja5});import{Box as Pa5,Text as qa5,useInput as Aa5}from"ink";import{useSyncExternalStore as Ta5}from"react";import{jsx as oA1,jsxs as Ma5}from"react/jsx-runtime";function ja5({home:X}){let Y=Ta5(CX1,kX1);return Aa5((G)=>{if(G==="k"||G==="K")CN0();if(G==="l"||G==="L")vN0();if((G==="v"||G==="V")&&Y.dataDir)ft1(Y.dataDir),_N0();if((G==="n"||G==="N")&&Y.vibe)_t1()}),Ma5(Pa5,{flexDirection:"column",children:[oA1(T16,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?oA1(L16,{env:Y.env}):oA1(qa5,{dimColor:!0,children:"Loading configuration..."}):oA1(M16,{logs:Y.logs,headerHeight:Y.vibe?Va5:Ia5})]})}var Ia5=15,Va5=19;var cN0=w(()=>{E16();I16();R16();$z();fd()});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 yj=k((_a5)=>{_a5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(_a5.HttpAuthLocation||(_a5.HttpAuthLocation={}));_a5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(_a5.HttpApiKeyAuthLocation||(_a5.HttpApiKeyAuthLocation={}));_a5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(_a5.EndpointURLScheme||(_a5.EndpointURLScheme={}));_a5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(_a5.AlgorithmId||(_a5.AlgorithmId={}));var Ra5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>_a5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>_a5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},Sa5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},ka5=(X)=>{return Ra5(X)},Ca5=(X)=>{return Sa5(X)};_a5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(_a5.FieldPosition||(_a5.FieldPosition={}));var va5="__smithy_context";_a5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(_a5.IniSectionType||(_a5.IniSectionType={}));_a5.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"})(_a5.RequestHandlerProtocol||(_a5.RequestHandlerProtocol={}));_a5.SMITHY_CONTEXT_KEY=va5;_a5.getDefaultClientConfiguration=ka5;_a5.resolveDefaultRuntimeConfig=Ca5});var u7=k((ma5)=>{var xa5=yj(),ha5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},ga5=(X)=>{return{httpHandler:X.httpHandler()}};class k16{name;kind;values;constructor({name:X,kind:Y=xa5.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 sA1{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 sA1({...X,headers:{...X.headers}});if(Y.query)Y.query=ua5(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 sA1.clone(this)}}function ua5(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 la5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}ma5.Field=k16;ma5.Fields=C16;ma5.HttpRequest=sA1;ma5.HttpResponse=v16;ma5.getHttpHandlerExtensionConfiguration=ha5;ma5.isValidHostname=la5;ma5.resolveHttpHandlerRuntimeConfig=ga5});function ra5(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,oa5,f16=(X)=>({applyToStack:(Y)=>{Y.add(ra5(X),oa5)}});var b16=w(()=>{_16=X1(u7(),1);oa5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,eA1,xj,XT1,E9,y16,xX1;var LH=w(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},eA1=wH.WHEN_SUPPORTED,xj={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},XT1=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={}));xX1=E9.CRC32});var kq,Ga=(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 oN0=w(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(kq||(kq={}))});var sa5="AWS_REQUEST_CHECKSUM_CALCULATION",ea5="request_checksum_calculation",x16;var h16=w(()=>{LH();oN0();x16={environmentVariableSelector:(X)=>Ga(X,sa5,wH,kq.ENV),configFileSelector:(X)=>Ga(X,ea5,wH,kq.CONFIG),default:eA1}});var Xr5="AWS_RESPONSE_CHECKSUM_VALIDATION",Yr5="response_checksum_validation",g16;var u16=w(()=>{LH();oN0();g16={environmentVariableSelector:(X)=>Ga(X,Xr5,xj,kq.ENV),configFileSelector:(X)=>Ga(X,Yr5,xj,kq.CONFIG),default:XT1}});var eN0=k((Ur5)=>{var Gr5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Qr5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jr5=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zr5=[500,502,503,504],Wr5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$r5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l16=(X)=>X?.$retryable!==void 0,Kr5=(X)=>Gr5.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)},Hr5=(X)=>X.$metadata?.httpStatusCode===429||Qr5.includes(X.name)||X.$retryable?.throttling==!0,sN0=(X,Y=0)=>l16(X)||m16(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Jr5.includes(X.name)||Wr5.includes(X?.code||"")||$r5.includes(X?.code||"")||Zr5.includes(X.$metadata?.httpStatusCode||0)||d16(X)||c16(X)||X.cause!==void 0&&Y<=10&&sN0(X.cause,Y+1),Fr5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!sN0(X))return!0;return!1}return!1};function c16(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}Ur5.isBrowserNetworkError=d16;Ur5.isClockSkewCorrectedError=m16;Ur5.isClockSkewError=Kr5;Ur5.isNodeJsHttp2TransientError=c16;Ur5.isRetryableByTrait=l16;Ur5.isServerError=Fr5;Ur5.isThrottlingError=Hr5;Ur5.isTransientError=sN0});var Dw=k((Rr5)=>{var Pr5=eN0();Rr5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(Rr5.RETRY_MODES||(Rr5.RETRY_MODES={}));var GT1=3,qr5=Rr5.RETRY_MODES.STANDARD;class QT1{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"||Pr5.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)=>QT1.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 Ar5=100,Gz0=20000,Tr5=500,Xz0=500,Ir5=5,Vr5=10,i16=1,jr5="amz-sdk-invocation-id",Mr5="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,Gz0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class Yz0{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(Gz0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var YT1={incompatible:1,attempts:2,capacity:3};class hX1{mode=Rr5.RETRY_MODES.STANDARD;capacity=Xz0;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()=>GT1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new p16}async acquireInitialRetryToken(X){return new Yz0(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===YT1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new Yz0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(Xz0,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 ${GT1}`),GT1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:YT1.incompatible,W=Q<G?0:YT1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:YT1.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=Rr5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new QT1,this.standardRetryStrategy=Y?new hX1({maxAttempts:typeof X==="number"?X:3,...Y}):new hX1(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 hX1{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}}Rr5.AdaptiveRetryStrategy=n16;Rr5.ConfiguredRetryStrategy=t16;Rr5.DEFAULT_MAX_ATTEMPTS=GT1;Rr5.DEFAULT_RETRY_DELAY_BASE=Ar5;Rr5.DEFAULT_RETRY_MODE=qr5;Rr5.DefaultRateLimiter=QT1;Rr5.INITIAL_RETRY_TOKENS=Xz0;Rr5.INVOCATION_ID_HEADER=jr5;Rr5.MAXIMUM_RETRY_DELAY=Gz0;Rr5.NO_RETRY_INCREMENT=i16;Rr5.REQUEST_HEADER=Mr5;Rr5.RETRY_COST=Ir5;Rr5.Retry=eQ;Rr5.StandardRetryStrategy=hX1;Rr5.THROTTLING_RETRY_DELAY_BASE=Tr5;Rr5.TIMEOUT_RETRY_COST=Vr5});var WX=k((er5)=>{var ir5=Dw(),Qz0={warningEmitted:!1},pr5=(X)=>{if(X&&!Qz0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)Qz0.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;Wz({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)Wz({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function Ga5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await tA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await cA1({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)Ya({name:z.name,status:"ready",port:z.port});fX1(W),vX1();let K=Ya5(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}`;_X1(B),Ya({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (u$1(),g$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var yN0=w(()=>{SN0();$z();fN0()});import{Box as xN0,Text as hN0}from"ink";import{jsx as w16,jsxs as aA1}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 Za5(X,Y){if(Qa5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Ja5.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 Wa5(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_SSO_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_SSO_GOOGLE_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=Wa5(X);return w16(xN0,{flexDirection:"column",children:Y.map((G)=>aA1(xN0,{flexDirection:"column",marginTop:1,children:[aA1(hN0,{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=Za5(Q,J);return aA1(xN0,{children:[aA1(hN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),w16(hN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Qa5,Ja5;var E16=w(()=>{Qa5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Ja5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var gN0;var P16=w(()=>{gN0={name:"decocms",version:"2.310.6",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 IU,Text as RX}from"ink";import{Spinner as Ka5}from"@inkjs/ui";import{useSyncExternalStore as q16}from"react";import{jsx as TY,jsxs as sQ}from"react/jsx-runtime";function Na5(X,Y){if(!X||!Ba5.has(X))return X;let G=uN0[Y]??uN0[uN0.length-1];return X==="#875f00"?G[0]:G[1]}function A16({status:X}){if(X==="pending")return TY(Ka5,{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(IU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(IU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,Ua5-U);return sQ(IU,{flexDirection:"row",children:[$.map((N,z)=>{let O=Na5(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",gN0.version]})]}):sQ(IU,{flexDirection:"column",marginTop:1,children:[Ha5.map(($,K)=>TY(RX,{color:Fa5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",gN0.version]})]}),TY(IU,{marginBottom:1,children:TY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),TY(IU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(IU,{gap:2,children:[X.map(($)=>sQ(IU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),TY(A16,{status:$.status})]},$.name)),sQ(IU,{gap:1,children:[TY(RX,{children:"Migrations"}),TY(A16,{status:Y})]})]}),TY(IU,{children:Q?sQ(RX,{children:["Open in browser: ",TY(RX,{color:"cyan",children:Q})]}):TY(RX,{dimColor:!0,children:"Starting..."})}),sQ(IU,{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 Ha5,Fa5,uN0,Ua5=30,Ba5;var I16=w(()=>{P16();It1();kt1();Ha5=[" \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 "],Fa5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],uN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],Ba5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as za5}from"react";function Oa5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==rA1.rows||Y!==rA1.columns)rA1={rows:X,columns:Y};return rA1}function Da5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function V16(){return za5(Da5,Oa5)}var rA1;var j16=w(()=>{rA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as wa5,Text as bX1}from"ink";import{useSyncExternalStore as La5}from"react";import{jsx as lN0,jsxs as mN0}from"react/jsx-runtime";function Ea5(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}=La5(CX1,kX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return lN0(wa5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return lN0(bX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return mN0(bX1,{children:[mN0(bX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),lN0(bX1,{color:Ea5(Z.status),children:Z.status}),mN0(bX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var R16=w(()=>{$z();j16()});var dN0={};T0(dN0,{App:()=>ja5});import{Box as Pa5,Text as qa5,useInput as Aa5}from"ink";import{useSyncExternalStore as Ta5}from"react";import{jsx as oA1,jsxs as Ma5}from"react/jsx-runtime";function ja5({home:X}){let Y=Ta5(CX1,kX1);return Aa5((G)=>{if(G==="k"||G==="K")CN0();if(G==="l"||G==="L")vN0();if((G==="v"||G==="V")&&Y.dataDir)ft1(Y.dataDir),_N0();if((G==="n"||G==="N")&&Y.vibe)_t1()}),Ma5(Pa5,{flexDirection:"column",children:[oA1(T16,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?oA1(L16,{env:Y.env}):oA1(qa5,{dimColor:!0,children:"Loading configuration..."}):oA1(M16,{logs:Y.logs,headerHeight:Y.vibe?Va5:Ia5})]})}var Ia5=15,Va5=19;var cN0=w(()=>{E16();I16();R16();$z();fd()});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 yj=k((_a5)=>{_a5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(_a5.HttpAuthLocation||(_a5.HttpAuthLocation={}));_a5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(_a5.HttpApiKeyAuthLocation||(_a5.HttpApiKeyAuthLocation={}));_a5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(_a5.EndpointURLScheme||(_a5.EndpointURLScheme={}));_a5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(_a5.AlgorithmId||(_a5.AlgorithmId={}));var Ra5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>_a5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>_a5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},Sa5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},ka5=(X)=>{return Ra5(X)},Ca5=(X)=>{return Sa5(X)};_a5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(_a5.FieldPosition||(_a5.FieldPosition={}));var va5="__smithy_context";_a5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(_a5.IniSectionType||(_a5.IniSectionType={}));_a5.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"})(_a5.RequestHandlerProtocol||(_a5.RequestHandlerProtocol={}));_a5.SMITHY_CONTEXT_KEY=va5;_a5.getDefaultClientConfiguration=ka5;_a5.resolveDefaultRuntimeConfig=Ca5});var u7=k((ma5)=>{var xa5=yj(),ha5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},ga5=(X)=>{return{httpHandler:X.httpHandler()}};class k16{name;kind;values;constructor({name:X,kind:Y=xa5.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 sA1{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 sA1({...X,headers:{...X.headers}});if(Y.query)Y.query=ua5(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 sA1.clone(this)}}function ua5(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 la5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}ma5.Field=k16;ma5.Fields=C16;ma5.HttpRequest=sA1;ma5.HttpResponse=v16;ma5.getHttpHandlerExtensionConfiguration=ha5;ma5.isValidHostname=la5;ma5.resolveHttpHandlerRuntimeConfig=ga5});function ra5(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,oa5,f16=(X)=>({applyToStack:(Y)=>{Y.add(ra5(X),oa5)}});var b16=w(()=>{_16=X1(u7(),1);oa5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,eA1,xj,XT1,E9,y16,xX1;var LH=w(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},eA1=wH.WHEN_SUPPORTED,xj={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},XT1=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={}));xX1=E9.CRC32});var kq,Ga=(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 oN0=w(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(kq||(kq={}))});var sa5="AWS_REQUEST_CHECKSUM_CALCULATION",ea5="request_checksum_calculation",x16;var h16=w(()=>{LH();oN0();x16={environmentVariableSelector:(X)=>Ga(X,sa5,wH,kq.ENV),configFileSelector:(X)=>Ga(X,ea5,wH,kq.CONFIG),default:eA1}});var Xr5="AWS_RESPONSE_CHECKSUM_VALIDATION",Yr5="response_checksum_validation",g16;var u16=w(()=>{LH();oN0();g16={environmentVariableSelector:(X)=>Ga(X,Xr5,xj,kq.ENV),configFileSelector:(X)=>Ga(X,Yr5,xj,kq.CONFIG),default:XT1}});var eN0=k((Ur5)=>{var Gr5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Qr5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jr5=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zr5=[500,502,503,504],Wr5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$r5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l16=(X)=>X?.$retryable!==void 0,Kr5=(X)=>Gr5.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)},Hr5=(X)=>X.$metadata?.httpStatusCode===429||Qr5.includes(X.name)||X.$retryable?.throttling==!0,sN0=(X,Y=0)=>l16(X)||m16(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Jr5.includes(X.name)||Wr5.includes(X?.code||"")||$r5.includes(X?.code||"")||Zr5.includes(X.$metadata?.httpStatusCode||0)||d16(X)||c16(X)||X.cause!==void 0&&Y<=10&&sN0(X.cause,Y+1),Fr5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!sN0(X))return!0;return!1}return!1};function c16(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}Ur5.isBrowserNetworkError=d16;Ur5.isClockSkewCorrectedError=m16;Ur5.isClockSkewError=Kr5;Ur5.isNodeJsHttp2TransientError=c16;Ur5.isRetryableByTrait=l16;Ur5.isServerError=Fr5;Ur5.isThrottlingError=Hr5;Ur5.isTransientError=sN0});var Dw=k((Rr5)=>{var Pr5=eN0();Rr5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(Rr5.RETRY_MODES||(Rr5.RETRY_MODES={}));var GT1=3,qr5=Rr5.RETRY_MODES.STANDARD;class QT1{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"||Pr5.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)=>QT1.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 Ar5=100,Gz0=20000,Tr5=500,Xz0=500,Ir5=5,Vr5=10,i16=1,jr5="amz-sdk-invocation-id",Mr5="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,Gz0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class Yz0{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(Gz0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var YT1={incompatible:1,attempts:2,capacity:3};class hX1{mode=Rr5.RETRY_MODES.STANDARD;capacity=Xz0;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()=>GT1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new p16}async acquireInitialRetryToken(X){return new Yz0(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===YT1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new Yz0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(Xz0,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 ${GT1}`),GT1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:YT1.incompatible,W=Q<G?0:YT1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:YT1.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=Rr5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new QT1,this.standardRetryStrategy=Y?new hX1({maxAttempts:typeof X==="number"?X:3,...Y}):new hX1(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 hX1{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}}Rr5.AdaptiveRetryStrategy=n16;Rr5.ConfiguredRetryStrategy=t16;Rr5.DEFAULT_MAX_ATTEMPTS=GT1;Rr5.DEFAULT_RETRY_DELAY_BASE=Ar5;Rr5.DEFAULT_RETRY_MODE=qr5;Rr5.DefaultRateLimiter=QT1;Rr5.INITIAL_RETRY_TOKENS=Xz0;Rr5.INVOCATION_ID_HEADER=jr5;Rr5.MAXIMUM_RETRY_DELAY=Gz0;Rr5.NO_RETRY_INCREMENT=i16;Rr5.REQUEST_HEADER=Mr5;Rr5.RETRY_COST=Ir5;Rr5.Retry=eQ;Rr5.StandardRetryStrategy=hX1;Rr5.THROTTLING_RETRY_DELAY_BASE=Tr5;Rr5.TIMEOUT_RETRY_COST=Vr5});var WX=k((er5)=>{var ir5=Dw(),Qz0={warningEmitted:!1},pr5=(X)=>{if(X&&!Qz0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)Qz0.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
@@ -6021,6 +6021,45 @@ function runStep(cmd, deps) {
6021
6021
  \`);
6022
6022
  return spawnSetupStep(cmd, deps.onChunk, deps.dropPrivileges);
6023
6023
  }
6024
+ var TRANSIENT_ERRORS = [
6025
+ "Could not resolve host",
6026
+ "early EOF",
6027
+ "unexpected disconnect",
6028
+ "Connection reset by peer",
6029
+ "Connection timed out"
6030
+ ];
6031
+ var CLONE_MAX_RETRIES = 3;
6032
+ var CLONE_RETRY_DELAY_MS = 3000;
6033
+ function isTransient(output) {
6034
+ return TRANSIENT_ERRORS.some((e) => output.includes(e));
6035
+ }
6036
+ function sleep(ms) {
6037
+ return new Promise((resolve) => setTimeout(resolve, ms));
6038
+ }
6039
+ async function runNetworkStep(cmd, deps) {
6040
+ for (let attempt = 0;attempt <= CLONE_MAX_RETRIES; attempt++) {
6041
+ if (attempt > 0) {
6042
+ deps.onChunk("setup", \`\\r
6043
+ [clone] transient network error, retrying in \${CLONE_RETRY_DELAY_MS / 1000}s (attempt \${attempt + 1}/\${CLONE_MAX_RETRIES + 1})...\\r
6044
+ \`);
6045
+ await sleep(CLONE_RETRY_DELAY_MS);
6046
+ }
6047
+ let output = "";
6048
+ const tee = {
6049
+ ...deps,
6050
+ onChunk: (src, data) => {
6051
+ output += data;
6052
+ deps.onChunk(src, data);
6053
+ }
6054
+ };
6055
+ const code = await runStep(cmd, tee);
6056
+ if (code === 0)
6057
+ return 0;
6058
+ if (!isTransient(output) || attempt >= CLONE_MAX_RETRIES)
6059
+ return code;
6060
+ }
6061
+ return 1;
6062
+ }
6024
6063
  async function spawnClone(deps) {
6025
6064
  const { config } = deps;
6026
6065
  const cloneUrl = config.git?.repository?.cloneUrl;
@@ -6036,20 +6075,21 @@ async function spawnClone(deps) {
6036
6075
  const gc = \`git -c safe.directory='*' -c credential.helper=\`;
6037
6076
  const dir = config.repoDir;
6038
6077
  if (isNonEmptyWithoutGit(dir)) {
6039
- const steps = [
6078
+ const localSteps = [
6040
6079
  \`\${gc} -C \${dir} init\`,
6041
- \`\${gc} -C \${dir} remote add origin \${cloneUrl}\`,
6042
- \`\${gc} -C \${dir} fetch --depth 1 origin HEAD\`,
6043
- \`\${gc} -C \${dir} checkout FETCH_HEAD\`
6080
+ \`\${gc} -C \${dir} remote add origin \${cloneUrl}\`
6044
6081
  ];
6045
- for (const step of steps) {
6082
+ for (const step of localSteps) {
6046
6083
  const code = await runStep(step, deps);
6047
6084
  if (code !== 0)
6048
6085
  return code;
6049
6086
  }
6050
- return 0;
6087
+ const fetchCode = await runNetworkStep(\`\${gc} -C \${dir} fetch --depth 1 origin HEAD\`, deps);
6088
+ if (fetchCode !== 0)
6089
+ return fetchCode;
6090
+ return runStep(\`\${gc} -C \${dir} checkout FETCH_HEAD\`, deps);
6051
6091
  }
6052
- return runStep(\`\${gc} clone --depth 1 \${cloneUrl} \${dir}\`, deps);
6092
+ return runNetworkStep(\`\${gc} clone --depth 1 \${cloneUrl} \${dir}\`, deps);
6053
6093
  }
6054
6094
 
6055
6095
  // daemon/setup/git.ts
@@ -0,0 +1,33 @@
1
+ export type Options = {
2
+ /**
3
+ Match only the first ANSI escape.
4
+
5
+ @default false
6
+ */
7
+ readonly onlyFirst: boolean;
8
+ };
9
+
10
+ /**
11
+ Regular expression for matching ANSI escape codes.
12
+
13
+ @example
14
+ ```
15
+ import ansiRegex from 'ansi-regex';
16
+
17
+ ansiRegex().test('\u001B[4mcake\u001B[0m');
18
+ //=> true
19
+
20
+ ansiRegex().test('cake');
21
+ //=> false
22
+
23
+ '\u001B[4mcake\u001B[0m'.match(ansiRegex());
24
+ //=> ['\u001B[4m', '\u001B[0m']
25
+
26
+ '\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
27
+ //=> ['\u001B[4m']
28
+
29
+ '\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
30
+ //=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
31
+ ```
32
+ */
33
+ export default function ansiRegex(options?: Options): RegExp;
@@ -0,0 +1,14 @@
1
+ export default function ansiRegex({onlyFirst = false} = {}) {
2
+ // Valid string terminator sequences are BEL, ESC\, and 0x9c
3
+ const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
4
+
5
+ // OSC sequences only: ESC ] ... ST (non-greedy until the first ST)
6
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
7
+
8
+ // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
9
+ const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]';
10
+
11
+ const pattern = `${osc}|${csi}`;
12
+
13
+ return new RegExp(pattern, onlyFirst ? undefined : 'g');
14
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "ansi-regex",
3
+ "version": "6.2.2",
4
+ "description": "Regular expression for matching ANSI escape codes",
5
+ "license": "MIT",
6
+ "repository": "chalk/ansi-regex",
7
+ "funding": "https://github.com/chalk/ansi-regex?sponsor=1",
8
+ "author": {
9
+ "name": "Sindre Sorhus",
10
+ "email": "sindresorhus@gmail.com",
11
+ "url": "https://sindresorhus.com"
12
+ },
13
+ "type": "module",
14
+ "exports": "./index.js",
15
+ "types": "./index.d.ts",
16
+ "sideEffects": false,
17
+ "engines": {
18
+ "node": ">=12"
19
+ },
20
+ "scripts": {
21
+ "test": "xo && ava && tsd",
22
+ "view-supported": "node fixtures/view-codes.js"
23
+ },
24
+ "files": [
25
+ "index.js",
26
+ "index.d.ts"
27
+ ],
28
+ "keywords": [
29
+ "ansi",
30
+ "styles",
31
+ "color",
32
+ "colour",
33
+ "colors",
34
+ "terminal",
35
+ "console",
36
+ "cli",
37
+ "string",
38
+ "tty",
39
+ "escape",
40
+ "formatting",
41
+ "rgb",
42
+ "256",
43
+ "shell",
44
+ "xterm",
45
+ "command-line",
46
+ "text",
47
+ "regex",
48
+ "regexp",
49
+ "re",
50
+ "match",
51
+ "test",
52
+ "find",
53
+ "pattern"
54
+ ],
55
+ "devDependencies": {
56
+ "ansi-escapes": "^5.0.0",
57
+ "ava": "^3.15.0",
58
+ "tsd": "^0.21.0",
59
+ "xo": "^0.54.2"
60
+ }
61
+ }
@@ -0,0 +1,66 @@
1
+ # ansi-regex
2
+
3
+ > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install ansi-regex
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import ansiRegex from 'ansi-regex';
15
+
16
+ ansiRegex().test('\u001B[4mcake\u001B[0m');
17
+ //=> true
18
+
19
+ ansiRegex().test('cake');
20
+ //=> false
21
+
22
+ '\u001B[4mcake\u001B[0m'.match(ansiRegex());
23
+ //=> ['\u001B[4m', '\u001B[0m']
24
+
25
+ '\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
26
+ //=> ['\u001B[4m']
27
+
28
+ '\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
29
+ //=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
30
+ ```
31
+
32
+ ## API
33
+
34
+ ### ansiRegex(options?)
35
+
36
+ Returns a regex for matching ANSI escape codes.
37
+
38
+ #### options
39
+
40
+ Type: `object`
41
+
42
+ ##### onlyFirst
43
+
44
+ Type: `boolean`\
45
+ Default: `false` *(Matches any ANSI escape codes in a string)*
46
+
47
+ Match only the first ANSI escape.
48
+
49
+ ## Important
50
+
51
+ If you run the regex against untrusted user input in a server context, you should [give it a timeout](https://github.com/sindresorhus/super-regex).
52
+
53
+ **I do not consider [ReDoS](https://blog.yossarian.net/2022/12/28/ReDoS-vulnerabilities-and-misaligned-incentives) a valid vulnerability for this package.**
54
+
55
+ ## FAQ
56
+
57
+ ### Why do you test for codes not in the ECMA 48 standard?
58
+
59
+ Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
60
+
61
+ On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
62
+
63
+ ## Maintainers
64
+
65
+ - [Sindre Sorhus](https://github.com/sindresorhus)
66
+ - [Josh Junon](https://github.com/qix-)
@@ -0,0 +1,20 @@
1
+ Copyright Mathias Bynens <https://mathiasbynens.be/>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.