decocms 2.310.3 → 2.310.5

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 (228) hide show
  1. package/dist/client/assets/{AlertCircle-B72APkrz.js → AlertCircle-Cxcba8DN.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-Dz0P9WNF.js → ArrowNarrowLeft-CtUMVsB_.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-CCQZEQ7k.js → ArrowUpRight-ZaII7u8u.js} +1 -1
  4. package/dist/client/assets/{Check-CUpq9BBu.js → Check-BStFjKto.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-DTCxFilU.js → CheckCircle-CkSmS6Cg.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-D5WF5tyi.js → ChevronDown-CJ0icK2r.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-DwbV0YDZ.js → ChevronRight-Dw3Db6I0.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-CDMPc0ql.js → ChevronUp-BDsNPBis.js} +1 -1
  9. package/dist/client/assets/{Container-BioZd28q.js → Container-WBb7qbdD.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-D8wcDPCU.js → DotsVertical-BPk38qYQ.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-CKpEz_fF.js → LinkExternal01-6x3Iy4Gd.js} +1 -1
  12. package/dist/client/assets/{Lock01-CHfwR6Qi.js → Lock01-DA0MuRwj.js} +1 -1
  13. package/dist/client/assets/{Palette-brLBiHpP.js → Palette-DfzN4-9K.js} +1 -1
  14. package/dist/client/assets/{Play-DRCdZRLW.js → Play-QsP1MGXe.js} +1 -1
  15. package/dist/client/assets/{Plus-DNkjVBwq.js → Plus-QZEpDFDV.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-CdP9yH0w.js → RefreshCcw01-DKtPikGx.js} +1 -1
  17. package/dist/client/assets/{SearchMd-JqX1mLMq.js → SearchMd-BHubyM0S.js} +1 -1
  18. package/dist/client/assets/{Settings02-D1Jfvo1d.js → Settings02-DpkRLLNd.js} +1 -1
  19. package/dist/client/assets/{Shield01-D5fQpAyA.js → Shield01-BvsHGINb.js} +1 -1
  20. package/dist/client/assets/{Star01-Y834gtsL.js → Star01-DduN7cUl.js} +1 -1
  21. package/dist/client/assets/{Sun-BgOSswUu.js → Sun-k7d5io6k.js} +1 -1
  22. package/dist/client/assets/{Tool01-CXQZ3p7Z.js → Tool01-BPmEF3oC.js} +1 -1
  23. package/dist/client/assets/{Trash01-B8-uqWxa.js → Trash01-DhkmMJFO.js} +1 -1
  24. package/dist/client/assets/{User01-Cxb6YtJq.js → User01-76gT3tOW.js} +1 -1
  25. package/dist/client/assets/{Users03-CXkopkPu.js → Users03-DDHNU2o0.js} +1 -1
  26. package/dist/client/assets/{X-CdXDgTcN.js → X-C_O1kj8t.js} +1 -1
  27. package/dist/client/assets/{XCircle-CjR4LC4r.js → XCircle-D9VV2CKm.js} +1 -1
  28. package/dist/client/assets/{XClose-zqTFiPq2.js → XClose-C21czImH.js} +1 -1
  29. package/dist/client/assets/{Zap--FKeiDFf.js → Zap-TR29R2LK.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-CliIuzcs.js → ZapSquare-OxHp4t0m.js} +1 -1
  31. package/dist/client/assets/{accordion-BBKL1fM-.js → accordion-CTsJVvtX.js} +1 -1
  32. package/dist/client/assets/{agent-icon-CaG-DX2m.js → agent-icon-s17W0wUB.js} +1 -1
  33. package/dist/client/assets/{agents-list-BUqQO9y3.js → agents-list-VvrcV5iJ.js} +1 -1
  34. package/dist/client/assets/ai-providers-CW7mNid6.js +1 -0
  35. package/dist/client/assets/{alert-dialog-B-P8jHly.js → alert-dialog-CmK4A6kC.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-CyIMPFaS.js → auth-catchall-8ZQwpXp5.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-Qk3UXtKg.js → automation-list-row-BCSS4QUj.js} +1 -1
  38. package/dist/client/assets/{automations-CkkIdwK3.js → automations-DeCusdy6.js} +1 -1
  39. package/dist/client/assets/{avatar-CYyuZ3vB.js → avatar-CSILDiJX.js} +1 -1
  40. package/dist/client/assets/{badge-C-R5WeFR.js → badge-COxphYel.js} +1 -1
  41. package/dist/client/assets/brand-context-CWfr5DVG.js +1 -0
  42. package/dist/client/assets/{card-BWjsP1pO.js → card-CBJhlNRB.js} +1 -1
  43. package/dist/client/assets/{chat-context-D7DJNKEQ.js → chat-context-De5Jlj4X.js} +1 -1
  44. package/dist/client/assets/{checkbox-DRyB8BVf.js → checkbox-DjVRr70r.js} +1 -1
  45. package/dist/client/assets/{collection-detail-BiG3-7wS.js → collection-detail-DpmRlPMa.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-D0yyhe94.js → collection-display-button-BbDt8MHw.js} +1 -1
  47. package/dist/client/assets/{collection-search-CVa4reVh.js → collection-search-CfovRENW.js} +1 -1
  48. package/dist/client/assets/{collection-search-BtC9EgTH.js → collection-search-Qnmn9Jjl.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-C2Zi2ikn.js → collection-table-wrapper-CnIJP88L.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-8bicuWoG.js → collection-tabs-BJ2mAaff.js} +1 -1
  51. package/dist/client/assets/{collections-ZqRHYd6U.js → collections-BNKaenRk.js} +1 -1
  52. package/dist/client/assets/{command-BUJHwA-d.js → command-DPlcxMzI.js} +1 -1
  53. package/dist/client/assets/{connection-card-CiNzXirJ.js → connection-card-CuHLr6qd.js} +1 -1
  54. package/dist/client/assets/{connection-detail-DQFCqOq5.js → connection-detail-b2gPCepr.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-BFnOvbFy.js → connection-form-helpers-CAZC18NZ.js} +1 -1
  56. package/dist/client/assets/{connections-BzqA2cUL.js → connections-BQvZQo8B.js} +1 -1
  57. package/dist/client/assets/{constants-Df56C9B1.js → constants-BKat4sJw.js} +1 -1
  58. package/dist/client/assets/{constants-BmLTAQzq.js → constants-B_3LNOq3.js} +1 -1
  59. package/dist/client/assets/{dialog-HqMwvS0c.js → dialog-DxHqBK-g.js} +1 -1
  60. package/dist/client/assets/{domain-settings-8zUtZk7o.js → domain-settings-Dj6mogBD.js} +1 -1
  61. package/dist/client/assets/{drawer-hkToOxOG.js → drawer-CPYawKkb.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-CD1YJIi0.js → dropdown-menu-Do_6-JC4.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout--sGvQXk2.js → dynamic-plugin-layout-CGObbc--.js} +1 -1
  64. package/dist/client/assets/{empty-state-B29HN9Vl.js → empty-state-Bmp0M8wH.js} +1 -1
  65. package/dist/client/assets/{empty-state-CElAqeAn.js → empty-state-DDT6Axd2.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-DYXiFLZH.js → extract-connection-data-ooIvzjyZ.js} +1 -1
  67. package/dist/client/assets/{features-Dvru3uGD.js → features-Ck3YVx8z.js} +1 -1
  68. package/dist/client/assets/{form-CKajJk24.js → form-BV__Eo4v.js} +1 -1
  69. package/dist/client/assets/general-J5FLwmfS.js +1 -0
  70. package/dist/client/assets/{index--52kuhAD.js → index-BKcT0ut5.js} +1 -1
  71. package/dist/client/assets/{index-CnR4TnGO.js → index-BZ3dhBMg.js} +1 -1
  72. package/dist/client/assets/{index-CgQG3OxM.js → index-Baly1FX_.js} +1 -1
  73. package/dist/client/assets/{index-k8njt3_A.js → index-BjqwKAPh.js} +2 -2
  74. package/dist/client/assets/{index-Boo37gVZ.js → index-BrMQgHVf.js} +1 -1
  75. package/dist/client/assets/{index-CHpjwsZ-.js → index-CFiXkeYB.js} +1 -1
  76. package/dist/client/assets/{index-Y4klGMPr.js → index-CKPYZoPD.js} +1 -1
  77. package/dist/client/assets/{index-D7rGFiVq.js → index-CQAZn3EK.js} +1 -1
  78. package/dist/client/assets/{index-CMbhqARA.js → index-CjZClkan.js} +1 -1
  79. package/dist/client/assets/{index-ClxNnAsp.js → index-CkXbIQAg.js} +1 -1
  80. package/dist/client/assets/{index-CO402MfB.js → index-D075V-Aw.js} +1 -1
  81. package/dist/client/assets/{index-DVk4aJ0j.js → index-D9tByeUz.js} +1 -1
  82. package/dist/client/assets/index-DJnCb9MX.js +182 -0
  83. package/dist/client/assets/{index-BPgW_PVH.js → index-DO6HBQ4K.js} +1 -1
  84. package/dist/client/assets/{index-D9-ppQFz.js → index-Dt0vRnUx.js} +1 -1
  85. package/dist/client/assets/index-DxiAr3ci.js +1 -0
  86. package/dist/client/assets/{infiniteQueryObserver-IG8f9wWg.js → infiniteQueryObserver-BOOXGQo2.js} +1 -1
  87. package/dist/client/assets/{input-DrFzs1Yw.js → input-BY95D9hS.js} +1 -1
  88. package/dist/client/assets/{integration-icon-DUMCOZJc.js → integration-icon-BTq6hO7n.js} +1 -1
  89. package/dist/client/assets/{label-0J4Z8Ji8.js → label-Z9ad9sg6.js} +1 -1
  90. package/dist/client/assets/{layout-zbF9c9kI.js → layout-D9TsRZCx.js} +1 -1
  91. package/dist/client/assets/lean-canvas-recruit-modal-OmMNmndT.js +139 -0
  92. package/dist/client/assets/{login-m1plet6k.js → login-C9jgvn5K.js} +1 -1
  93. package/dist/client/assets/{members-DsVQeYYP.js → members-CBmW6KwZ.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-Br1M5lwR.js → monaco-editor-UyxFxpQH.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-BtBHpMXc.js → monitoring-stats-row-DdON8HAn.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-D6DOFeyW.js → oauth-callback-D7SVJIig.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-wUhwntlH.js → oauth-callback-ai-provider-D_zvQ6_C.js} +1 -1
  98. package/dist/client/assets/{onboarding-dml5YruP.js → onboarding-0k8ZSX_k.js} +1 -1
  99. package/dist/client/assets/{org-layout-QSP-N9k0.js → org-layout-D_IQBqiz.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-ZONr0rlX.js → org-plugin-layout-CSiRNaTu.js} +1 -1
  101. package/dist/client/assets/{pair-mf97TAS_.js → pair-DxZ7l3-Z.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-CFxEUNdF.js → plugin-empty-state-Dp1Lzm8V.js} +1 -1
  103. package/dist/client/assets/{plugin-header-HXnwUdYS.js → plugin-header-9vDTFdB9.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-ZwMLw5wK.js → plugin-layout-3ykxXUjf.js} +1 -1
  105. package/dist/client/assets/{popover-DUMNq33j.js → popover-Zakke__8.js} +1 -1
  106. package/dist/client/assets/profile-9LB06cBx.js +1 -0
  107. package/dist/client/assets/{project-app-view-Di4yF5Oz.js → project-app-view-CqdnMjZ0.js} +1 -1
  108. package/dist/client/assets/registry-DqBhBsD3.js +2 -0
  109. package/dist/client/assets/{registry-layout-B2U_9fgO.js → registry-layout-CJQb6Z8y.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-PH0-_blQ.js → required-auth-layout-BxrX3bDQ.js} +1 -1
  111. package/dist/client/assets/{reset-password-5ioWEbN5.js → reset-password-B5KLP3tu.js} +1 -1
  112. package/dist/client/assets/{roles-4ojRgHgc.js → roles-DGvkLiRr.js} +1 -1
  113. package/dist/client/assets/{scroll-area-D_tsHfC-.js → scroll-area-DkrmJo9D.js} +1 -1
  114. package/dist/client/assets/{search-input-Boj5tfQn.js → search-input-CdGp9qCd.js} +1 -1
  115. package/dist/client/assets/{select-B3lWwv9y.js → select-CR2tN9TX.js} +1 -1
  116. package/dist/client/assets/{select-model-C-fLwr4k.js → select-model-CQhnH5Rx.js} +1 -1
  117. package/dist/client/assets/{settings-layout-U-ZhWkRq.js → settings-layout-DHX6Eu2B.js} +1 -1
  118. package/dist/client/assets/{settings-section-qufbNRCL.js → settings-section-67sbTFXw.js} +1 -1
  119. package/dist/client/assets/{shell-layout-G8D-0WXl.js → shell-layout-CimuPmyV.js} +1 -1
  120. package/dist/client/assets/{skeleton-BfKJMKYc.js → skeleton-CS-2bSP9.js} +1 -1
  121. package/dist/client/assets/{sso-BdojNoX2.js → sso-Dr2zYrCj.js} +1 -1
  122. package/dist/client/assets/{store-DGVb_5C1.js → store-DpWEzwk_.js} +1 -1
  123. package/dist/client/assets/store-registry-CQpdN133.js +2 -0
  124. package/dist/client/assets/{switch-YLfAn92x.js → switch-zLHY6ITD.js} +1 -1
  125. package/dist/client/assets/{table-wHPRdxYv.js → table-CegXcKEa.js} +1 -1
  126. package/dist/client/assets/{tabs-8aX3BTo-.js → tabs-CJQTWD5_.js} +1 -1
  127. package/dist/client/assets/{task-status-CY3ltf_M.js → task-status-0vcjP9bK.js} +1 -1
  128. package/dist/client/assets/{textarea-BJZt5-vN.js → textarea-fydFuW_3.js} +1 -1
  129. package/dist/client/assets/{toggle-group-C_B32Tm8.js → toggle-group-7VcHOdQ-.js} +1 -1
  130. package/dist/client/assets/{tools-list-bxPeEc0p.js → tools-list-DqqciwCd.js} +1 -1
  131. package/dist/client/assets/{tooltip-B26xbtws.js → tooltip-D_AU3yF1.js} +1 -1
  132. package/dist/client/assets/{types-DfgXo_cD.js → types-Cnb1YG8h.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-CnyJW7s-.js → use-ai-providers-BJDLmjji.js} +1 -1
  134. package/dist/client/assets/{use-collections-D66SnH5Q.js → use-collections-Gut3G1oa.js} +1 -1
  135. package/dist/client/assets/{use-connection-9VrA1Bg7.js → use-connection-DPW4E_0G.js} +1 -1
  136. package/dist/client/assets/{use-copy-DpxSUjqd.js → use-copy-B4TaRnHv.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-DBfs4FWm.js → use-create-virtual-mcp-DIprfvzX.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-Ja8PcJv_.js → use-debounced-autosave-DHCyVVfx.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-DjAxcjIH.js → use-decopilot-events-Cbmf5tlg.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-7Blp6D0s.js → use-delete-connection-WVmPLIlj.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-IwyU_OvC.js → use-infinite-scroll-T0hVA3O9.js} +1 -1
  142. package/dist/client/assets/{use-list-state-Dk2QFrYd.js → use-list-state-DA3cifaL.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-C7yIpDHe.js → use-mcp-tools-iAx7skPl.js} +1 -1
  144. package/dist/client/assets/{use-members-Bg4ZFsu9.js → use-members-j0TSecaQ.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-BehsrrsA.js → use-navigate-to-agent-BCE8xoYG.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-mkgKwCAh.js → use-org-auth-client-Csj669Fw.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-Xv4QV2bL.js → use-org-sso-Cm8qhi19.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-BmH8DM7C.js → use-organization-roles-InflUxV2.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-Coi7Ggqq.js → use-organization-settings-sGFYoeez.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-_83vUYHS.js → use-registry-connections-CA8kz06E.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-DLYnzZvv.js → use-status-sounds-DM61lJPE.js} +1 -1
  152. package/dist/client/assets/{use-tasks-CUt44N_R.js → use-tasks-C2Vyiupf.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-CZXZPLm6.js → use-view-mode-BoUYdfcR.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-BlYQqAfZ.js → use-virtual-mcp-DER1r6QO.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-BjzmzsUJ.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-SvwkjZhj.js +1 -0
  157. package/dist/client/assets/{user-BFqIXUgg.js → user-Di0TXJ3H.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-BC7A6oBR.js → view-mode-toggle-DoU7eK15.js} +1 -1
  159. package/dist/client/assets/{workflow-B3ajRQIi.js → workflow-DkCqRbGa.js} +1 -1
  160. package/dist/client/assets/workflow-detail-CbEkNnBb.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +1 -1
  163. package/dist/server/node_modules/get-east-asian-width/index.d.ts +60 -0
  164. package/dist/server/node_modules/get-east-asian-width/index.js +30 -0
  165. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +18 -0
  166. package/dist/server/node_modules/get-east-asian-width/lookup.js +135 -0
  167. package/dist/server/node_modules/get-east-asian-width/package.json +71 -0
  168. package/dist/server/node_modules/get-east-asian-width/readme.md +65 -0
  169. package/dist/server/node_modules/get-east-asian-width/utilities.js +24 -0
  170. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  171. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  172. package/dist/server/node_modules/{is-fullwidth-code-point → mimic-fn}/license +1 -1
  173. package/dist/server/node_modules/{onetime → mimic-fn}/package.json +15 -16
  174. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  175. package/dist/server/node_modules/pg/LICENSE +21 -0
  176. package/dist/server/node_modules/pg/README.md +95 -0
  177. package/dist/server/node_modules/pg/esm/index.mjs +20 -0
  178. package/dist/server/node_modules/pg/lib/client.js +743 -0
  179. package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
  180. package/dist/server/node_modules/pg/lib/connection.js +221 -0
  181. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  182. package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
  183. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  184. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
  185. package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
  186. package/dist/server/node_modules/pg/lib/defaults.js +91 -0
  187. package/dist/server/node_modules/pg/lib/index.js +73 -0
  188. package/dist/server/node_modules/pg/lib/native/client.js +323 -0
  189. package/dist/server/node_modules/pg/lib/native/index.js +2 -0
  190. package/dist/server/node_modules/pg/lib/native/query.js +165 -0
  191. package/dist/server/node_modules/pg/lib/query.js +252 -0
  192. package/dist/server/node_modules/pg/lib/result.js +109 -0
  193. package/dist/server/node_modules/pg/lib/stream.js +83 -0
  194. package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
  195. package/dist/server/node_modules/pg/lib/utils.js +217 -0
  196. package/dist/server/node_modules/pg/package.json +76 -0
  197. package/package.json +1 -1
  198. package/dist/client/assets/ai-providers-BvV5AI1b.js +0 -1
  199. package/dist/client/assets/brand-context-BqPn2XVA.js +0 -1
  200. package/dist/client/assets/general-D8u2dVV2.js +0 -1
  201. package/dist/client/assets/index-BPbckF-i.js +0 -182
  202. package/dist/client/assets/index-BTded5vd.js +0 -1
  203. package/dist/client/assets/lean-canvas-recruit-modal-D2QgFiqW.js +0 -139
  204. package/dist/client/assets/profile-CyqjRQfg.js +0 -1
  205. package/dist/client/assets/registry-DgOCTdY8.js +0 -2
  206. package/dist/client/assets/store-registry-KlW3QwUJ.js +0 -2
  207. package/dist/client/assets/useInfiniteQuery-BJ1I2JSf.js +0 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-BpfkmtaB.js +0 -1
  209. package/dist/client/assets/workflow-detail-l83JU-Mp.js +0 -1
  210. package/dist/server/node_modules/ansi-regex/index.d.ts +0 -33
  211. package/dist/server/node_modules/ansi-regex/index.js +0 -14
  212. package/dist/server/node_modules/ansi-regex/package.json +0 -61
  213. package/dist/server/node_modules/ansi-regex/readme.md +0 -66
  214. package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  215. package/dist/server/node_modules/emoji-regex/README.md +0 -107
  216. package/dist/server/node_modules/emoji-regex/index.d.ts +0 -3
  217. package/dist/server/node_modules/emoji-regex/index.js +0 -4
  218. package/dist/server/node_modules/emoji-regex/index.mjs +0 -4
  219. package/dist/server/node_modules/emoji-regex/package.json +0 -45
  220. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  221. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  222. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  223. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  224. package/dist/server/node_modules/onetime/index.d.ts +0 -64
  225. package/dist/server/node_modules/onetime/index.js +0 -44
  226. package/dist/server/node_modules/onetime/license +0 -9
  227. package/dist/server/node_modules/onetime/readme.md +0 -94
  228. /package/dist/server/node_modules/{ansi-regex → get-east-asian-width}/license +0 -0
@@ -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.3",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.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
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
@@ -0,0 +1,60 @@
1
+ export type WidthType = 'fullwidth' | 'halfwidth' | 'wide' | 'narrow' | 'neutral' | 'ambiguous';
2
+
3
+ export type Options = {
4
+ /**
5
+ Whether to treat an `'ambiguous'` character as wide.
6
+
7
+ @default true
8
+
9
+ @example
10
+ ```
11
+ import {eastAsianWidth} from 'get-east-asian-width';
12
+
13
+ const codePoint = '⛣'.codePointAt(0);
14
+
15
+ console.log(eastAsianWidth(codePoint));
16
+ //=> 1
17
+
18
+ console.log(eastAsianWidth(codePoint, {ambiguousAsWide: true}));
19
+ //=> 2
20
+ ```
21
+
22
+ > Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). __If the context cannot be established reliably, they should be treated as narrow characters by default.__
23
+ > - http://www.unicode.org/reports/tr11/
24
+ */
25
+ readonly ambiguousAsWide?: boolean;
26
+ };
27
+
28
+ /**
29
+ Returns the width as a number for the given code point.
30
+
31
+ @param codePoint - A Unicode code point.
32
+
33
+ @example
34
+ ```
35
+ import {eastAsianWidth} from 'get-east-asian-width';
36
+
37
+ const codePoint = '字'.codePointAt(0);
38
+
39
+ console.log(eastAsianWidth(codePoint));
40
+ //=> 2
41
+ ```
42
+ */
43
+ export function eastAsianWidth(codePoint: number, options?: Options): 1 | 2;
44
+
45
+ /**
46
+ Returns the type of “East Asian Width” for the given code point.
47
+
48
+ @param codePoint - A Unicode code point.
49
+
50
+ @example
51
+ ```
52
+ import {eastAsianWidthType} from 'get-east-asian-width';
53
+
54
+ const codePoint = '字'.codePointAt(0);
55
+
56
+ console.log(eastAsianWidthType(codePoint));
57
+ //=> 'wide'
58
+ ```
59
+ */
60
+ export function eastAsianWidthType(codePoint: number): WidthType;
@@ -0,0 +1,30 @@
1
+ import {getCategory, isAmbiguous, isFullWidth, isWide} from './lookup.js';
2
+
3
+ function validate(codePoint) {
4
+ if (!Number.isSafeInteger(codePoint)) {
5
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
6
+ }
7
+ }
8
+
9
+ export function eastAsianWidthType(codePoint) {
10
+ validate(codePoint);
11
+
12
+ return getCategory(codePoint);
13
+ }
14
+
15
+ export function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
16
+ validate(codePoint);
17
+
18
+ if (
19
+ isFullWidth(codePoint)
20
+ || isWide(codePoint)
21
+ || (ambiguousAsWide && isAmbiguous(codePoint))
22
+ ) {
23
+ return 2;
24
+ }
25
+
26
+ return 1;
27
+ }
28
+
29
+ // Private exports for https://github.com/sindresorhus/is-fullwidth-code-point
30
+ export {isFullWidth as _isFullWidth, isWide as _isWide} from './lookup.js';
@@ -0,0 +1,18 @@
1
+ // Generated by scripts/build.js
2
+
3
+ // prettier-ignore
4
+ const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
5
+
6
+ // prettier-ignore
7
+ const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
8
+
9
+ // prettier-ignore
10
+ const halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
11
+
12
+ // prettier-ignore
13
+ const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
14
+
15
+ // prettier-ignore
16
+ const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
17
+
18
+ export {ambiguousRanges, fullwidthRanges, halfwidthRanges, narrowRanges, wideRanges};
@@ -0,0 +1,135 @@
1
+ import {
2
+ ambiguousRanges,
3
+ fullwidthRanges,
4
+ halfwidthRanges,
5
+ narrowRanges,
6
+ wideRanges,
7
+ } from './lookup-data.js';
8
+ import {isInRange} from './utilities.js';
9
+
10
+ const minimumAmbiguousCodePoint = ambiguousRanges[0];
11
+ const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
12
+ const minimumFullWidthCodePoint = fullwidthRanges[0];
13
+ const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
14
+ const minimumHalfWidthCodePoint = halfwidthRanges[0];
15
+ const maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
16
+ const minimumNarrowCodePoint = narrowRanges[0];
17
+ const maximumNarrowCodePoint = narrowRanges.at(-1);
18
+ const minimumWideCodePoint = wideRanges[0];
19
+ const maximumWideCodePoint = wideRanges.at(-1);
20
+
21
+ const commonCjkCodePoint = 0x4E_00;
22
+ const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
23
+
24
+ // Use a hot-path range so common `isWide` calls can skip binary search.
25
+ // The range containing U+4E00 covers common CJK ideographs;
26
+ // fallback to the largest range for resilience to Unicode table changes.
27
+ function findWideFastPathRange(ranges) {
28
+ let fastPathStart = ranges[0];
29
+ let fastPathEnd = ranges[1];
30
+
31
+ for (let index = 0; index < ranges.length; index += 2) {
32
+ const start = ranges[index];
33
+ const end = ranges[index + 1];
34
+
35
+ if (
36
+ commonCjkCodePoint >= start
37
+ && commonCjkCodePoint <= end
38
+ ) {
39
+ return [start, end];
40
+ }
41
+
42
+ if ((end - start) > (fastPathEnd - fastPathStart)) {
43
+ fastPathStart = start;
44
+ fastPathEnd = end;
45
+ }
46
+ }
47
+
48
+ return [fastPathStart, fastPathEnd];
49
+ }
50
+
51
+ export const isAmbiguous = codePoint => {
52
+ if (
53
+ codePoint < minimumAmbiguousCodePoint
54
+ || codePoint > maximumAmbiguousCodePoint
55
+ ) {
56
+ return false;
57
+ }
58
+
59
+ return isInRange(ambiguousRanges, codePoint);
60
+ };
61
+
62
+ export const isFullWidth = codePoint => {
63
+ if (
64
+ codePoint < minimumFullWidthCodePoint
65
+ || codePoint > maximumFullWidthCodePoint
66
+ ) {
67
+ return false;
68
+ }
69
+
70
+ return isInRange(fullwidthRanges, codePoint);
71
+ };
72
+
73
+ const isHalfWidth = codePoint => {
74
+ if (
75
+ codePoint < minimumHalfWidthCodePoint
76
+ || codePoint > maximumHalfWidthCodePoint
77
+ ) {
78
+ return false;
79
+ }
80
+
81
+ return isInRange(halfwidthRanges, codePoint);
82
+ };
83
+
84
+ const isNarrow = codePoint => {
85
+ if (
86
+ codePoint < minimumNarrowCodePoint
87
+ || codePoint > maximumNarrowCodePoint
88
+ ) {
89
+ return false;
90
+ }
91
+
92
+ return isInRange(narrowRanges, codePoint);
93
+ };
94
+
95
+ export const isWide = codePoint => {
96
+ if (
97
+ codePoint >= wideFastPathStart
98
+ && codePoint <= wideFastPathEnd
99
+ ) {
100
+ return true;
101
+ }
102
+
103
+ if (
104
+ codePoint < minimumWideCodePoint
105
+ || codePoint > maximumWideCodePoint
106
+ ) {
107
+ return false;
108
+ }
109
+
110
+ return isInRange(wideRanges, codePoint);
111
+ };
112
+
113
+ export function getCategory(codePoint) {
114
+ if (isAmbiguous(codePoint)) {
115
+ return 'ambiguous';
116
+ }
117
+
118
+ if (isFullWidth(codePoint)) {
119
+ return 'fullwidth';
120
+ }
121
+
122
+ if (isHalfWidth(codePoint)) {
123
+ return 'halfwidth';
124
+ }
125
+
126
+ if (isNarrow(codePoint)) {
127
+ return 'narrow';
128
+ }
129
+
130
+ if (isWide(codePoint)) {
131
+ return 'wide';
132
+ }
133
+
134
+ return 'neutral';
135
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "get-east-asian-width",
3
+ "version": "1.5.0",
4
+ "description": "Determine the East Asian Width of a Unicode character",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/get-east-asian-width",
7
+ "funding": "https://github.com/sponsors/sindresorhus",
8
+ "author": {
9
+ "name": "Sindre Sorhus",
10
+ "email": "sindresorhus@gmail.com",
11
+ "url": "https://sindresorhus.com"
12
+ },
13
+ "type": "module",
14
+ "exports": {
15
+ "types": "./index.d.ts",
16
+ "default": "./index.js"
17
+ },
18
+ "sideEffects": false,
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "scripts": {
23
+ "test": "xo && ava && tsc index.d.ts",
24
+ "build": "node scripts/build.js",
25
+ "prepublish": "npm run build"
26
+ },
27
+ "files": [
28
+ "index.js",
29
+ "index.d.ts",
30
+ "lookup.js",
31
+ "lookup-data.js",
32
+ "utilities.js"
33
+ ],
34
+ "keywords": [
35
+ "unicode",
36
+ "east-asian-width",
37
+ "eastasianwidth",
38
+ "character",
39
+ "string",
40
+ "width",
41
+ "text",
42
+ "layout",
43
+ "alignment",
44
+ "fullwidth",
45
+ "halfwidth",
46
+ "ambiguous",
47
+ "narrow",
48
+ "wide",
49
+ "neutral",
50
+ "typography",
51
+ "japanese",
52
+ "chinese",
53
+ "korean",
54
+ "codepoint",
55
+ "text-processing",
56
+ "i18n",
57
+ "l10n"
58
+ ],
59
+ "devDependencies": {
60
+ "ava": "^5.3.1",
61
+ "outdent": "^0.8.0",
62
+ "simplify-ranges": "^0.1.0",
63
+ "typescript": "^5.2.2",
64
+ "xo": "^0.56.0"
65
+ },
66
+ "xo": {
67
+ "ignores": [
68
+ "lookup-data.js"
69
+ ]
70
+ }
71
+ }
@@ -0,0 +1,65 @@
1
+ # get-east-asian-width
2
+
3
+ > Determine the [East Asian Width](https://unicode.org/reports/tr11/) of a Unicode character
4
+
5
+ > East Asian Width categorizes Unicode characters based on their occupied space in East Asian typography, which helps in text layout and alignment, particularly in languages like Japanese, Chinese, and Korean.
6
+
7
+ Unlike other similar packages, this package uses the latest Unicode data (which changes each year).
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install get-east-asian-width
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ import {eastAsianWidth, eastAsianWidthType} from 'get-east-asian-width';
19
+
20
+ const codePoint = '字'.codePointAt(0);
21
+
22
+ console.log(eastAsianWidth(codePoint));
23
+ //=> 2
24
+
25
+ console.log(eastAsianWidthType(codePoint));
26
+ //=> 'wide'
27
+ ```
28
+
29
+ ## `eastAsianWidth(codePoint: number, options?: object): 1 | 2`
30
+
31
+ Returns the width as a number for the given code point.
32
+
33
+ ### options
34
+
35
+ Type: `object`
36
+
37
+ #### ambiguousAsWide
38
+
39
+ Type: `boolean`\
40
+ Default: `false`
41
+
42
+ Whether to treat an `'ambiguous'` character as wide.
43
+
44
+ ```js
45
+ import {eastAsianWidth} from 'get-east-asian-width';
46
+
47
+ const codePoint = '⛣'.codePointAt(0);
48
+
49
+ console.log(eastAsianWidth(codePoint));
50
+ //=> 1
51
+
52
+ console.log(eastAsianWidth(codePoint, {ambiguousAsWide: true}));
53
+ //=> 2
54
+ ```
55
+
56
+ > Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). **If the context cannot be established reliably, they should be treated as narrow characters by default.**
57
+ > - http://www.unicode.org/reports/tr11/
58
+
59
+ ## `eastAsianWidthType(codePoint: number): 'fullwidth' | 'halfwidth' | 'wide' | 'narrow' | 'neutral' | 'ambiguous'`
60
+
61
+ Returns the type of “East Asian Width” for the given code point.
62
+
63
+ ## Related
64
+
65
+ - [string-width](https://github.com/sindresorhus/string-width) - Get the visual width of a string
@@ -0,0 +1,24 @@
1
+ /**
2
+ Binary search on a sorted flat array of [start, end] pairs.
3
+
4
+ @param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].
5
+ @param {number} codePoint - The value to search for.
6
+ @returns {boolean} Whether the value falls within any of the ranges.
7
+ */
8
+ export const isInRange = (ranges, codePoint) => {
9
+ let low = 0;
10
+ let high = Math.floor(ranges.length / 2) - 1;
11
+ while (low <= high) {
12
+ const mid = Math.floor((low + high) / 2);
13
+ const i = mid * 2;
14
+ if (codePoint < ranges[i]) {
15
+ high = mid - 1;
16
+ } else if (codePoint > ranges[i + 1]) {
17
+ low = mid + 1;
18
+ } else {
19
+ return true;
20
+ }
21
+ }
22
+
23
+ return false;
24
+ };