@openhands/agent-canvas 1.5.2 → 1.6.1

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 (711) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
  4. package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
  5. package/build/assets/{active-backend-context-DHhm10VS.js → active-backend-context-Cd1qcZsb.js} +1 -1
  6. package/build/assets/{add-backend-modal-BoMkMyLB.js → add-backend-modal-5chsfln3.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-CYPloKYK.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
  8. package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
  10. package/build/assets/agent-settings-CMd8-O4f.js +2 -0
  11. package/build/assets/agent-settings-CdrhQJXX.js +1 -0
  12. package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
  13. package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
  14. package/build/assets/app-settings-B-DQcBoB.js +1 -0
  15. package/build/assets/{automation-detail-Bn8q0AG3.js → automation-detail-BgxBIpyK.js} +2 -2
  16. package/build/assets/automation-export-Dbur8OHa.js +2 -0
  17. package/build/assets/automations-list-BWfjizlp.js +1 -0
  18. package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
  19. package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-yVh6Kf4E.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
  21. package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
  22. package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
  23. package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
  24. package/build/assets/browser-store-CBqI3tNR.js +1 -0
  25. package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
  26. package/build/assets/chat-send-button-BchSSwuD.js +1 -0
  27. package/build/assets/circle-check-BXbQ5nEH.js +1 -0
  28. package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
  29. package/build/assets/client-source-DAUgyJsi.js +1 -0
  30. package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
  31. package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
  32. package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
  33. package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
  34. package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
  35. package/build/assets/{condenser-settings-Q1rHh4Qe.js → condenser-settings-BBizzfIH.js} +1 -1
  36. package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
  37. package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
  38. package/build/assets/conversation-CTzSrLMq.js +1 -0
  39. package/build/assets/conversation-CgcXNb-Z.js +90 -0
  40. package/build/assets/conversation-panel-bscjGQda.js +1 -0
  41. package/build/assets/{conversation-service.api-D8QU-BiL.js → conversation-service.api-DbBvscJA.js} +1 -1
  42. package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
  43. package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
  44. package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
  46. package/build/assets/declaration-_yumYLEx.js +1 -0
  47. package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
  48. package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
  49. package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
  50. package/build/assets/{entry.client-Dnnak-Hq.js → entry.client-BJSVzw7V.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
  53. package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
  54. package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
  55. package/build/assets/file-tUAzhmJ3.js +1 -0
  56. package/build/assets/files-tab-GV5hwiIM.js +1 -0
  57. package/build/assets/files-tab-store-DehyITNC.js +1 -0
  58. package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
  59. package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
  60. package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
  61. package/build/assets/home-C53WekZ2.js +1 -0
  62. package/build/assets/home-EAwq8ah2.js +1 -0
  63. package/build/assets/index-home-kBdZGKtu.js +1 -0
  64. package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
  65. package/build/assets/{launch-DlXspDku.js → launch-CIecOy_y.js} +1 -1
  66. package/build/assets/lesson-plan-BSEUwflx.js +4 -0
  67. package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
  68. package/build/assets/llm-settings-0Bb97NCk.js +1 -0
  69. package/build/assets/llm-settings-D4toJ90k.js +1 -0
  70. package/build/assets/{llm-subscription-service-C0zN0-rH.js → llm-subscription-service-BPRw3u3H.js} +1 -1
  71. package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
  72. package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
  73. package/build/assets/manifest-ec000ae3.js +1 -0
  74. package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
  75. package/build/assets/mcp-CFIpOkn2.js +9 -0
  76. package/build/assets/messages-eRPeR4pW.js +40 -0
  77. package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
  78. package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
  79. package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
  80. package/build/assets/{model-selector-D51W2Q9b.js → model-selector-BqX2RvEr.js} +1 -1
  81. package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
  82. package/build/assets/onboarding-3KO4qE6R.js +1 -0
  83. package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
  84. package/build/assets/{organization-service.api-Da2jiuBS.js → organization-service.api-CvfQugOt.js} +1 -1
  85. package/build/assets/{path-utils-D53ZHUQU.js → path-utils-DRgexxnX.js} +1 -1
  86. package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
  87. package/build/assets/{planner-tab-BM-pKx0z.js → planner-tab-ZrjiirRr.js} +1 -1
  88. package/build/assets/{plugins-management-service-DISfOL13.js → plugins-management-service-9qT-r_37.js} +1 -1
  89. package/build/assets/plus-CzE1b-wl.js +1 -0
  90. package/build/assets/{profiles-service.api-DWetW2TL.js → profiles-service.api-CRVlrQpT.js} +1 -1
  91. package/build/assets/{providers-C7lMslCi.js → providers-C2DFGBrf.js} +1 -1
  92. package/build/assets/{proxy-G4ce0fnQ.js → proxy-DnnDqkwn.js} +1 -1
  93. package/build/assets/puzzle-IHQnD54C.js +1 -0
  94. package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
  95. package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
  96. package/build/assets/root-BbONavTg.css +1 -0
  97. package/build/assets/root-D01rpqZU.js +2 -0
  98. package/build/assets/root-layout-BiHbCIkS.js +2 -0
  99. package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
  100. package/build/assets/{schema-field-CwdqUOnE.js → schema-field-B9-9Ta9u.js} +1 -1
  101. package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
  102. package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
  103. package/build/assets/{secrets-service-Ch7RH8eH.js → secrets-service-DvyS6-mV.js} +1 -1
  104. package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
  105. package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
  106. package/build/assets/settings-Dzo0dJKM.js +1 -0
  107. package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
  108. package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
  109. package/build/assets/settings-index-uAKHyijw.js +1 -0
  110. package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
  111. package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
  112. package/build/assets/settings-modal-BVX2G_IT.js +1 -0
  113. package/build/assets/{settings-service.api-DPTFyRXL.js → settings-service.api-BY7ncxIz.js} +1 -1
  114. package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
  115. package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
  116. package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
  117. package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
  118. package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
  119. package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
  120. package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
  122. package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
  123. package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
  124. package/build/assets/skills-settings-Crq-fZSt.js +2 -0
  125. package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
  126. package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
  127. package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
  128. package/build/assets/telemetry-CC32dJYW.js +2 -0
  129. package/build/assets/{terminal-BDTa1HEr.js → terminal-CTkDpIU-.js} +1 -1
  130. package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
  131. package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
  132. package/build/assets/{use-acp-credential-form-DHd_Id-q.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
  133. package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
  134. package/build/assets/{use-active-agent-profile-BMDTXsay.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
  135. package/build/assets/{use-active-conversation-BbeVgedA.js → use-active-conversation-Badxj8w4.js} +1 -1
  136. package/build/assets/{use-agent-profiles-Dn_S_Tkz.js → use-agent-profiles-BSWVN6hH.js} +1 -1
  137. package/build/assets/{use-agent-state-5qM3X30V.js → use-agent-state-BzRrhoPd.js} +1 -1
  138. package/build/assets/use-backends-health-BsZikyFW.js +1 -0
  139. package/build/assets/{use-can-manage-org-profiles-CyYqfzeo.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
  140. package/build/assets/{use-cloud-current-user-id-BwMX7jHW.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
  141. package/build/assets/use-config-D9zUVw5b.js +1 -0
  142. package/build/assets/{use-create-conversation-CkKUQVbP.js → use-create-conversation-vvl0kvu7.js} +1 -1
  143. package/build/assets/{use-create-secret-DEgM0MXZ.js → use-create-secret-CB7Dvd4s.js} +1 -1
  144. package/build/assets/use-event-store-BlpSUF7N.js +4 -0
  145. package/build/assets/{use-handle-plan-click-BFcE0Xms.js → use-handle-plan-click-DDZkew9p.js} +1 -1
  146. package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
  147. package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
  148. package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
  149. package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
  150. package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
  151. package/build/assets/{use-save-agent-profile-i4FcEP98.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
  152. package/build/assets/{use-save-settings-DiDEbIJw.js → use-save-settings-BMsb2wk_.js} +1 -1
  153. package/build/assets/use-settings-B9XEmh7i.js +1 -0
  154. package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
  155. package/build/assets/{use-skills-Blpg2BqE.js → use-skills-CSRbvPle.js} +1 -1
  156. package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
  157. package/build/assets/use-tracking-DjdCssvp.js +1 -0
  158. package/build/assets/{use-user-conversation-BrN2xeQU.js → use-user-conversation-BCpFn-Ei.js} +1 -1
  159. package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
  160. package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
  161. package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
  162. package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
  163. package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
  164. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
  165. package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
  166. package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
  167. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
  168. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
  169. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
  170. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
  171. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
  172. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
  173. package/build/assets/{verification-settings-C8KzAdAX.js → verification-settings-uwOfc16F.js} +1 -1
  174. package/build/index.html +4 -4
  175. package/build/locales/ar/openhands.json +38 -4
  176. package/build/locales/ca/openhands.json +38 -4
  177. package/build/locales/de/openhands.json +38 -4
  178. package/build/locales/en/openhands.json +38 -4
  179. package/build/locales/es/openhands.json +38 -4
  180. package/build/locales/fr/openhands.json +38 -4
  181. package/build/locales/it/openhands.json +38 -4
  182. package/build/locales/ja/openhands.json +38 -4
  183. package/build/locales/ko-KR/openhands.json +38 -4
  184. package/build/locales/no/openhands.json +38 -4
  185. package/build/locales/pt/openhands.json +38 -4
  186. package/build/locales/tr/openhands.json +38 -4
  187. package/build/locales/uk/openhands.json +38 -4
  188. package/build/locales/zh-CN/openhands.json +38 -4
  189. package/build/locales/zh-TW/openhands.json +38 -4
  190. package/config/defaults.json +7 -3
  191. package/dist/api/agent-canvas-updates.cjs +2 -0
  192. package/dist/api/agent-canvas-updates.cjs.map +1 -0
  193. package/dist/api/agent-canvas-updates.d.ts +7 -0
  194. package/dist/api/agent-canvas-updates.js +19 -0
  195. package/dist/api/agent-canvas-updates.js.map +1 -0
  196. package/dist/api/agent-server-adapter.cjs +1 -1
  197. package/dist/api/agent-server-adapter.cjs.map +1 -1
  198. package/dist/api/agent-server-adapter.d.ts +3 -0
  199. package/dist/api/agent-server-adapter.js +1 -0
  200. package/dist/api/agent-server-adapter.js.map +1 -1
  201. package/dist/api/agent-server-compatibility.cjs +1 -1
  202. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  203. package/dist/api/agent-server-compatibility.d.ts +5 -0
  204. package/dist/api/agent-server-compatibility.js +24 -15
  205. package/dist/api/agent-server-compatibility.js.map +1 -1
  206. package/dist/api/agent-server-config.cjs +1 -1
  207. package/dist/api/agent-server-config.cjs.map +1 -1
  208. package/dist/api/agent-server-config.js +11 -8
  209. package/dist/api/agent-server-config.js.map +1 -1
  210. package/dist/api/automation-service/automation-service.api.cjs +2 -0
  211. package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
  212. package/dist/api/automation-service/automation-service.api.d.ts +3 -0
  213. package/dist/api/automation-service/automation-service.api.js +283 -0
  214. package/dist/api/automation-service/automation-service.api.js.map +1 -0
  215. package/dist/api/client-source.cjs +1 -1
  216. package/dist/api/client-source.cjs.map +1 -1
  217. package/dist/api/client-source.d.ts +3 -0
  218. package/dist/api/client-source.js +4 -4
  219. package/dist/api/client-source.js.map +1 -1
  220. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  221. package/dist/api/cloud/settings-service.api.js.map +1 -1
  222. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  223. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  224. package/dist/api/conversation-service/agent-server-conversation-service.api.js +111 -109
  225. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  226. package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
  227. package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
  228. package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
  229. package/dist/api/mcp-health/mcp-health-store.js +45 -0
  230. package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
  231. package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
  232. package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
  233. package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
  234. package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
  235. package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
  236. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  237. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  238. package/dist/api/mcp-service/mcp-service.api.js +66 -46
  239. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  240. package/dist/api/plugins-management-service.cjs.map +1 -1
  241. package/dist/api/plugins-management-service.d.ts +6 -1
  242. package/dist/api/plugins-management-service.js.map +1 -1
  243. package/dist/api/plugins-service.d.ts +30 -2
  244. package/dist/api/secrets-service.cjs +1 -1
  245. package/dist/api/secrets-service.cjs.map +1 -1
  246. package/dist/api/secrets-service.d.ts +6 -6
  247. package/dist/api/secrets-service.js +8 -3
  248. package/dist/api/secrets-service.js.map +1 -1
  249. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  250. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  251. package/dist/api/settings-service/settings-service.api.d.ts +1 -1
  252. package/dist/api/settings-service/settings-service.api.js +1 -0
  253. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  254. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  255. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  256. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  257. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  258. package/dist/components/features/backends/backend-form-modal.d.ts +4 -1
  259. package/dist/components/features/backends/backend-form-modal.js +15 -16
  260. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  261. package/dist/components/features/backends/backend-selector.cjs +1 -1
  262. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  263. package/dist/components/features/backends/backend-selector.js +103 -102
  264. package/dist/components/features/backends/backend-selector.js.map +1 -1
  265. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  266. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  267. package/dist/components/features/backends/manage-backends-modal.js +85 -73
  268. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  269. package/dist/components/features/chat/chat-interface.cjs +2 -2
  270. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  271. package/dist/components/features/chat/chat-interface.js +131 -129
  272. package/dist/components/features/chat/chat-interface.js.map +1 -1
  273. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  274. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  275. package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
  276. package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
  277. package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
  278. package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
  279. package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
  280. package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
  281. package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
  282. package/dist/components/features/conversation/right-panel-toggle.js +1 -1
  283. package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
  284. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  285. package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
  286. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  287. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  288. package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
  289. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  290. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  291. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  292. package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
  293. package/dist/components/features/mcp-page/install-server-modal.js +135 -136
  294. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  295. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  296. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  297. package/dist/components/features/mcp-page/installed-server-card.js +40 -34
  298. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  299. package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
  300. package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
  301. package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
  302. package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
  303. package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
  304. package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
  305. package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
  306. package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
  307. package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
  308. package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
  309. package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
  310. package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
  311. package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
  312. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
  313. package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
  314. package/dist/components/features/settings/integrations-settings-link.js +41 -0
  315. package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
  316. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  317. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  318. package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
  319. package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
  320. package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
  321. package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
  322. package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
  323. package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
  324. package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
  325. package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
  326. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  327. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  328. package/dist/components/features/skills/extensions-navigation.js +54 -33
  329. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  330. package/dist/config/defaults.cjs +1 -1
  331. package/dist/config/defaults.cjs.map +1 -1
  332. package/dist/config/defaults.js +7 -3
  333. package/dist/config/defaults.js.map +1 -1
  334. package/dist/constants/acp-providers.cjs.map +1 -1
  335. package/dist/constants/acp-providers.js.map +1 -1
  336. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  337. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  338. package/dist/contexts/conversation-websocket-context.js +169 -166
  339. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  340. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  341. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
  342. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  343. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  344. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
  345. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  346. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  347. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
  348. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  349. package/dist/hooks/mutation/use-save-settings.js +3 -3
  350. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  351. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  352. package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
  353. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  354. package/dist/hooks/query/query-keys.cjs +1 -1
  355. package/dist/hooks/query/query-keys.cjs.map +1 -1
  356. package/dist/hooks/query/query-keys.d.ts +4 -0
  357. package/dist/hooks/query/query-keys.js +2 -2
  358. package/dist/hooks/query/query-keys.js.map +1 -1
  359. package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
  360. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
  361. package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
  362. package/dist/hooks/query/use-automation-sdk-version.js +63 -0
  363. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
  364. package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
  365. package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
  366. package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
  367. package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
  368. package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
  369. package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
  370. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  371. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  372. package/dist/hooks/query/use-resolved-workspaces.js +25 -26
  373. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  374. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  375. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  376. package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
  377. package/dist/hooks/query/use-search-subdirs.js +16 -4
  378. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  379. package/dist/hooks/use-device-flow.cjs +1 -1
  380. package/dist/hooks/use-device-flow.js +6 -6
  381. package/dist/hooks/use-llm-configured.cjs +1 -1
  382. package/dist/hooks/use-llm-configured.js +3 -3
  383. package/dist/hooks/use-mcp-server-health.cjs +2 -0
  384. package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
  385. package/dist/hooks/use-mcp-server-health.d.ts +11 -0
  386. package/dist/hooks/use-mcp-server-health.js +18 -0
  387. package/dist/hooks/use-mcp-server-health.js.map +1 -0
  388. package/dist/hooks/use-skill-installs.cjs +2 -0
  389. package/dist/hooks/use-skill-installs.cjs.map +1 -0
  390. package/dist/hooks/use-skill-installs.d.ts +10 -0
  391. package/dist/hooks/use-skill-installs.js +21 -0
  392. package/dist/hooks/use-skill-installs.js.map +1 -0
  393. package/dist/hooks/use-tracking.cjs +1 -1
  394. package/dist/hooks/use-tracking.cjs.map +1 -1
  395. package/dist/hooks/use-tracking.d.ts +3 -3
  396. package/dist/hooks/use-tracking.js +67 -52
  397. package/dist/hooks/use-tracking.js.map +1 -1
  398. package/dist/i18n/declaration.cjs +1 -1
  399. package/dist/i18n/declaration.cjs.map +1 -1
  400. package/dist/i18n/declaration.d.ts +35 -1
  401. package/dist/i18n/declaration.js +1 -1
  402. package/dist/i18n/declaration.js.map +1 -1
  403. package/dist/i18n/translation.cjs +3 -3
  404. package/dist/i18n/translation.cjs.map +1 -1
  405. package/dist/i18n/translation.js +623 -45
  406. package/dist/i18n/translation.js.map +1 -1
  407. package/dist/index.cjs +1 -1
  408. package/dist/index.js +1 -2
  409. package/dist/lib/index.cjs +1 -1
  410. package/dist/lib/index.d.ts +0 -1
  411. package/dist/lib/index.js +0 -1
  412. package/dist/locales/ar/openhands.json +38 -4
  413. package/dist/locales/ca/openhands.json +38 -4
  414. package/dist/locales/de/openhands.json +38 -4
  415. package/dist/locales/en/openhands.json +38 -4
  416. package/dist/locales/es/openhands.json +38 -4
  417. package/dist/locales/fr/openhands.json +38 -4
  418. package/dist/locales/it/openhands.json +38 -4
  419. package/dist/locales/ja/openhands.json +38 -4
  420. package/dist/locales/ko-KR/openhands.json +38 -4
  421. package/dist/locales/no/openhands.json +38 -4
  422. package/dist/locales/pt/openhands.json +38 -4
  423. package/dist/locales/tr/openhands.json +38 -4
  424. package/dist/locales/uk/openhands.json +38 -4
  425. package/dist/locales/zh-CN/openhands.json +38 -4
  426. package/dist/locales/zh-TW/openhands.json +38 -4
  427. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
  428. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
  429. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
  430. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
  431. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  444. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
  446. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  452. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
  454. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  475. package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
  476. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  477. package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
  478. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  479. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
  480. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
  481. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
  482. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  483. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
  484. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
  485. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
  486. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  487. package/dist/package.cjs +1 -1
  488. package/dist/package.cjs.map +1 -1
  489. package/dist/package.js +10 -3
  490. package/dist/package.js.map +1 -1
  491. package/dist/routes/app-settings.cjs +1 -1
  492. package/dist/routes/app-settings.cjs.map +1 -1
  493. package/dist/routes/app-settings.js +113 -67
  494. package/dist/routes/app-settings.js.map +1 -1
  495. package/dist/routes/mcp.cjs +1 -1
  496. package/dist/routes/mcp.cjs.map +1 -1
  497. package/dist/routes/mcp.js +1 -0
  498. package/dist/routes/mcp.js.map +1 -1
  499. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  500. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  501. package/dist/services/cloud-funnel-analytics.d.ts +2 -2
  502. package/dist/services/cloud-funnel-analytics.js +18 -16
  503. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  504. package/dist/services/settings.cjs +1 -1
  505. package/dist/services/settings.cjs.map +1 -1
  506. package/dist/services/settings.js +1 -0
  507. package/dist/services/settings.js.map +1 -1
  508. package/dist/services/telemetry-context.cjs +2 -0
  509. package/dist/services/telemetry-context.cjs.map +1 -0
  510. package/dist/services/telemetry-context.d.ts +17 -0
  511. package/dist/services/telemetry-context.js +27 -0
  512. package/dist/services/telemetry-context.js.map +1 -0
  513. package/dist/services/telemetry.cjs +1 -1
  514. package/dist/services/telemetry.cjs.map +1 -1
  515. package/dist/services/telemetry.d.ts +7 -5
  516. package/dist/services/telemetry.js +132 -123
  517. package/dist/services/telemetry.js.map +1 -1
  518. package/dist/stores/skill-install-banner-store.cjs +2 -0
  519. package/dist/stores/skill-install-banner-store.cjs.map +1 -0
  520. package/dist/stores/skill-install-banner-store.d.ts +32 -0
  521. package/dist/stores/skill-install-banner-store.js +14 -0
  522. package/dist/stores/skill-install-banner-store.js.map +1 -0
  523. package/dist/stores/use-event-store.cjs +1 -1
  524. package/dist/stores/use-event-store.cjs.map +1 -1
  525. package/dist/stores/use-event-store.js +35 -35
  526. package/dist/stores/use-event-store.js.map +1 -1
  527. package/dist/types/mcp-health.cjs +2 -0
  528. package/dist/types/mcp-health.cjs.map +1 -0
  529. package/dist/types/mcp-health.d.ts +21 -0
  530. package/dist/types/mcp-health.js +6 -0
  531. package/dist/types/mcp-health.js.map +1 -0
  532. package/dist/types/settings.d.ts +1 -0
  533. package/dist/utils/handle-event-for-ui.cjs +1 -1
  534. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  535. package/dist/utils/handle-event-for-ui.d.ts +5 -0
  536. package/dist/utils/handle-event-for-ui.js +71 -57
  537. package/dist/utils/handle-event-for-ui.js.map +1 -1
  538. package/dist/utils/mcp-credential-validation.cjs +1 -1
  539. package/dist/utils/mcp-credential-validation.cjs.map +1 -1
  540. package/dist/utils/mcp-credential-validation.js +32 -16
  541. package/dist/utils/mcp-credential-validation.js.map +1 -1
  542. package/dist/utils/mcp-server-health-key.cjs +2 -0
  543. package/dist/utils/mcp-server-health-key.cjs.map +1 -0
  544. package/dist/utils/mcp-server-health-key.d.ts +16 -0
  545. package/dist/utils/mcp-server-health-key.js +23 -0
  546. package/dist/utils/mcp-server-health-key.js.map +1 -0
  547. package/dist/utils/mcp-test-error-message.cjs +2 -0
  548. package/dist/utils/mcp-test-error-message.cjs.map +1 -0
  549. package/dist/utils/mcp-test-error-message.d.ts +8 -0
  550. package/dist/utils/mcp-test-error-message.js +14 -0
  551. package/dist/utils/mcp-test-error-message.js.map +1 -0
  552. package/dist/utils/redact-mcp-secrets.cjs +2 -0
  553. package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
  554. package/dist/utils/redact-mcp-secrets.d.ts +13 -0
  555. package/dist/utils/redact-mcp-secrets.js +57 -0
  556. package/dist/utils/redact-mcp-secrets.js.map +1 -0
  557. package/dist/utils/settings-utils.cjs.map +1 -1
  558. package/dist/utils/settings-utils.js.map +1 -1
  559. package/dist/utils/skill-install-events.cjs +3 -0
  560. package/dist/utils/skill-install-events.cjs.map +1 -0
  561. package/dist/utils/skill-install-events.d.ts +16 -0
  562. package/dist/utils/skill-install-events.js +26 -0
  563. package/dist/utils/skill-install-events.js.map +1 -0
  564. package/dist/utils/title-llm-profile.cjs +2 -0
  565. package/dist/utils/title-llm-profile.cjs.map +1 -0
  566. package/dist/utils/title-llm-profile.d.ts +2 -0
  567. package/dist/utils/title-llm-profile.js +11 -0
  568. package/dist/utils/title-llm-profile.js.map +1 -0
  569. package/package.json +10 -3
  570. package/scripts/check-sdk-version-sync.mjs +6 -6
  571. package/scripts/check-translation-completeness.cjs +2 -0
  572. package/scripts/dev-process-utils.mjs +62 -1
  573. package/scripts/dev-safe.mjs +2 -2
  574. package/scripts/dev-static.mjs +5 -3
  575. package/scripts/dev-with-automation.mjs +98 -14
  576. package/scripts/download-node.mjs +382 -0
  577. package/scripts/download-uv.mjs +204 -0
  578. package/scripts/logger.mjs +64 -35
  579. package/build/assets/agent-server-compatibility-C0MtTTwb.js +0 -1
  580. package/build/assets/agent-server-conversation-service.api-lzc8dabY.js +0 -41
  581. package/build/assets/agent-settings-GwiXe_6k.js +0 -2
  582. package/build/assets/agent-settings-OdsyI2gX.js +0 -1
  583. package/build/assets/api-key-entry-screen-2gsoZAOK.js +0 -1
  584. package/build/assets/app-settings-CD9euh81.js +0 -1
  585. package/build/assets/automation-export-Djc8Tf0M.js +0 -2
  586. package/build/assets/automations-list-Dtiolk1h.js +0 -1
  587. package/build/assets/backend-form-modal-B8GtBA-J.js +0 -1
  588. package/build/assets/browser-store-BI6uklCG.js +0 -1
  589. package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
  590. package/build/assets/client-source-CtQjJEy6.js +0 -1
  591. package/build/assets/cloud-funnel-analytics-uzzLlLuj.js +0 -1
  592. package/build/assets/conversation-B8d8_Upd.js +0 -1
  593. package/build/assets/conversation-Lmqm6VJC.js +0 -89
  594. package/build/assets/conversation-panel-B8n40Swu.js +0 -1
  595. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  596. package/build/assets/declaration-BGsHjPEW.js +0 -1
  597. package/build/assets/extensions-hub-DqvwvpCi.js +0 -1
  598. package/build/assets/extensions-navigation-BMc9Nluv.js +0 -1
  599. package/build/assets/files-tab-BAkaV4aO.js +0 -1
  600. package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
  601. package/build/assets/git-provider-icon-xvbukHaT.js +0 -1
  602. package/build/assets/home-D01kSnmo.js +0 -1
  603. package/build/assets/home-NZO2bF4N.js +0 -1
  604. package/build/assets/index-home-BsI6i0TC.js +0 -1
  605. package/build/assets/install-server-modal-BYjqoRyX.js +0 -1
  606. package/build/assets/lesson-plan-cNUjpdFx.js +0 -4
  607. package/build/assets/llm-not-configured-banner-DUPyoFIZ.js +0 -27
  608. package/build/assets/llm-settings-Cs_iieFY.js +0 -1
  609. package/build/assets/llm-settings-J2ke2foG.js +0 -1
  610. package/build/assets/manage-backends-modal-nMoCZ2a0.js +0 -1
  611. package/build/assets/manifest-f1b46f62.js +0 -1
  612. package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
  613. package/build/assets/mcp-kZM-cAZw.js +0 -9
  614. package/build/assets/messages-CJAv5n4j.js +0 -40
  615. package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
  616. package/build/assets/onboarding-Dx8n8HFr.js +0 -1
  617. package/build/assets/onboarding-modal-Bxuxpfdz.js +0 -1
  618. package/build/assets/recommended-automations-launcher-BWRRvMPE.js +0 -58
  619. package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
  620. package/build/assets/root-CYWeTrWE.css +0 -1
  621. package/build/assets/root-layout-ClEl-JlJ.js +0 -2
  622. package/build/assets/root-oT83qVlk.js +0 -2
  623. package/build/assets/sdk-section-page-Cwj0T4gF.js +0 -1
  624. package/build/assets/secrets-settings-Bc_pBX6F.js +0 -1
  625. package/build/assets/settings-index-BzSIM1-N.js +0 -1
  626. package/build/assets/settings-modal-BnZ7mMu7.js +0 -1
  627. package/build/assets/settings-n9a395O0.js +0 -1
  628. package/build/assets/shared-conversation-CIDDti9I.js +0 -1
  629. package/build/assets/sidebar-mobile-menu-toggle-CTX7J4wM.js +0 -1
  630. package/build/assets/skills-plugins-HZEbNDmX.js +0 -1
  631. package/build/assets/skills-settings-BdqijFlC.js +0 -2
  632. package/build/assets/telemetry-SHxpVxk8.js +0 -2
  633. package/build/assets/use-activate-agent-profile-BRDdSwQ0.js +0 -1
  634. package/build/assets/use-backends-health-BagmAE_W.js +0 -1
  635. package/build/assets/use-config-B39iHYFi.js +0 -1
  636. package/build/assets/use-event-store-Bbaz51GR.js +0 -4
  637. package/build/assets/use-llm-profiles-CgRtnj74.js +0 -1
  638. package/build/assets/use-plugins-marketplace-DOJp9rlE.js +0 -1
  639. package/build/assets/use-runtime-is-ready-ziHQvXZQ.js +0 -1
  640. package/build/assets/use-settings-BeJap6YL.js +0 -1
  641. package/build/assets/use-settings-nav-items-D5JJjFHJ.js +0 -16
  642. package/build/assets/use-tracking-DFoPQUSU.js +0 -1
  643. package/build/assets/useMutationState-OnAsCLA_.js +0 -1
  644. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
  645. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
  646. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
  647. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
  648. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
  649. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
  650. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
  651. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
  652. package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
  653. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
  654. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
  655. package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
  656. package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
  657. /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
  658. /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
  659. /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
  660. /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
  661. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
  662. /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
  663. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
  664. /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
  665. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
  666. /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
  667. /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
  668. /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
  669. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
  670. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
  671. /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
  672. /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
  673. /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
  674. /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
  675. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
  676. /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
  677. /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
  678. /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
  679. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
  680. /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
  681. /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
  682. /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
  683. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
  684. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
  685. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
  686. /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
  687. /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
  688. /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
  689. /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
  690. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
  691. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
  692. /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
  693. /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
  694. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
  695. /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
  696. /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
  697. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
  698. /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
  699. /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
  700. /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
  701. /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
  702. /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
  703. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
  704. /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
  705. /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
  706. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
  707. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
  708. /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
  709. /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
  710. /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
  711. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
@@ -1,19 +1,21 @@
1
1
  /**
2
2
  * Shared file logger for agent-canvas dev scripts.
3
3
  *
4
- * Writes log output to a daily-rotating file under <project-root>/logs/
5
- * alongside the existing console output (which is unchanged).
4
+ * Writes log output to a daily-rotating file under
5
+ * <state-dir>/logs/agent-canvas.YYYY-MM-DD.log (7-day retention) alongside
6
+ * the existing console output (which is unchanged).
6
7
  *
7
- * File naming: logs/agent-canvas.YYYY-MM-DD.log
8
- * Retention: 7 days (files older than 7 days are automatically deleted)
8
+ * winston is loaded dynamically and treated as optional: when it isn't
9
+ * resolvable most importantly inside the packaged Electron desktop app,
10
+ * whose `afterPack` hook strips `Resources/app/node_modules/` — `fileLog`
11
+ * becomes a no-op and console logging continues to work unchanged. See
12
+ * AGENTS.md "Electron desktop packaging" for the strip-hook details.
9
13
  */
10
14
 
11
15
  import { mkdirSync } from "node:fs";
12
16
  import { homedir } from "node:os";
13
17
  import { join } from "node:path";
14
18
  import process from "node:process";
15
- import { createLogger, format } from "winston";
16
- import DailyRotateFile from "winston-daily-rotate-file";
17
19
 
18
20
  // Mirror the state-directory logic from dev-safe.mjs so log files live
19
21
  // alongside all other agent-canvas runtime state (e.g. ~/.openhands/agent-canvas).
@@ -23,9 +25,6 @@ const stateDir =
23
25
  join(homedir(), ".openhands", "agent-canvas");
24
26
  const logDir = join(stateDir, "logs");
25
27
 
26
- // Ensure the logs directory exists before the transport tries to open a file.
27
- mkdirSync(logDir, { recursive: true });
28
-
29
28
  // Matches any ANSI CSI escape sequence (colors, cursor movement, etc.).
30
29
  const ANSI_RE = /\x1b\[[0-9;]*m/g;
31
30
 
@@ -38,40 +37,70 @@ export function stripAnsi(str) {
38
37
  return typeof str === "string" ? str.replace(ANSI_RE, "") : String(str);
39
38
  }
40
39
 
41
- const fileTransport = new DailyRotateFile({
42
- dirname: logDir,
43
- filename: "agent-canvas.%DATE%.log",
44
- datePattern: "YYYY-MM-DD",
45
- maxFiles: "7d",
46
- // Audit file tracks which rotated files exist; kept alongside log files.
47
- auditFile: join(logDir, ".log-audit.json"),
48
- createSymlink: false,
49
- });
40
+ /**
41
+ * Attempt to construct a winston-backed file logger. Returns `null` if
42
+ * winston isn't installed (packaged desktop app) or any setup step fails;
43
+ * `fileLog` then degrades to a no-op.
44
+ *
45
+ * @returns {Promise<import("winston").Logger | null>}
46
+ */
47
+ async function createFileLogger() {
48
+ let winston;
49
+ let DailyRotateFileMod;
50
+ try {
51
+ winston = await import("winston");
52
+ DailyRotateFileMod = await import("winston-daily-rotate-file");
53
+ } catch {
54
+ return null;
55
+ }
56
+
57
+ try {
58
+ mkdirSync(logDir, { recursive: true });
59
+
60
+ const DailyRotateFile =
61
+ DailyRotateFileMod.default ?? DailyRotateFileMod;
62
+ const fileTransport = new DailyRotateFile({
63
+ dirname: logDir,
64
+ filename: "agent-canvas.%DATE%.log",
65
+ datePattern: "YYYY-MM-DD",
66
+ maxFiles: "7d",
67
+ auditFile: join(logDir, ".log-audit.json"),
68
+ createSymlink: false,
69
+ });
50
70
 
51
- const fileLogger = createLogger({
52
- level: "debug",
53
- format: format.combine(
54
- format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
55
- format.printf(
56
- ({ timestamp, level, message }) =>
57
- `${timestamp} [${level.toUpperCase().padEnd(5)}] ${message}`,
58
- ),
59
- ),
60
- transports: [fileTransport],
61
- });
71
+ const logger = winston.createLogger({
72
+ level: "debug",
73
+ format: winston.format.combine(
74
+ winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
75
+ winston.format.printf(
76
+ ({ timestamp, level, message }) =>
77
+ `${timestamp} [${level.toUpperCase().padEnd(5)}] ${message}`,
78
+ ),
79
+ ),
80
+ transports: [fileTransport],
81
+ });
82
+
83
+ // Swallow any transport-level errors (e.g. disk full) so a logging
84
+ // failure never crashes the dev server.
85
+ logger.on("error", () => {});
86
+ fileTransport.on("error", () => {});
87
+ return logger;
88
+ } catch {
89
+ return null;
90
+ }
91
+ }
62
92
 
63
- // Swallow any transport-level errors (e.g. disk full) so a logging failure
64
- // never crashes the dev server.
65
- fileLogger.on("error", () => {});
66
- fileTransport.on("error", () => {});
93
+ const fileLogger = await createFileLogger();
67
94
 
68
95
  /**
69
- * Write a message to the rotating log file.
70
- * ANSI escape codes are stripped automatically; console output is unaffected.
96
+ * Write a message to the rotating log file. No-ops when winston isn't
97
+ * available (e.g. the packaged desktop app). ANSI escape codes are
98
+ * stripped automatically; console output is unaffected.
71
99
  *
72
100
  * @param {'info' | 'warn' | 'error' | 'debug'} level
73
101
  * @param {string} message
74
102
  */
75
103
  export function fileLog(level, message) {
104
+ if (!fileLogger) return;
76
105
  fileLogger.log(level, stripAnsi(message));
77
106
  }
@@ -1 +0,0 @@
1
- import{d as e,y as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var n=`workspace/project`,r=`__AGENT_CANVAS_LOCK_TO_CLOUD__`,i=`all-hands.dev`,a=`openhands.dev`,o=`app.${i}`,s=a,ee=`app.${a}`;function c(e){return e?.trim()||null}function te(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function l(e){if(!e)return null;let t=e.trim().replace(/\/+$/,``);return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null}function ne(e){let t=e.toLowerCase();return t===o||t===ee?s:t===i?a:t.endsWith(`.${i}`)?`${t.slice(0,-13)}${a}`:t}function u(e){let t=l(e);if(!t)return null;try{let e=new URL(t),n=e.port?`:${e.port}`:``;return`${e.protocol}//${ne(e.hostname)}${n}`}catch{return t.toLowerCase()}}function d(){let e=f();return!e||typeof window>`u`||!p(window.location.origin,e)?null:window.location.origin}function re(){return te(void 0)}function ie(){let e=c(void 0);if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_SESSION_API_KEY__;if(typeof e==`string`)return c(e)}return null}function ae(){return{baseUrl:m()??``,sessionApiKey:h()??``}}function f(){let e=l(void 0);if(e)return e;if(typeof window<`u`){let e=window[r];if(typeof e==`string`)return l(e)}return null}function p(e,t){let n=u(e),r=u(t);return!n||!r?!1:n===r}function oe(){return d()?`cookie`:`api-key`}function m(){return re()||(typeof window<`u`?window.location.origin:null)}function h(){return ie()}function g(){return(void 0)?.trim()||n}function se(e){return`${g().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function ce(){let e=h();return e?{"X-Session-API-Key":e}:{}}function _(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}function le(){return _()?!h():!1}var ue=`default-local`,v=`Local`,de=`locked-cloud`,fe=`OpenHands Cloud`;function pe(){if(!f())return null;let e=d();return e?{id:de,name:fe,host:e,apiKey:``,kind:`cloud`,authMode:`cookie`}:null}function y(){if(f())return null;let e=m(),t=h();return!e||!t?null:{id:ue,name:v,host:e,apiKey:t,kind:`local`}}var me=`openhands-backends`,b=`openhands-active-backend`;function he(e){return e===`local`||e===`cloud`}function ge(e){return e===void 0||e===`api-key`||e===`cookie`}function _e(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&he(t.kind)&&ge(t.authMode)}function x(e){try{let{hostname:t}=new URL(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`}catch{return!1}}function ve(e,t){return e.id!==`default-local`||e.kind!==`local`?!1:e.host===t.host||x(e.host)&&x(t.host)}function ye(e){let t=y();if(!t)return e;let n=!1,r=e.map(e=>!ve(e,t)||e.apiKey===t.apiKey?e:(n=!0,{...e,apiKey:t.apiKey}));return n?(S(r),r):e}function S(e){if(!(typeof window>`u`))try{window.localStorage.setItem(me,JSON.stringify(e))}catch{}}function be(){if(typeof window>`u`)return[];try{let e=pe();if(e)return S([e]),D()?.backendId!==e.id&&O({backendId:e.id}),[e];let t=window.localStorage.getItem(me);if(t===null){let e=y();return e?(S([e]),[e]):[]}let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=n.filter(_e);if(r.length===0){let e=y();return e?(S([e]),[e]):[]}return ye(r)}catch{return[]}}function C(e){if(!e)return null;try{let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function w(e,t){try{return e?.getItem(t)??null}catch{return null}}function T(e,t,n){try{e?.setItem(t,n)}catch{}}function E(e,t){try{e?.removeItem(t)}catch{}}function D(){return typeof window>`u`?null:C(w(window.sessionStorage,b))||C(w(window.localStorage,b))}function O(e){if(typeof window>`u`)return;if(!e){E(window.sessionStorage,b),E(window.localStorage,b);return}let t=JSON.stringify({backendId:e.backendId,orgId:e.orgId??null});T(window.sessionStorage,b,t),T(window.localStorage,b,t)}var k=`no-backend`,A={id:k,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function j(e){return e.id===k}function xe(e){return e[0]??A}function M(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=xe(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}var N=M(be(),D()),P=new Set;function F(){P.forEach(e=>e())}function I(){return N.active}function L(){let e=N.active.backend;return e.kind===`local`&&!j(e)?e:null}function Se(){return N.backends}function Ce(){return N.selection}function we(){return N}function Te(e){O(e),N=M(N.backends,e),F()}function Ee(e){S(e);let t=N.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,O(null)),N=M(e,t),F()}function De(e){return P.add(e),()=>{P.delete(e)}}function R(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function z(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function B(e){let t=R(e),n=z(e),r=window.location.protocol===`https:`,i=V(e)===`https:`;return`${r||i?`https:`:`http:`}//${t}${n}`}function V(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function Oe(e,t){let n=R(e),r=z(e),i=window.location.protocol===`https:`,a=V(e)===`https:`,o=`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/bash-events`;return t?`${o}?session_api_key=${encodeURIComponent(t)}`:o}function ke(e,t){if(!e)return null;let n=R(t),r=z(t),i=window.location.protocol===`https:`,a=V(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}var H=class extends Error{constructor(){super(`No backend is configured.`),this.name=`NoBackendAvailableError`}};function U(e){return e.replace(/\/+$/,``)}function Ae(e,t){return e.host?U(e.host):e.conversationUrl?U(B(e.conversationUrl)):U(t?.host??``)}function W(e={}){let t=L();if(!t&&!e.host&&!e.conversationUrl)throw new H;let n=e.sessionApiKey??e.apiKey??t?.apiKey??void 0;return{host:Ae(e,t),...n?{apiKey:n}:{},workingDir:e.workingDir??g(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function je(e){let{host:t,apiKey:n,timeout:r}=W(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}var Me={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.36.1`,agentCanvas:`1.5.2`,automation:`1.1.7`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`}},Ne=5e3,Pe=`unknown`,G=Me.compatibility.minimumAgentServer,Fe=`AGENT_SERVER_UNSUPPORTED_VERSION`,Ie=`AGENT_SERVER_UNKNOWN_VERSION`,K=null,Le=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,q=class extends Error{details;noBackendConfigured;constructor(e,t){let n=t?.noBackendConfigured??!1;super(n?`No agent server backend is configured yet. Add a backend to get started.`:`Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null,this.noBackendConfigured=n}},Re=e=>e instanceof q||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`,ze=class extends q{code=Fe;actualVersion;requiredVersion=G;constructor(e){let t=`Agent Canvas requires agent-server ${G} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},J=class extends q{code=Ie;actualVersion;requiredVersion=G;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${G} or newer, but this backend did not return a valid version from /server_info. Restart or rebuild the agent-server backend, then try again.`;super(t),this.name=`AgentServerUnknownVersionError`,this.message=t,this.actualVersion=e}},Be=e=>_()&&Z(e,401);function Y(){K=null}function Ve(e){let t=Le(K);return Array.isArray(t)?t.includes(e):!0}function X(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function Z(e,t){return X(e)&&e.status===t}function He(e){return typeof e.version==`string`&&e.version.trim()||null}function Ue(e){let t=He(e);return!t||t.toLowerCase()===Pe?null:t}function We(e){let t=Ue(e);return!t||!Q(t)?null:t}function Ge(e,t){let n=Q(e),r=Q(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function Q(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}function $(e){let t=Ue(e);if(!t)throw Y(),new J(He(e));let n=Ge(t,G);if(n===null)throw Y(),new J(t);if(n<0)throw Y(),new ze(t)}async function Ke(){let n=L();if(!n){if(Y(),j(I().backend))throw new q(`No backend configured`,{noBackendConfigured:!0});return null}let r=W({host:n.host,sessionApiKey:n.apiKey||null,timeout:Ne}),i;try{i=await new t(r).getServerInfo()}catch(e){throw Y(),Z(e,401)?e:new q(e instanceof Error?e.message:null)}if($(i),_())try{await new e(r).getSettings()}catch(e){if(Z(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return K=i,i}export{m as A,Te as C,y as D,v as E,f as F,_ as I,le as L,ce as M,g as N,n as O,oe as P,p as R,j as S,De as T,I as _,Ve as a,Se as b,Z as c,W as d,je as f,A as g,ke as h,Be as i,ae as j,se as k,Ke as l,B as m,Y as n,Re as o,Oe as p,We as r,X as s,$ as t,H as u,Ce as v,Ee as w,we as x,L as y};
@@ -1,41 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-Ch7RH8eH.js","assets/rolldown-runtime-BFRubm34.js","assets/agent-server-compatibility-C0MtTTwb.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js","assets/vendor-styling-CI0PQ3ab.js","assets/proxy-G4ce0fnQ.js"])))=>i.map(i=>d[i]);
2
- import{St as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./common-CxbUL3nR.js";import{N as n,_ as r,a as i,d as a,k as o,m as s,u as c,y as l}from"./agent-server-compatibility-C0MtTTwb.js";import{_ as u,c as d,f,g as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as m}from"./client-source-CtQjJEy6.js";import{r as h,t as g}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js";import{t as _}from"./proxy-G4ce0fnQ.js";import{t as v}from"./settings-mQUckT0g.js";import{t as ee}from"./settings-service.api-DPTFyRXL.js";import{t as y}from"./v4-DbCkTSoU.js";import{t as te}from"./profiles-service.api-DWetW2TL.js";import{t as b}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js";import{f as x,o as S,s as C}from"./acp-providers-DerAmTyY.js";import{d as ne,f as w,r as re}from"./llm-subscription-DtsX5Lhg.js";import{t as ie}from"./llm-subscription-service-C0zN0-rH.js";import{n as T,r as ae}from"./canvas-ui-COgjltGz.js";var E=new Map;function oe(e){return/^([/\\]|[a-zA-Z]:[/\\])/.test(e)}function se(e,t){return`${e.replace(/[/\\]+$/,``)}/${t.replace(/^[/\\]+/,``)}`}async function ce(e={}){let t=a(e),n=t.host,r=E.get(n);if(r)return r;let i=(async()=>{let{home:e}=await new p(t).getHome();if(!e||typeof e!=`string`)throw Error(`Agent server returned an empty home directory`);return e.replace(/[/\\]+$/,``)})();E.set(n,i);try{return await i}catch(e){throw E.delete(n),e}}async function le(e,t={}){let n=e.replace(/[/\\]+$/,``);return n?oe(n)?n:se(await ce(t),n):ce(t)}var D=`openhands-agent-server-conversation-metadata`,ue=e=>({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}),O=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(D);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},k=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(D);return}window.localStorage.setItem(D,JSON.stringify(e))}},A=e=>O()[e]??null,j=(e,t)=>{let n=O();n[e]=t,k(n)},M=e=>{let t=O();e in t&&(delete t[e],k(t))};function N(e){if(!e?.id)return e;let t=A(e.id);return t?{...e,selected_repository:e.selected_repository??t.selected_repository??null,selected_branch:e.selected_branch??t.selected_branch??null,git_provider:e.git_provider??t.git_provider??null,selected_workspace:e.selected_workspace??t.selected_workspace??null}:e}function P(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}async function de(e=20,t){let n=P(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>N(e)),next_page_id:i?.next_page_id??null}}async function F(e){if(e.length===0)return[];let t=P(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await _({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(N)}async function fe(e){return await _({backend:P(),method:`POST`,path:`/api/v1/app-conversations`,body:e,headers:m})}async function pe(e){return _({backend:P(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function me(e){await _({backend:P(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function he(e,t){return await _({backend:P(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function ge(e){await _({backend:P(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function _e(e){await _({backend:P(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function I(e,t){let n=P(),r=new URLSearchParams;return r.append(`file_path`,t),await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function ve(e){let t=P(),n=new URLSearchParams;return n.set(`ids`,e),(await _({backend:t,method:`GET`,path:`/api/v1/app-conversations/start-tasks?${n.toString()}`}))?.[0]??null}function ye(e){return e.kind===`cloud`&&e.authMode===`cookie`||!e.apiKey?{}:e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}}var be={name:T,description:`The user is interacting with you inside Agent Canvas — a web UI with a chat panel on the left and a tabbed right-side panel (files, terminal, browser, vscode, planner, tasklist). This tool lets you drive that right-side panel so the user sees what you just produced.
3
-
4
- They will NOT see the files you wrote, the terminal output, or the browser
5
- unless you call this tool to switch the right-side panel to the relevant
6
- tab. Call this every time you finish work that produces something the user
7
- should look at — don't rely on them noticing on their own.
8
-
9
- When to call (pick the most specific option that matches your last action):
10
-
11
- * You wrote or modified a single file (ANY language, ANY size — including
12
- small scripts like a hello-world bash file) →
13
- command="navigate_to_file", path=<workspace-relative path of that file>
14
-
15
- * You generated an HTML page, image, SVG, PDF, markdown report, or other
16
- previewable artifact →
17
- command="show_preview", path=<that file>
18
-
19
- * You finished editing multiple files in one logical step →
20
- command="open_tab", tab="files"
21
- (The Files tab automatically renders a diff view when the workspace has
22
- uncommitted git changes, which covers the "highlight changes" case.)
23
-
24
- * You ran a long-running terminal command, or one whose output the user
25
- should inspect →
26
- command="open_tab", tab="terminal"
27
-
28
- * You browsed to a URL the user should see →
29
- First call browser_get_state(include_screenshot=true) after your final
30
- browser interaction so Agent Canvas has a screenshot to display, then call
31
- command="open_tab", tab="browser"
32
- (browser_navigate alone only updates the URL; without browser_get_state,
33
- the Browser tab will open without a screenshot.)
34
-
35
- Call this BEFORE writing your chat-message summary of the change, so the
36
- artifact is visible while the user reads what you did. One canvas_ui_control
37
- call per logical step is enough — don't repeat it for the same file or tab in
38
- the same turn.`,parameters:{type:`object`,additionalProperties:!1,properties:{command:{type:`string`,enum:[`navigate_to_file`,`open_tab`,`show_preview`],description:`UI command to dispatch.`},path:{type:`string`,description:`Workspace-relative file path. Required for navigate_to_file and show_preview; ignored otherwise.`},tab:{type:`string`,enum:[`files`,`browser`,`vscode`,`terminal`,`planner`,`tasklist`],description:`Tab to open. Required for open_tab; ignored otherwise.`}},required:[`command`]},annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},xe=[`terminal`,`file_editor`,`task_tracker`],L=`browser_tool_set`,R=`task_tool_set`;function Se(){return!0}function Ce(){let e=(void 0)?.trim();if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_RUNTIME_SERVICES_INFO__;if(typeof e==`string`)return e.trim()||null}return null}function we(){let e=Ce();if(!e)return null;try{let t=JSON.parse(e);return!t||typeof t!=`object`?null:t}catch{return null}}function Te(){let e=we();if(!e?.services)return;let t=[];t.push(`<RUNTIME_SERVICES>`),e.mode?t.push(`You are running inside an agent-canvas dev stack started in '${e.mode}' mode.`):t.push(`You are running inside an agent-canvas dev stack.`),t.push(`The following services are reachable from your sandbox. URLs are written`,`from your point of view (i.e., as you should curl/fetch them).`,``);let{agent_server:n,ingress:r,automation:i}=e.services,{frontend:a}=e.services;n?.url_from_agent&&t.push(`* Agent Server (you): ${n.url_from_agent}`,` ${n.description??`The agent-server hosting your tool calls.`}`),r?.url_from_agent&&t.push(`* Ingress: ${r.url_from_agent}`,` ${r.description??`Unified entry point for browser-facing traffic.`}`),a?.url_from_agent&&t.push(`* Frontend: ${a.url_from_agent}`,` ${a.description??`Frontend dev server.`}`),i?.url_from_agent?(t.push(`* Automation backend: ${i.url_from_agent}`,` ${i.description??`OpenHands Automations service.`}`),i.docs_url&&t.push(` Docs: ${i.docs_url}`),i.openapi_url&&t.push(` OpenAPI: ${i.openapi_url}`),i.auth_env_var&&t.push(` Auth: header 'X-Session-API-Key: $${i.auth_env_var}'`)):t.push(`* Automation backend: not running in this dev mode (skip /api/automation calls).`);let o=n?.url_from_agent;return t.push(``,`Trust this block over guessing: do not assume any other URLs are running.`),o&&t.push(`In particular, ${o} inside your sandbox is the Agent Server`,`you are running inside of — NOT the automation backend.`),t.push(`</RUNTIME_SERVICES>`),t.join(`
39
- `)}function Ee(e){let{host:t}=a();return`${t}/api/conversations/${e}`}function z(e){return`Conversation ${e.slice(0,5)}`}function B(e){let r=A(e.id),i=e.agent?.kind===`ACPAgent`,o=i?e.tags?.acpserver??e.agent?.acp_server??null:null;return{id:e.id,created_by_user_id:null,selected_repository:r?.selected_repository??null,selected_branch:r?.selected_branch??null,git_provider:r?.git_provider??null,selected_workspace:r?.selected_workspace??null,active_profile:r?.active_profile??null,title:e.title?.trim()?e.title:z(e.id),trigger:null,pr_number:[],agent_kind:i?`acp`:`openhands`,acp_server:o,launched_agent_profile:e.launched_agent_profile??null,llm_model:i?x({runtimeName:e.current_model_name,runtimeId:e.current_model_id,configured:e.agent?.acp_model,sdkLlm:e.agent?.llm?.model}):e.agent?.llm?.model??v.llm_model,metrics:e.metrics?{accumulated_cost:e.metrics.accumulated_cost??null,max_budget_per_task:e.metrics.max_budget_per_task??null,accumulated_token_usage:e.metrics.accumulated_token_usage?{prompt_tokens:e.metrics.accumulated_token_usage.prompt_tokens??0,completion_tokens:e.metrics.accumulated_token_usage.completion_tokens??0,cache_read_tokens:e.metrics.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:e.metrics.accumulated_token_usage.cache_write_tokens??0,context_window:e.metrics.accumulated_token_usage.context_window??0,per_turn_token:e.metrics.accumulated_token_usage.per_turn_token??0}:null}:null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??t.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:Ee(e.id),session_api_key:a().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??n()},public:!1,sub_conversation_ids:[]}}function De(e){return{items:e.items.map(B),next_page_id:e.next_page_id??null}}var Oe=`acpserver`,ke=`gAAAAA`,Ae=new Set([`schema_version`,`agent_settings`,`workspace`,`conversation_id`,`initial_message`,`plugins`]);function V(e){return!e||typeof e!=`object`||Array.isArray(e)?{}:structuredClone(e)}function H(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function U(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function W(e){return typeof e==`string`?e.startsWith(ke):Array.isArray(e)?e.some(W):U(e)?Object.values(e).some(W):!1}function je(e){return U(e)?Object.values(e).some(W):!1}function Me(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function Ne(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function Pe(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function G(e,t){return e===L?Se()&&i(e):e===R?t.enable_sub_agents===!0&&i(e):!0}function Fe(e){let t=new Map;for(let n of xe)G(n,e)&&t.set(n,{name:n,params:{}});for(let n of[L,R])G(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>Pe(e)))for(let r of n)G(r.name,e)&&t.set(r.name,{name:r.name,params:V(r.params)});return Array.from(t.values())}function Ie(e,t){let n=[e?.trim(),t?.trim()].filter(Boolean);return n.length===0?null:{role:`user`,content:[{type:`text`,text:n.join(`
40
-
41
- `)}],run:!0}}function Le(){return b.map(e=>{let t=e.triggers?.length>0?{type:`keyword`,keywords:e.triggers}:null,n=`/home/runner/work/agent-canvas/agent-canvas/node_modules/@openhands/extensions/skills/${e.name}/SKILL.md`;return{name:e.name,content:e.content,trigger:t,source:n,description:e.description??null,is_agentskills_format:!0,...e.license?{license:e.license}:{},...e.compatibility?{compatibility:e.compatibility}:{}}})}function K(e){let t=Te(),n=V(e.agent_context),r=[...Array.isArray(n.skills)?n.skills:[],...Le()];return{...n,skills:r,load_public_skills:!1,load_user_skills:!0,load_project_skills:!0,...t?{system_message_suffix:t}:{}}}function q(e){return V(e.agent_settings).agent_kind===`acp`}function Re(e){let t=V(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function ze(e){let t=e.acp_command;if(!(Array.isArray(t)&&t.length===0)&&t!==void 0)return t;let n=C(typeof e.acp_server==`string`?e.acp_server:void 0);return n?[...n.default_command]:t}function Be(e){let t=V(e.agent_settings),n={agent_kind:`acp`,agent_context:K(t)};for(let e of g){if(e===`acp_model`||e===`acp_env`)continue;let r=e===`acp_command`?ze(t):t[e];r!=null&&(n[e]=r)}let r=V(t.mcp_config);Object.keys(r).length>0&&(n.mcp_config=r);let i=typeof t.acp_server==`string`?t.acp_server:void 0,a=x({configured:t.acp_model,providerDefault:S(i)});return a&&(n.acp_model=a),n}function Ve(e){let t=V(e.agent_settings),n=V(t.llm);n.model=typeof n.model==`string`&&n.model.trim().length>0?n.model:v.llm_model,n.stream=!0;let r=H(n.api_key);r?n.api_key=r:delete n.api_key;let i=H(n.base_url);i?n.base_url=i:delete n.base_url,w(n)?(n.auth_type=re,n.subscription_vendor=ne,delete n.api_key,delete n.base_url):(delete n.auth_type,delete n.subscription_vendor);let a=V(t.mcp_config);Object.keys(a).length===0&&delete t.mcp_config,delete t.acp_server;for(let e of g)delete t[e];return delete t.acp_env,{...t,llm:n,agent_context:K(t),tools:Fe(t)}}function He(e){return q(e)?Be(e):Ve(e)}function Ue(e){let{settings:t,query:r,conversationInstructions:i,plugins:a,workingDir:o}=e,s=V(t.conversation_settings),c=Ie(r,i);return Ae.forEach(e=>delete s[e]),{...s,workspace:{kind:`LocalWorkspace`,working_dir:o??n()},...c?{initial_message:c}:{},...a?.length?{plugins:a.map(e=>({source:e.source,...e.ref?{ref:e.ref}:{},...e.repo_path?{repo_path:e.repo_path}:{}}))}:{}}}function We(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=q(t),r=e.agentProfileId?e.agentProfileKind:n?`acp`:`openhands`,i=He(t),a=n?Re(t):void 0,o=Ue(e.encryptedConversationSettings?{...e,settings:{...e.settings,conversation_settings:e.encryptedConversationSettings}}:e),s={...e.agentProfileId?{agent_profile_id:e.agentProfileId}:{agent_settings:i},workspace:o.workspace,client_tools:r===`openhands`?[be]:[],confirmation_policy:Me(o),max_iterations:typeof o.max_iterations==`number`?o.max_iterations:500,stuck_detection:!0,autotitle:!0,worktree:e.worktree??!0};!e.agentProfileId&&a&&(s.tags={[Oe]:a}),!e.agentProfileId&&e.secretsEncrypted&&(!n||je(i.mcp_config))&&(s.secrets_encrypted=!0),e.conversationId&&(s.conversation_id=e.conversationId);let c=Ne(o);c&&(s.security_analyzer=c),o.initial_message&&(s.initial_message=o.initial_message),o.plugins&&(s.plugins=o.plugins),o.hook_config&&(s.hook_config=o.hook_config);let u={...o.tool_module_qualnames??{}};if(delete u[ae],delete u[T],Object.keys(u).length>0&&(s.tool_module_qualnames=u),o.agent_definitions&&(s.agent_definitions=o.agent_definitions),e.customSecrets&&e.customSecrets.length>0){let t=l(),n=t?ye(t):{},r={};for(let t of e.customSecrets){let e={kind:`LookupSecret`,url:`/api/settings/secrets/${encodeURIComponent(t.name)}`,description:t.description};Object.keys(n).length>0&&(e.headers=n),r[t.name]=e}s.secrets=r}return s}var Ge=`Connect your ChatGPT subscription before starting a conversation with this LLM profile.`;async function Ke(e){if(w(V(e.llm))&&!(await ie.getOpenAIStatus()).connected)throw Error(Ge)}async function qe(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-Ch7RH8eH.js`).then(e=>e.n);return{SecretsService:e}},__vite__mapDeps([0,1,2,3,4,5])),[r,i]=await Promise.all([ee.getSettingsForConversation(),n.getSecrets()]),{agentSettings:a,conversationSettings:o,secretsEncrypted:s}=r;return t.agentProfileId||await Ke(a),We({...t,encryptedAgentSettings:a,encryptedConversationSettings:o,secretsEncrypted:s,customSecrets:i})}function Je(){return{hooks:[]}}var Ye=`1970-01-01T00:00:00.000Z`,Xe=`Unable to load conversations because the selected agent server returned data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`;function J(){return Error(Xe)}function Y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ze(e){return typeof e==`number`?e:null}function X(e){return typeof e==`number`?e:0}function Z(e){return typeof e==`string`?e:null}function Qe(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:Ye}function $e(e){return Y(e)?{prompt_tokens:X(e.prompt_tokens),completion_tokens:X(e.completion_tokens),cache_read_tokens:X(e.cache_read_tokens),cache_write_tokens:X(e.cache_write_tokens),context_window:X(e.context_window),per_turn_token:X(e.per_turn_token)}:null}function et(e){return Y(e)?{accumulated_cost:Ze(e.accumulated_cost),max_budget_per_task:Ze(e.max_budget_per_task),accumulated_token_usage:$e(e.accumulated_token_usage)}:null}function tt(e){if(!Y(e))return null;let t=Y(e.llm)?{model:Z(e.llm.model)}:null;return{kind:Z(e.kind),acp_server:Z(e.acp_server),acp_model:Z(e.acp_model),llm:t}}function nt(e){return Y(e)?{working_dir:Z(e.working_dir)}:null}function rt(e){if(!Y(e))return null;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function it(e){if(!Y(e))return null;let{agent_profile_id:t,revision:n}=e;return typeof t!=`string`||typeof n!=`number`?null:{agent_profile_id:t,revision:n}}function at(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(n&&n!==`.`)if(n===`..`){if(!t.length)return null;t.pop()}else t.push(n);return`/${t.join(`/`)}`}function ot(e,t){let n=at(e),r=at(t);if(!n||!r||n!==r&&!n.startsWith(`${r}/`))throw Error(`Conversation file path must stay inside the workspace`);return n}function st(e){if(!Y(e)||typeof e.id!=`string`||!e.id.trim())throw J();return{id:e.id.trim(),title:Z(e.title),created_at:Qe(e,`created_at`,`createdAt`),updated_at:Qe(e,`updated_at`,`updatedAt`),execution_status:Z(e.execution_status),sandbox_status:Z(e.sandbox_status),metrics:et(e.metrics),agent:tt(e.agent),workspace:nt(e.workspace),tags:rt(e.tags),launched_agent_profile:it(e.launched_agent_profile),current_model_id:Z(e.current_model_id),current_model_name:Z(e.current_model_name)}}function Q(e){if(!Array.isArray(e))throw J();return e.map(st)}function ct(e){if(Array.isArray(e))return{items:Q(e),next_page_id:null};if(!Y(e))throw J();return{items:Q(e.items),next_page_id:typeof e.next_page_id==`string`?e.next_page_id:null}}var lt=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function ut(e){let t=e??`idle`;return lt.has(t)?t:`idle`}function $(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var dt=class{static async sendMessage(e,t,n){let i=r().backend,o=n?.conversationUrl??null,c=n?.sessionApiKey??null;if(i.kind===`cloud`){if(!o||!c){let[t]=await F([e]);o=t?.conversation_url?.trim()??null,c=t?.session_api_key?.trim()??null}if(!o||!c)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await _({backend:i,method:`POST`,hostOverride:s(o),path:`/api/conversations/${e}/events`,body:{...t,run:!0},authMode:`session-api-key`,sessionApiKey:c}),t}return await new u(a({conversationUrl:o,sessionApiKey:c})).sendEvent(e,t,{run:!0}),t}static async createConversation(e,t,n,i,s,d,f,p,m,h,g){if(r().backend.kind===`cloud`)return fe({initial_message:e?{role:`user`,content:[{type:`text`,text:e}]}:null,title:t??null,selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,plugins:n??null,parent_conversation_id:f??null,agent_type:p,sandbox_id:m??null,agent_profile_id:h??null});let _=await ee.getSettings(),v=y(),te=await le(s??o(v)),b=d??(s?`local_repo`:`new_worktree`),x=await qe({settings:_,query:e,conversationInstructions:t,plugins:n,conversationId:v,workingDir:te,worktree:b===`new_worktree`,agentProfileId:h,agentProfileKind:g}),S=await new u(a()).createConversation(x),C=l();if(!C)throw new c;return(i?.selected_repository||s)&&j(S.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:s??null,workspace_mode:b}),{id:S.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:S.id,agent_server_url:C.host,request:{initial_message:x.initial_message,plugins:n??null},created_at:S.created_at,updated_at:S.updated_at}}static async getStartTask(e){return r().backend.kind===`cloud`?ve(e):null}static async getVSCodeUrl(e,t,n){let r=await this.resolveConversationWorkingDir(e);return{vscode_url:await new d(a({conversationUrl:t,sessionApiKey:n})).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:r})}}static async resolveConversationWorkingDir(e){let[t]=await this.batchGetAppConversations([e]);return t?.workspace?.working_dir??n()}static async batchGetAppConversations(e){return e.length===0?[]:r().backend.kind===`cloud`?F(e):Q(await new u(a()).getConversations(e)).map(e=>B(e))}static async updateConversationPublicFlag(e,t){if(r().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return he(e,t)}static async updateConversationRepository(e,t,n,r){t?j(e,{...A(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):M(e);let[i]=await this.batchGetAppConversations([e]);return $(i,e)}static async readConversationFile(e,t){if(r().backend.kind===`cloud`)return I(e,ot(t??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let n=await this.resolveConversationWorkingDir(e),i=ot(t??`${n}/.agents_tmp/PLAN.md`,n);return new p(a()).downloadTextFile(i)}static async downloadConversation(e){return r().backend.kind===`cloud`?pe(e):new p(a()).downloadTrajectory(e)}static async getHooks(e){return Je()}static async getRuntimeConversation(e,t,n){let i=r().backend,o=i.kind===`cloud`&&t?await _({backend:i,method:`GET`,hostOverride:s(t),path:`/api/conversations/${e}`,authMode:`session-api-key`,sessionApiKey:n}):await new u(a({conversationUrl:t,sessionApiKey:n})).getConversation(e),c=st(o),l=Y(o)?o.stats:null;return{id:c.id,title:c.title?.trim()?c.title:z(c.id),metrics:et(c.metrics),created_at:c.created_at,updated_at:c.updated_at,status:ut(c.execution_status),stats:Y(l)?l:{usage_to_metrics:{}}}}static async searchConversations(e=20,t){return r().backend.kind===`cloud`?de(e,t):De(ct(await new u(a()).searchConversations({limit:e,page_id:t,sort_order:h.UPDATED_AT_DESC})))}static async deleteConversation(e){r().backend.kind===`cloud`?await me(e):await new u(a()).deleteConversation(e),M(e)}static async updateConversationTitle(e,t){await new u(a()).updateConversation(e,{title:t});let[n]=await this.batchGetAppConversations([e]);return $(n,e)}static async forkConversation(e,t,n){if(r().backend.kind===`cloud`)throw Error(`Branching a conversation isn't supported on the cloud backend yet.`);let i=await new u(a()).forkConversation(e,{from_event_id:t,...n?{title:n}:{}}),o=A(e);return o&&j(i.id,o),i}static async getEventParentId(e,t){return(await new u(a()).getEvent(e,t)).parent_id??void 0}static async switchProfile(e,t){let{backend:n}=r();if(n.kind===`cloud`){if(!e){await te.activateProfile(t);return}await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_profile`,body:{profile_name:t}});return}if(!e){await new f(a()).activateProfile(t);return}let i=a(),o=new u(i),s=await new f(i).getProfile(t,{exposeSecrets:`encrypted`}),c=typeof s.config.model==`string`?s.config.model:``;if(!c)throw Error(`Profile '${t}' has no model.`);await Ke({llm:s.config}),await o.switchLLM(e,{...s.config,model:c,stream:!0,usage_id:`profile:${t}:${y()}`})}static async switchAcpModel(e,t){let{backend:n}=r();if(n.kind===`cloud`){await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_acp_model`,body:{model:t}});return}await new u(a()).switchAcpModel(e,t)}};export{_e as a,ue as c,I as i,le as l,F as n,A as o,ge as r,j as s,dt as t};
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{Ct as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{L as i,s as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{C as c,E as l,S as u}from"./active-backend-context-DHhm10VS.js";import{t as d}from"./utils-DB9LsAzA.js";import"./form-control-classes-CbdN5aO3.js";import{t as f}from"./brand-button-B1izLAdR.js";import{t as p}from"./settings-input-BsgQWS5R.js";import{r as m}from"./use-settings-BeJap6YL.js";import{c as h,i as ee,n as g,o as _,s as v,t as te}from"./acp-providers-DerAmTyY.js";import{t as ne}from"./use-save-settings-DiDEbIJw.js";import{d as re,h as ie,i as ae,m as oe}from"./sdk-settings-schema-CLR01YIK.js";import{n as se,r as ce}from"./schema-field-CwdqUOnE.js";import{t as y}from"./settings-dropdown-input-Dhx9ErGd.js";import{r as b}from"./typography-CzfoD9DY.js";import{t as le}from"./settings-switch-Bes8dIlV.js";import{a as x,i as ue,n as S,r as de,t as fe}from"./use-acp-credential-form-DHd_Id-q.js";var C=e(n(),1),w=r();function pe({form:e,providerKey:t}){let{t:n}=o(`openhands`),{fields:r,values:i,setValue:a,secretExists:c,conflicts:l}=e,{status:u,isChecking:d}=S(t),f=h(t)??t;return r.length===0?null:(0,w.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,w.jsx)(b.Text,{className:`text-sm font-medium text-white`,children:n(s.SETTINGS$ACP_CREDENTIALS_TITLE)}),(0,w.jsx)(b.Text,{className:`text-xs text-[#717888]`,children:n(s.SETTINGS$ACP_CREDENTIALS_DESCRIPTION)})]}),(0,w.jsx)(ue,{status:u,isChecking:d,providerName:f,testIdPrefix:`settings-acp-auth`}),(0,w.jsx)(`div`,{className:`flex flex-col gap-5`,children:r.map(e=>(0,w.jsx)(de,{field:e,value:i[e.name]??``,onChange:t=>a(e.name,t),alreadySet:c(e.name),testId:`settings-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,w.jsx)(x,{conflicts:l})]})}var T=t(((e,t)=>{var n=[`||`,`&&`,`;;`,`|&`,`<(`,`<<<`,`>>`,`>&`,`<&`,`&`,`;`,`(`,`)`,`|`,`<`,`>`],r=/[\n\r\u2028\u2029]/,i=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(e){return e.map(function(e){if(e===``)return`''`;if(e&&typeof e==`object`){if(e.op===`glob`){if(typeof e.pattern!=`string`)throw TypeError("glob token requires a string `pattern`");if(r.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(i,`\\$&`)}if(typeof e.op==`string`){if(n.indexOf(e.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,`\\$&`)}if(typeof e.comment==`string`){if(r.test(e.comment))throw TypeError("`comment` must not contain line terminators");return`#`+e.comment}throw TypeError(`unrecognized object token shape`)}return/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,`$1\\$2`)}).join(` `)}})),E=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r.push(i),t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function ee(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function g(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var g=!1;return m.map(function(n){var i=n[0];if(!i||g)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return ee(t,``,n)}for(m=0;m<i.length;m++){var _=i.charAt(m);if(p||=!a&&(_===`*`||_===`?`),o)d+=_,o=!1;else if(a)_===a?a=!1:a==c?d+=_:_===f?(m+=1,_=i.charAt(m),_===l||_===f||_===u?d+=_:d+=f+_):_===u?d+=h():d+=_;else if(_===l||_===c)a=_;else if(r.test(_))return{op:i};else if(s.test(_)){g=!0;var v={comment:e.slice(n.index+m+1)};return d.length?[d,v]:[v]}else _===f?o=!0:_===u?d+=h():d+=_}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0?e:e.concat(t)},[])}t.exports=function(e,t,n){var r=g(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e.concat(t);var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?e.concat(n[0]):e.concat(n.filter(Boolean).map(function(e){return m.test(e)?JSON.parse(e.split(d)[1]):e}))},[]):r}})),{quote:D}=e(t((e=>{e.quote=T(),e.parse=E()}))(),1);function O(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
2
- `||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var k=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function A(e){return e.map(e=>k.test(e)||e===``?D([e]):e).join(` `)}var j={hideTitle:!0},me=`enable_sub_agents`,he=`tool_concurrency_limit`,ge=`npx -y <package-name>`,M=`__custom_model__`;function _e(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function N(e,t){let n=O(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return te}function ve(e){return e?.find(e=>e.key===me)}function ye(e,t){return typeof e==`boolean`?e:t?.default===!0}function be(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function xe(e){let{isAcp:t,selectedPreset:n,isDefaultProviderCommand:r,commandTokens:i,acpModel:a,subAgentsEnabled:o,toolConcurrencyField:s,toolConcurrency:c}=e;if(t){let e=r&&n!==`custom`;return{agent_kind:`acp`,acp_server:n,acp_model:a.trim()||null,acp_command:e?null:A(i)||null,acp_args:null}}let l={agent_kind:`openhands`,enable_sub_agents:o};if(s){let e=ae(s,c),t=typeof s.default==`number`?s.default:1;l.tool_concurrency_limit=e==null?t:Number(e)}return l}function P({embedded:e=!1,agentSettingsOverride:t=null,onSaveControlChange:n}={}){let{t:r}=o(`openhands`),{data:i,isLoading:a}=m(),h=t??i?.agent_settings??null,{mutate:x,isPending:ue}=ne(),{data:S}=ce(i?.agent_settings_schema),de=C.useMemo(()=>S?.sections.flatMap(e=>e.fields),[S]),T=ve(de),E=C.useMemo(()=>ye(h?.[me],T),[T,h]),[D,k]=(0,C.useState)(E),j=de?.find(e=>e.key===he),P=C.useMemo(()=>{if(!j)return``;let e=h?.[he];return re(j,e)},[j,h]),[F,Se]=(0,C.useState)(P),[I,L]=(0,C.useState)(`openhands`),[R,z]=(0,C.useState)(``),[B,V]=(0,C.useState)(``),[Ce,H]=(0,C.useState)(!1),[we,U]=(0,C.useState)(!1),W=I===`acp`?N(R,g):null,G=fe(W&&W!==`custom`?W:null),Te=(0,C.useRef)(null),K=(0,C.useRef)(null),q=(0,C.useRef)(``);(0,C.useEffect)(()=>{let e=t??i?.agent_settings??null;if(!e&&!i)return;let n=t??i;if(Te.current!==n){if(Te.current=n,e?.agent_kind===`acp`){L(`acp`);let t=e?.acp_server,n=typeof t==`string`?t:void 0,r=v(n),i=_e(e?.acp_command),a=[...i.length>0?i:r?.default_command??[],..._e(e?.acp_args)],o=a.length>0?A(a):``;z(o),K.current=n??null,q.current=o;let s=e?.acp_model,c=typeof s==`string`?s.trim():``;V(c||_(n)||``),H(!!c&&(!r||!be(r,c)))}else L(`openhands`),z(``),V(``),K.current=null,q.current=``,H(!1);U(!1)}},[i,t]),(0,C.useEffect)(()=>{k(E)},[E]),(0,C.useEffect)(()=>{Se(P)},[P]);let Ee=(0,C.useRef)(()=>({agent_kind:`openhands`,enable_sub_agents:!1})),De=(0,C.useCallback)(()=>Ee.current(),[]),J=(0,C.useRef)(G);J.current=G;let Oe=(0,C.useCallback)(e=>J.current.save(e),[]),ke=(0,C.useCallback)(()=>J.current.reset(),[]),Ae=I===`acp`&&O(R).length===0,je=G.isDirty;if((0,C.useEffect)(()=>{!e||!n||n({agentType:I,isValid:!Ae,buildAgentProfileFields:De,credentials:{isDirty:je,save:Oe,reset:ke}})},[e,n,I,Ae,je,De,Oe,ke]),a)return null;let Y=I===`acp`,X=O(R),Me=Y&&X.length===0,Z=N(R,g),Q=v(Z),Ne=Q?.available_models??[],Pe=Ne.length>0,Fe=be(Q,B),Ie=Ce||!Fe?M:B,Le=!!Q&&X.join(` `)===Q.default_command.join(` `),Re=A(g[0]?.default_command??[])||ge;Ee.current=()=>xe({isAcp:Y,selectedPreset:Z,isDefaultProviderCommand:Le,commandTokens:X,acpModel:B,subAgentsEnabled:D,toolConcurrencyField:j,toolConcurrency:F});let ze=we||!Y&&(D!==E||F!==P),Be=G.isDirty,Ve=ze||Be,$=ue||G.isSaving,He=async()=>{if(G.isDirty){if(!await G.save({silent:ze}))return;G.reset()}if(ze)if(Y){let e=!!(Q&&Le),t=K.current,n=R===q.current,i=!!t&&t!==`custom`&&!g.some(e=>e.key===t),a=Y&&n&&i,o=ee(a?t:Q&&Le?Q.key:te,{command:e?[]:X,model:B.trim()||void 0,allowUnknownServer:a});if(!o)return;x({agent_settings_diff:o},{onError:e=>{u(l(e)||r(s.ERROR$GENERIC))},onSuccess:()=>{c(r(s.SETTINGS$SAVED)),U(!1)}})}else{let e={agent_kind:`openhands`,enable_sub_agents:D};if(j){let t;try{t=ae(j,F)}catch(e){u(e instanceof Error?e.message:r(s.ERROR$GENERIC));return}t!=null&&(e[he]=t)}x({agent_settings_diff:e},{onError:e=>{u(l(e)||r(s.ERROR$GENERIC))},onSuccess:()=>{c(r(s.SETTINGS$SAVED)),U(!1)}})}},Ue=T?ie(r,T.key,T.label):r(s.SCHEMA$ENABLE_SUB_AGENTS$LABEL),We=T?oe(r,T.key,T.description):r(s.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION);return(0,w.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[!e&&(0,w.jsxs)(`div`,{children:[(0,w.jsx)(b.H2,{className:`mb-2`,children:r(s.SETTINGS$NAV_AGENT)}),(0,w.jsx)(b.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:r(s.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,w.jsx)(y,{testId:`agent-type-selector`,name:`agent-type`,label:r(s.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:r(s.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:r(s.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:I,onSelectionChange:e=>{if(!e)return;let t=e;if(L(t),t===`acp`&&!R){let e=g[0];e&&(z(A(e.default_command)),V(_(e.key)??``),H(!1))}else t===`openhands`&&H(!1);U(!0)}}),!Y&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,w.jsx)(le,{testId:`agent-settings-enable-sub-agents`,isToggled:D,onToggle:e=>{k(e)},children:Ue}),We?(0,w.jsx)(b.Paragraph,{className:d(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:We}):null]}),!Y&&j?(0,w.jsx)(se,{field:j,value:F,isDisabled:$,onChange:Se}):null,Y&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(y,{testId:`agent-preset-selector`,name:`agent-preset`,label:r(s.SETTINGS$AGENT_PRESET),items:[...g.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:r(s.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Z,onSelectionChange:e=>{if(!e)return;let t=String(e),n=v(t);n?(z(A(n.default_command)),V(_(t)??``),H(!1)):t===`custom`&&(z(``),V(``),H(!0)),U(!0)}}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,w.jsx)(b.Text,{className:`text-sm`,children:r(s.SETTINGS$AGENT_COMMAND)}),(0,w.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:R,placeholder:Re,onChange:e=>{let t=e.target.value,n=N(R,g),r=N(t,g);r!==n&&(V(_(r)??``),H(!1)),z(t),U(!0)}}),(0,w.jsx)(b.Text,{className:`text-xs text-[#717888]`,children:r(s.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[Pe&&(0,w.jsx)(y,{testId:`agent-model-selector`,name:`agent-model`,label:r(s.SETTINGS$AGENT_MODEL),items:[...Ne.map(e=>({key:e.id,label:e.label})),{key:M,label:r(s.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Ie,onSelectionChange:e=>{if(!e)return;let t=String(e);t===M?(H(!0),V(``)):(H(!1),V(t)),U(!0)}}),Ie===M&&(0,w.jsx)(p,{testId:`agent-model-input`,label:r(Pe?s.SETTINGS$AGENT_CUSTOM_MODEL:s.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:B,showOptionalTag:!0,onChange:e=>{V(e),U(!0)}}),(0,w.jsx)(b.Text,{className:`text-xs text-[#717888]`,children:r(s.SETTINGS$AGENT_MODEL_HINT)})]})]}),Y&&Z!==`custom`&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`hr`,{className:`border-[#3D4046]`}),(0,w.jsx)(pe,{form:G,providerKey:Z})]}),!e&&(0,w.jsx)(`div`,{children:(0,w.jsx)(f,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:$||!Ve||Me,onClick:He,children:r($?s.SETTINGS$SAVING:s.SETTINGS$SAVE_CHANGES)})})]})}var F=i(function(){return(0,w.jsx)(a,{to:`/settings/agents`,replace:!0})});export{O as i,F as n,j as r,P as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./agent-settings-GwiXe_6k.js";export{e as default,t as handle};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{r as a}from"./active-backend-context-DHhm10VS.js";import{t as o}from"./utils-DB9LsAzA.js";import{S as s,c,d as l}from"./agent-server-compatibility-C0MtTTwb.js";import{d as u}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{r as d,t as f}from"./modal-body-Cc2zp0xb.js";import{t as p}from"./brand-button-B1izLAdR.js";import{n as m,o as h}from"./backend-form-modal-B8GtBA-J.js";var g=e(t(),1),_=n();function v(){let{t:e}=r(`openhands`),{active:t,addBackend:n,updateBackend:v}=a(),y=window.location.origin,[b,x]=g.useState(!1),[S,C]=g.useState(`idle`),[w,T]=g.useState(null),E=g.useCallback(async r=>{x(!0),C(`idle`),T(null);try{await new u(l({host:r.host,sessionApiKey:r.apiKey,timeout:5e3})).getSettings(),C(`success`),s(t.backend)?n(r):v(t.backend.id,r),window.location.reload()}catch(t){if(C(`error`),c(t,401))T(e(i.AUTH$INVALID_KEY));else{let n=t instanceof Error?t.message:String(t);T(`${e(i.AUTH$CONNECTION_FAILED)}${n?`: ${n}`:``}`)}x(!1)}},[t.backend,n,v,e]);return(0,_.jsx)(`div`,{"data-testid":`api-key-entry-screen`,className:`flex min-h-screen items-center justify-center bg-base px-6`,children:(0,_.jsxs)(`div`,{className:o(`relative rounded-xl border border-[var(--oh-border)] bg-base-secondary`,d(`md`),f),children:[(0,_.jsx)(`div`,{className:`px-6 pt-6 pb-2 pr-12`,children:(0,_.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(i.BACKEND$ADD_TITLE)})}),(0,_.jsx)(`div`,{className:`px-6 pb-6 pt-2`,children:(0,_.jsx)(m,{mode:`add`,backend:{...t.backend,host:y,apiKey:``,name:``},onSubmitted:()=>{},testIdRoot:`api-key-entry`,hostReadOnly:!0,requireApiKey:!0,onSubmitOverride:E,renderActions:({canSubmit:t,testIdRoot:n})=>(0,_.jsxs)(_.Fragment,{children:[S!==`idle`&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,_.jsx)(h,{isConnected:S===`success`}),(0,_.jsx)(`span`,{"data-testid":`${n}-status`,className:S===`error`?`text-red-400`:`text-green-400`,children:S===`error`?w:e(i.ONBOARDING$BACKEND_STATUS_CONNECTED)})]}),(0,_.jsx)(p,{type:`submit`,variant:`secondary`,isDisabled:!t||b,testId:`${n}-submit`,className:`w-full text-center`,children:e(b?i.ONBOARDING$BACKEND_STATUS_CHECKING:i.BACKEND$CONNECT)})]})})})]})})}export{v as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{C as o,E as s,S as c,j as l}from"./active-backend-context-DHhm10VS.js";import{c as u}from"./telemetry-SHxpVxk8.js";import{t as d}from"./brand-button-B1izLAdR.js";import{i as f,n as p,r as m,t as h}from"./color-themes-CHizm1xF.js";import{t as g}from"./settings-input-BsgQWS5R.js";import{t as _}from"./settings-mQUckT0g.js";import{r as v}from"./use-settings-BeJap6YL.js";import{t as y}from"./use-save-settings-DiDEbIJw.js";import{t as b}from"./settings-dropdown-input-Dhx9ErGd.js";import{n as x,t as S}from"./switch-skeleton-DqQwalyu.js";import{t as C}from"./settings-switch-Bes8dIlV.js";var w=e(t(),1),T=n();function E({defaultKey:e,onChange:t,name:n}){let{t:r}=i(`openhands`);return(0,T.jsx)(b,{testId:n,name:n,onInputChange:t,label:r(a.SETTINGS$LANGUAGE),items:l.map(e=>({key:e.value,label:e.label})),defaultSelectedKey:e,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function D(){let{t:e}=i(`openhands`),t=w.useCallback(e=>{if(!e)return;let t=e;p(t),m(t)},[]);return(0,T.jsx)(b,{testId:`color-theme-input`,name:`color-theme-input`,label:e(a.SETTINGS$COLOR_THEME),items:h.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:f(),onSelectionChange:t,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function O(){return(0,T.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,T.jsx)(x,{}),(0,T.jsx)(S,{}),(0,T.jsx)(S,{})]})}function k(){let{t:e}=i(`openhands`),{mutate:t,isPending:n}=y(),{data:r,isLoading:f}=v(),[p,m]=w.useState(!1),[h,b]=w.useState(!1),[x,S]=w.useState(!1),[k,A]=w.useState(!1),[j,M]=w.useState(!1),N=n=>{let r=n.get(`language-input`)?.toString(),i=l.find(({label:e})=>e===r)?.value||_.language,d=n.get(`enable-analytics-switch`)?.toString()===`on`;t({language:i,user_consents_to_analytics:d,enable_sound_notifications:n.get(`enable-sound-notifications-switch`)?.toString()===`on`,git_user_name:n.get(`git-user-name-input`)?.toString()||_.git_user_name,git_user_email:n.get(`git-user-email-input`)?.toString()||_.git_user_email},{onSuccess:()=>{u(d?`granted`:`denied`),o(e(a.SETTINGS$SAVED))},onError:t=>{c(s(t)||e(a.ERROR$GENERIC))},onSettled:()=>{m(!1),b(!1),S(!1),A(!1),M(!1)}})},P=e=>{let t=l.find(({label:t})=>t===e)?.label,n=l.find(({value:e})=>e===r?.language)?.label;m(t!==n)},F=e=>{b(e!==(r?.user_consents_to_analytics??!0))},I=e=>{S(e!==!!r?.enable_sound_notifications)},L=e=>{let t=r?.git_user_name;A(e!==t)},R=e=>{let t=r?.git_user_email;M(e!==t)},z=!p&&!h&&!x&&!k&&!j,B=!r||f||n;return(0,T.jsxs)(`form`,{"data-testid":`app-settings-screen`,action:N,className:`flex flex-col gap-6`,children:[B&&(0,T.jsx)(O,{}),!B&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,T.jsx)(E,{name:`language-input`,defaultKey:r.language,onChange:P}),(0,T.jsx)(D,{}),(0,T.jsx)(C,{testId:`enable-analytics-switch`,name:`enable-analytics-switch`,defaultIsToggled:r.user_consents_to_analytics??!0,onToggle:F,children:e(a.ANALYTICS$SEND_ANONYMOUS_DATA)}),(0,T.jsx)(C,{testId:`enable-sound-notifications-switch`,name:`enable-sound-notifications-switch`,defaultIsToggled:!!r.enable_sound_notifications,onToggle:I,children:e(a.SETTINGS$SOUND_NOTIFICATIONS)}),(0,T.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,T.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:e(a.SETTINGS$GIT_SETTINGS)}),(0,T.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(a.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,T.jsx)(g,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:e(a.SETTINGS$GIT_USERNAME),defaultValue:r.git_user_name||``,onChange:L,placeholder:e(a.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,T.jsx)(g,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:e(a.SETTINGS$GIT_EMAIL),defaultValue:r.git_user_email||``,onChange:R,placeholder:e(a.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,T.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,T.jsxs)(d,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:n||z,children:[!n&&e(a.SETTINGS$SAVE_CHANGES),n&&e(a.SETTINGS$SAVING)]})})]})]})]})}var A=r(k);export{A as default};
@@ -1,2 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{c as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as o}from"./useMutation-u8UgRgDK.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{C as u,S as d,n as f}from"./active-backend-context-DHhm10VS.js";import{t as p}from"./utils-DB9LsAzA.js";import{_ as m,u as h,y as g}from"./agent-server-compatibility-C0MtTTwb.js";import{t as _}from"./proxy-G4ce0fnQ.js";import{r as v}from"./modal-classes-3qT9Ap7Q.js";import{f as ee,l as te}from"./form-control-classes-CbdN5aO3.js";import{t as y}from"./brand-button-B1izLAdR.js";import{r as b,u as x}from"./dropdown-classes-D3wMJlXT.js";import{t as S}from"./settings-input-BsgQWS5R.js";import{t as C}from"./use-tracking-DFoPQUSU.js";import{t as ne}from"./use-llm-profiles-CgRtnj74.js";import{n as w,t as T}from"./context-menu-list-item-6psNyl7X.js";import{t as E}from"./settings-dropdown-input-Dhx9ErGd.js";import{t as D}from"./x-mark-Batp6gXa.js";import{t as O}from"./automation-LZB0MjdV.js";var k=e(t()),re=e(r(),1),A=n();function j(e,t){let n=a.isAxiosError(e)?e.response?.data:e instanceof Error&&`response`in e?e.response:void 0;if(n&&typeof n==`object`){let{message:e,detail:t}=n;if(typeof e==`string`&&e)return e;if(typeof t==`string`&&t)return t}return e instanceof Error&&e.message?e.message:t}var M=`/api/automation`,N=a.create();N.interceptors.request.use(e=>{if(e.baseURL)return e;let t=g();if(!t)throw new h;e.baseURL=t.host;let n=t.apiKey?.trim();return n&&e.headers.set(`X-Session-API-Key`,n),e});function P(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function ie(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function ae(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function oe(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let t=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:`github`}}]:void 0;return{path:`${M}/v1/preset/${e.plugins?.length?`plugin`:`prompt`}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:`agent-canvas-import`,on:ae()},...e.model&&{model:e.model},...t&&{repos:t},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}function F(e){let t=e.apiKey.trim();return{baseURL:e.host,...t&&{headers:{"X-Session-API-Key":t}}}}function I(e){return e.orgId?{"X-Org-Id":e.orgId}:void 0}var L=class e{static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=m().backend;if(r.kind===`cloud`)return _({backend:r,method:`GET`,path:`${M}/v1?${P(t,n)}`});let{data:i}=await N.get(`${M}/v1`,{params:{limit:t,offset:n}});return i}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=m().backend,n=`${M}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`)return _({backend:t,method:`GET`,path:n});let{data:r}=await N.get(n);return r}static async createAutomation(e){let t=m(),{path:n,body:r}=oe(e),i;if(t.backend.kind===`cloud`)i=await _({backend:t.backend,method:`POST`,path:n,body:r,headers:I(t)});else{let{data:e}=await N.post(n,r,F(t.backend));i=e}let a=`${M}/v1/${encodeURIComponent(i.id)}`,o={trigger:ie(e),enabled:!1};try{if(t.backend.kind===`cloud`)return await _({backend:t.backend,method:`PATCH`,path:a,body:o,headers:I(t)});let{data:e}=await N.patch(a,o,F(t.backend));return e}catch(e){try{t.backend.kind===`cloud`?await _({backend:t.backend,method:`DELETE`,path:a,headers:I(t)}):await N.delete(a,F(t.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(e,t){let n=m().backend,r=`${M}/v1/${encodeURIComponent(e)}`;if(n.kind===`cloud`)return _({backend:n,method:`PATCH`,path:r,body:t});let{data:i}=await N.patch(r,t);return i}static async deleteAutomation(e){let t=m().backend,n=`${M}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`){await _({backend:t,method:`DELETE`,path:n});return}await N.delete(n)}static async dispatchAutomation(e){let t=m().backend,n=`${M}/v1/${encodeURIComponent(e)}/dispatch`;if(t.kind===`cloud`)return _({backend:t,method:`POST`,path:n});let{data:r}=await N.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=m().backend,a=`${M}/v1/${encodeURIComponent(e)}/runs`;if(i.kind===`cloud`)return _({backend:i,method:`GET`,path:`${a}?${P(n,r)}`});let{data:o}=await N.get(a,{params:{limit:n,offset:r}});return o}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=m().backend,r=`${M}/v1/${encodeURIComponent(e)}/tarball`,i;if(n.kind===`cloud`)i=await _({backend:n,method:`GET`,path:r,responseType:`blob`});else{let{data:e}=await N.get(r,{responseType:`blob`});i=e}let a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t}.tar`,o.click(),URL.revokeObjectURL(a)}static async checkHealth(){let e=m().backend,t=`${M}/health`;try{if(e.kind===`cloud`)return await _({backend:e,method:`GET`,path:t,timeoutSeconds:5});let{data:n}=await N.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},R=[`automation-detail`],z=[`automation-runs`];function se(e){let{id:t,enabled:n=!0}=e,r=f();return s({queryKey:[...R,t,r.backend.id,r.orgId],queryFn:()=>L.getAutomation(t),staleTime:300*1e3,enabled:!!t&&n})}function ce(e){let{id:t,limit:n=20,offset:r=0,enabled:i=!0}=e,a=f();return s({queryKey:[...z,t,{limit:n,offset:r},a.backend.id,a.orgId],queryFn:()=>L.getAutomationRuns(t,n,r),staleTime:60*1e3,enabled:!!t&&i,refetchInterval:e=>{let t=e.state.data;return t&&t.runs.some(e=>e.status===O.PENDING||e.status===O.RUNNING)?3e3:!1}})}var B=[`automations`];function le(e={}){let{limit:t=50,offset:n=0,enabled:r=!0}=e,i=f();return s({queryKey:[...B,{limit:t,offset:n},i.backend.id,i.orgId],queryFn:()=>L.getAutomations(t,n),staleTime:0,enabled:r})}function ue(){let e=i(),t=f(),{trackAutomationDeactivated:n}=C();return o({mutationFn:({id:e,enabled:t})=>L.toggleAutomation(e,t),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:B}),e.invalidateQueries({queryKey:R}),i.enabled||n({backendKind:t.backend.kind})}})}function de(){let e=i(),t=f(),{trackAutomationImported:n}=C();return o({mutationFn:e=>L.createAutomation({...e,enabled:!1}),onSuccess:()=>{e.invalidateQueries({queryKey:B}),n({backendKind:t.backend.kind})}})}function fe(){let e=i(),t=f(),{trackAutomationEdited:n}=C();return o({mutationFn:({id:e,body:t})=>L.updateAutomation(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:B}),e.invalidateQueries({queryKey:R}),n({backendKind:t.backend.kind})}})}function pe(){let e=i(),t=f(),{trackAutomationDeleted:n}=C();return o({mutationFn:e=>L.deleteAutomation(e),onSuccess:()=>{e.invalidateQueries({queryKey:B}),n({backendKind:t.backend.kind})}})}function me(){let e=i(),t=f(),{trackAutomationExecuted:n}=C();return o({mutationFn:e=>L.dispatchAutomation(e),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:B}),e.invalidateQueries({queryKey:R}),e.invalidateQueries({queryKey:[...z,i]}),n({backendKind:t.backend.kind})}})}var he=[`automation-health`];function ge(){let e=f();return s({queryKey:[...he,e.backend.id,e.orgId],queryFn:()=>L.checkHealth(),staleTime:30*1e3,retry:!1})}var _e=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 20 20`,...e,children:(0,A.jsx)(`path`,{d:`M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z`})}),V=p(`inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,b),ve=p(`inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 text-xs text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,b);function ye({icon:e,label:t}){return(0,A.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,A.jsx)(`span`,{className:p(`[&_svg]:size-4`,x),"aria-hidden":!0,children:e}),(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}function be({items:e}){let{t}=c(`openhands`),[n,r]=(0,k.useState)(!1),[i,a]=(0,k.useState)(),o=(0,k.useRef)(null),s=(0,k.useRef)(null);(0,k.useLayoutEffect)(()=>{if(!n||!o.current)return;let e=()=>{let e=o.current?.getBoundingClientRect();e&&a({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[n]),(0,k.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;o.current?.contains(t)||s.current?.contains(t)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]);let u=n&&i?(0,A.jsx)(w,{ref:s,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,A.jsx)(`li`,{children:(0,A.jsx)(T,{onClick:t=>{t.stopPropagation(),e.onClick(),r(!1)},isDisabled:e.disabled,className:`group`,children:(0,A.jsx)(ye,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{ref:o,type:`button`,onClick:e=>{e.stopPropagation(),r(e=>!e)},className:V,"aria-label":t(l.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":n,"aria-haspopup":`menu`,children:(0,A.jsx)(_e,{className:`size-4`})}),n&&i&&typeof document<`u`?re.createPortal((0,A.jsx)(`div`,{style:i,children:u}),document.body):null]})}function xe(e){return!0}var Se=e=>(0,A.jsxs)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,A.jsx)(`g`,{clipPath:`url(#clip0_8467_30872)`,children:(0,A.jsx)(`path`,{d:`M6.26693 21.4874L6.25583 21.4951L6.24514 21.5033C5.95991 21.7227 5.5 21.5308 5.5 21.0996V2.89961C5.5 2.4684 5.95991 2.2765 6.24514 2.49592L6.25634 2.50452L6.26799 2.51249L19.518 11.5625L19.518 11.5625L19.5226 11.5656C19.8258 11.7677 19.8258 12.1815 19.5226 12.3836L19.5226 12.3835L19.5169 12.3874L6.26693 21.4874Z`,fill:`currentColor`,stroke:`currentColor`})}),(0,A.jsx)(`defs`,{children:(0,A.jsx)(`clipPath`,{id:`clip0_8467_30872`,children:(0,A.jsx)(`rect`,{width:24,height:24,fill:`white`})})})]}),Ce=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),we=e=>(0,A.jsx)(`svg`,{viewBox:`0 0 18 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,A.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.4375 9C2.4375 5.37563 5.37563 2.4375 9 2.4375C12.6244 2.4375 15.5625 5.37563 15.5625 9C15.5625 12.6244 12.6244 15.5625 9 15.5625C5.37563 15.5625 2.4375 12.6244 2.4375 9ZM4.13812 6.5625C4.81317 5.21867 6.02897 4.19333 7.49996 3.77204C7.15155 4.17641 6.85182 4.65395 6.60713 5.17892C6.40828 5.60556 6.24263 6.06975 6.11494 6.5625H4.13812ZM3.72196 7.6875C3.61778 8.10783 3.5625 8.54746 3.5625 9C3.5625 9.45254 3.61778 9.89217 3.72196 10.3125H5.89738C5.84161 9.88758 5.8125 9.44852 5.8125 8.99998C5.8125 8.55142 5.84161 8.11239 5.89737 7.6875H3.72196ZM7.0333 7.6875C6.97087 8.10689 6.9375 8.54634 6.9375 8.99998C6.9375 9.45367 6.97087 9.89313 7.0333 10.3125H10.9667C11.0291 9.89311 11.0625 9.45367 11.0625 9.00002C11.0625 8.54637 11.0291 8.1069 10.9667 7.6875H7.0333ZM12.1026 7.6875C12.1584 8.1124 12.1875 8.55145 12.1875 9.00002C12.1875 9.44858 12.1584 9.88762 12.1026 10.3125H14.278C14.3822 9.89217 14.4375 9.45254 14.4375 9C14.4375 8.54746 14.3822 8.10783 14.278 7.6875H12.1026ZM13.8619 6.5625H11.885C11.7574 6.06976 11.5917 5.6056 11.3929 5.17897C11.1482 4.65397 10.8484 4.1764 10.5 3.77203C11.971 4.19331 13.1868 5.21866 13.8619 6.5625ZM10.7171 6.5625H7.28293C7.38007 6.23971 7.49559 5.93571 7.62681 5.65419C7.99835 4.85708 8.48101 4.26914 8.99997 3.92442C9.51895 4.26913 10.0016 4.8571 10.3732 5.65424C10.5044 5.93575 10.6199 6.23973 10.7171 6.5625ZM4.13812 11.4375H6.11496C6.24963 11.9572 6.42655 12.4452 6.64015 12.8909C6.87835 13.3879 7.16685 13.8413 7.50006 14.228C6.02902 13.8067 4.81318 12.7814 4.13812 11.4375ZM10.7171 11.4375H7.28295C7.3869 11.7829 7.51191 12.1068 7.65465 12.4047C8.02305 13.1733 8.49456 13.7398 9.00007 14.0756C9.51902 13.7308 10.0017 13.1429 10.3732 12.3458C10.5044 12.0643 10.6199 11.7603 10.7171 11.4375ZM11.3929 12.8211C11.5917 12.3944 11.7574 11.9303 11.8851 11.4375H13.8619C13.1868 12.7813 11.971 13.8067 10.5 14.228C10.8485 13.8236 11.1482 13.346 11.3929 12.8211Z`,fill:`currentColor`})}),Te=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z`})}),Ee=/^(\d+)$/;function H(e,t,n){let r=e.match(Ee);if(!r)return null;let i=Number(r[1]);return Number.isNaN(i)||i<t||i>n?null:i}function De(e){let t=(e??``).trim();if(!t)return{kind:`custom`,raw:``};let n=t.split(/\s+/);if(n.length!==5)return{kind:`custom`,raw:t};let[r,i,a,o,s]=n,c=H(r,0,59),l=H(i,0,23);if(c===null||l===null)return{kind:`custom`,raw:t};if(a!==`*`||o!==`*`)return{kind:`custom`,raw:t,hour:l,minute:c};if(s===`*`||s===`0-6`)return{kind:`daily`,hour:l,minute:c};if(s===`1-5`)return{kind:`weekdays`,hour:l,minute:c};let u=H(s,0,6);return u===null?{kind:`custom`,raw:t,hour:l,minute:c}:{kind:`weekly`,hour:l,minute:c,weekday:u}}function Oe(e){let{kind:t,hour:n,minute:r,weekday:i}=e;switch(t){case`daily`:return`${r} ${n} * * *`;case`weekdays`:return`${r} ${n} * * 1-5`;case`weekly`:return`${r} ${n} * * ${i??1}`;default:return t}}function U(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function W(e){let t=e.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return Number.isNaN(n)||Number.isNaN(r)||n<0||n>23||r<0||r>59?null:{hour:n,minute:r}}function G(e){return e?Array.isArray(e)?e.join(`, `):e:`—`}var ke=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.636 5.636a9 9 0 1012.728 0M12 3v9`})}),Ae=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})}),K=e=>(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,...e,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z`})});function je({onRetry:e}){let{t}=c(`openhands`);return(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,A.jsx)(K,{className:`size-12 text-danger`}),(0,A.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:t(l.AUTOMATIONS$ERROR_TITLE)}),(0,A.jsx)(`button`,{type:`button`,onClick:e,className:`mt-4 rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:t(l.AUTOMATIONS$ERROR_RETRY)})]})}function Me({onRetry:e}){let{t}=c(`openhands`);return(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 px-4`,children:[(0,A.jsx)(K,{className:`size-12 text-[var(--oh-warning)]`}),(0,A.jsx)(`h2`,{className:`mt-4 text-lg font-medium text-content`,children:t(l.AUTOMATIONS$BACKEND_UNAVAILABLE_TITLE)}),(0,A.jsx)(`p`,{className:`mt-2 text-sm text-muted text-center max-w-md`,children:t(l.AUTOMATIONS$BACKEND_UNAVAILABLE_MESSAGE)}),(0,A.jsx)(y,{type:`button`,variant:`secondary`,className:`mt-6`,onClick:e,children:t(l.AUTOMATIONS$BACKEND_UNAVAILABLE_RETRY)})]})}function Ne({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:i}=c(`openhands`);return t?(0,A.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,A.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,A.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(l.BUTTON$CLOSE),children:(0,A.jsx)(D,{className:`size-5`})}),(0,A.jsx)(`h2`,{className:v,children:i(l.AUTOMATIONS$DELETE_CONFIRM_TITLE)}),(0,A.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:i(l.AUTOMATIONS$DELETE_CONFIRM_MESSAGE,{name:e})}),(0,A.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:i(l.AUTOMATIONS$CANCEL)}),(0,A.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:i(l.AUTOMATIONS$DELETE)})]})]})]}):null}var Pe=1800;function Fe(e){let t=e.trim();if(!t)return{value:null};let n=Number(t);return Number.isInteger(n)?n<=0?{errorKey:l.AUTOMATIONS$ERROR_TIMEOUT_POSITIVE}:n>1800?{errorKey:l.AUTOMATIONS$ERROR_TIMEOUT_MAX_EXCEEDED}:{value:n}:{errorKey:l.AUTOMATIONS$ERROR_TIMEOUT_INVALID_NUMBER}}var q=`__active__`,Ie=[l.AUTOMATIONS$WEEKDAY_SUN,l.AUTOMATIONS$WEEKDAY_MON,l.AUTOMATIONS$WEEKDAY_TUE,l.AUTOMATIONS$WEEKDAY_WED,l.AUTOMATIONS$WEEKDAY_THU,l.AUTOMATIONS$WEEKDAY_FRI,l.AUTOMATIONS$WEEKDAY_SAT];function Le(e){let t=e.timeout==null?``:String(e.timeout);if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``,timeout:t};let n=De(e.trigger.schedule);return n.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:n.hour!==void 0&&n.minute!==void 0?U(n.hour,n.minute):``,isCustomSchedule:!0,rawSchedule:n.raw,timeout:t}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:n.kind,weekday:n.kind===`weekly`?n.weekday??1:1,timeOfDay:U(n.hour,n.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``,timeout:t}}function Re({automation:e,isOpen:t,onClose:n}){let{t:r}=c(`openhands`),i=fe(),{data:a,isLoading:o}=ne(),s=a?.profiles??[],f=[{key:q,label:r(l.COMMON$ACTIVE_PROFILE)},...s.map(e=>({key:e.name,label:e.name}))],m=(0,k.useMemo)(()=>Le(e),[e]),[h,g]=(0,k.useState)(m),[_,b]=(0,k.useState)(null),[x,C]=(0,k.useState)(null);if((0,k.useEffect)(()=>{t&&(g(m),b(null),C(null))},[t,m]),!t)return null;let w=[{key:`daily`,label:r(l.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:r(l.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:r(l.AUTOMATIONS$FREQUENCY_WEEKLY)},...h.isCustomSchedule?[{key:`custom`,label:r(l.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],T=Ie.map((e,t)=>({key:String(t),label:r(e)})),O=!h.isCustomSchedule||W(h.timeOfDay)!==null||h.timeOfDay===``;return(0,A.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,A.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,A.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":r(l.AUTOMATIONS$CANCEL),children:(0,A.jsx)(D,{className:`size-5`})}),(0,A.jsx)(`h2`,{className:v,children:r(l.AUTOMATIONS$EDIT_TITLE)}),(0,A.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let a=h.name.trim();if(!a){b(r(l.AUTOMATIONS$NAME_REQUIRED));return}b(null);let o=Fe(h.timeout);if(`errorKey`in o){C(r(o.errorKey));return}C(null);let s={};a!==e.name&&(s.name=a);let c=h.prompt.trim();c!==(e.prompt??``).trim()&&(s.prompt=c.length===0?null:c);let f=h.model.trim();if(f!==(e.model??``)&&(s.model=f===``?null:f),(o.value??null)!==(e.timeout??null)&&(s.timeout=o.value),!h.isCustomSchedule&&h.frequency!==`custom`){let t=W(h.timeOfDay);if(t){let n=Oe({kind:h.frequency,hour:t.hour,minute:t.minute,weekday:h.frequency===`weekly`?h.weekday:void 0});n!==e.trigger.schedule&&(s.trigger={...e.trigger,schedule:n})}}if(Object.keys(s).length===0){n();return}i.mutate({id:e.id,body:s},{onSuccess:()=>{u(r(l.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{d(j(e,r(l.AUTOMATIONS$EDIT_ERROR)))}})},noValidate:!0,className:`mt-4 flex flex-col gap-4`,"aria-label":r(l.AUTOMATIONS$EDIT_TITLE),children:[(0,A.jsx)(S,{testId:`edit-automation-name`,name:`name`,type:`text`,label:r(l.AUTOMATIONS$NAME),value:h.name,onChange:e=>g(t=>({...t,name:e})),error:_??void 0,showRequiredTag:!0}),(0,A.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,A.jsx)(`span`,{className:`text-sm`,children:r(l.AUTOMATIONS$PROMPT)}),(0,A.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:h.prompt,onChange:e=>g(t=>({...t,prompt:e.target.value})),rows:4,className:p(te,`placeholder:italic`)}),(0,A.jsx)(`span`,{className:`text-xs text-muted`,children:r(l.AUTOMATIONS$EDIT_PROMPT_HINT)})]}),(o||s.length>0)&&(0,A.jsx)(E,{testId:`edit-automation-model`,name:`model`,label:r(l.AUTOMATIONS$DETAIL$MODEL),items:f,selectedKey:h.model||q,isLoading:o,placeholder:r(l.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>g(t=>({...t,model:e&&e!==q?String(e):``}))}),(0,A.jsxs)(`div`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,A.jsx)(S,{testId:`edit-automation-timeout`,name:`timeout`,type:`number`,label:r(l.AUTOMATIONS$TIMEOUT),value:h.timeout,onChange:e=>g(t=>({...t,timeout:e})),error:x??void 0,showOptionalTag:!0,min:1,max:Pe,step:1,placeholder:`600`}),(0,A.jsx)(`span`,{"data-testid":`edit-automation-timeout-hint`,className:`text-xs text-muted`,children:r(l.AUTOMATIONS$TIMEOUT_HINT)})]}),e.trigger.type===`event`?(0,A.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(l.AUTOMATIONS$DETAIL$TRIGGER)}),(0,A.jsx)(`span`,{className:`text-sm text-content`,children:r(l.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(l.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,A.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(l.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,A.jsx)(`code`,{className:`text-xs font-mono text-content`,children:G(e.trigger.on)})]}),e.trigger.filter&&(0,A.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,A.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(l.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,A.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(E,{testId:`edit-automation-frequency`,name:`frequency`,label:r(l.AUTOMATIONS$FREQUENCY),items:w,selectedKey:h.frequency,isDisabled:h.isCustomSchedule,onSelectionChange:e=>{!e||h.isCustomSchedule||g(t=>({...t,frequency:e}))}}),h.frequency===`weekly`&&!h.isCustomSchedule&&(0,A.jsx)(E,{testId:`edit-automation-weekday`,name:`weekday`,label:r(l.AUTOMATIONS$WEEKDAY),items:T,selectedKey:String(h.weekday),onSelectionChange:e=>{e!==null&&g(t=>({...t,weekday:Number(e)}))}}),(0,A.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,A.jsx)(`span`,{className:`text-sm`,children:r(l.AUTOMATIONS$TIME_OF_DAY)}),(0,A.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:h.timeOfDay,onChange:e=>g(t=>({...t,timeOfDay:e.target.value})),disabled:h.isCustomSchedule&&!O,className:p(ee,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,A.jsxs)(`span`,{className:`text-xs text-muted`,children:[r(l.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),h.isCustomSchedule&&(0,A.jsxs)(`p`,{className:`text-xs text-muted`,"data-testid":`custom-schedule-hint`,children:[r(l.AUTOMATIONS$CUSTOM_SCHEDULE_HINT),h.rawSchedule&&(0,A.jsxs)(A.Fragment,{children:[` `,(0,A.jsx)(`code`,{className:`text-xs text-content`,children:h.rawSchedule})]})]})]}),(0,A.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,A.jsx)(y,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:i.isPending,children:r(l.AUTOMATIONS$CANCEL)}),(0,A.jsx)(y,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:i.isPending,"aria-busy":i.isPending,children:i.isPending?r(l.AUTOMATIONS$SAVING):r(l.AUTOMATIONS$SAVE)})]})]})]})]})}var J=new Set([`cron`,`schedule`,`event`]),Y=class extends Error{issues;constructor(e){super(e.join(`
2
- `)),this.name=`AutomationFileValidationError`,this.issues=e}};function X(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Z(e,t,n,r){let i=e[t];if(typeof i!=`string`||i.trim().length===0){r.push(`${n}: expected a non-empty string`);return}return i}function Q(e,t,n,r){let i=e[t];if(i!==void 0){if(typeof i!=`string`){r.push(`${n}: expected a string`);return}return i}}function $(e,t){if(!X(e)){t.push(`spec.trigger: expected an object`);return}let n=Z(e,`type`,`spec.trigger.type`,t);n&&!J.has(n)&&t.push(`spec.trigger.type: expected one of "cron", "schedule", or "event"`);let r=Q(e,`schedule`,`spec.trigger.schedule`,t),i=Q(e,`schedule_human`,`spec.trigger.schedule_human`,t),a=Q(e,`timezone`,`spec.trigger.timezone`,t),o=Q(e,`source`,`spec.trigger.source`,t),s=Q(e,`filter`,`spec.trigger.filter`,t),c;if(e.on!==void 0&&(typeof e.on==`string`||Array.isArray(e.on)&&e.on.length>0&&e.on.every(e=>typeof e==`string`&&e.trim().length>0)?c=e.on:t.push(`spec.trigger.on: expected a string or a non-empty array of strings`)),(n===`cron`||n===`schedule`)&&!r?.trim()&&t.push(`spec.trigger.schedule: required for a scheduled trigger`),n===`event`&&(o?.trim()||t.push(`spec.trigger.source: required for an event trigger`),(c===void 0||typeof c==`string`&&c.trim().length===0)&&t.push(`spec.trigger.on: required for an event trigger`)),!(!n||!J.has(n)))return{type:n,...r!==void 0&&{schedule:r},...i!==void 0&&{schedule_human:i},...a!==void 0&&{timezone:a},...o!==void 0&&{source:o},...c!==void 0&&{on:c},...s!==void 0&&{filter:s}}}function ze(e){let t=e.timezone??e.trigger.timezone;return{version:1,kind:`automation`,spec:{name:e.name,trigger:{...e.trigger},enabled:e.enabled,prompt:e.prompt,...e.repository!==void 0&&{repository:e.repository},...e.model!==void 0&&{model:e.model},...e.timeout!=null&&{timeout:e.timeout},...e.branch!==void 0&&{branch:e.branch},...e.plugins!==void 0&&{plugins:[...e.plugins]},...e.notification!==void 0&&{notification:e.notification},...t!==void 0&&{timezone:t}}}}function Be(e){return`${e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||e.id}.automation.json`}function Ve(e){let t=[];if(!X(e))throw new Y([`file: expected a JSON object`]);if(e.version!==1&&t.push(`version: expected 1`),e.kind!==`automation`&&t.push(`kind: expected "automation"`),!X(e.spec))throw t.push(`spec: expected an object`),new Y(t);let n=Z(e.spec,`name`,`spec.name`,t),r=Z(e.spec,`prompt`,`spec.prompt`,t),i=$(e.spec.trigger,t),a=e.spec.enabled;typeof a!=`boolean`&&t.push(`spec.enabled: expected a boolean`);let o=Q(e.spec,`repository`,`spec.repository`,t),s=Q(e.spec,`branch`,`spec.branch`,t),c=Q(e.spec,`notification`,`spec.notification`,t),l=Q(e.spec,`timezone`,`spec.timezone`,t),u;e.spec.model===null||e.spec.model===void 0||typeof e.spec.model==`string`&&e.spec.model.trim().length>0?u=e.spec.model:t.push(`spec.model: expected a non-empty string or null`);let d;e.spec.timeout===null||e.spec.timeout===void 0||typeof e.spec.timeout==`number`&&Number.isInteger(e.spec.timeout)&&e.spec.timeout>0?d=e.spec.timeout:t.push(`spec.timeout: expected a positive integer`);let f;if(e.spec.plugins!==void 0&&(Array.isArray(e.spec.plugins)&&e.spec.plugins.every(e=>typeof e==`string`&&e.trim().length>0)?f=[...e.spec.plugins]:t.push(`spec.plugins: expected an array of non-empty strings`)),t.length>0||!n||!r||!i)throw new Y(t);return{name:n,prompt:r,trigger:i,enabled:a,...o!==void 0&&{repository:o},...u!==void 0&&{model:u},...d!==void 0&&{timeout:d},...s!==void 0&&{branch:s},...f!==void 0&&{plugins:f},...c!==void 0&&{notification:c},...l!==void 0&&{timezone:l}}}export{me as C,ce as D,se as E,L as O,pe as S,ue as T,be as _,Ne as a,ge as b,K as c,G as d,Te as f,xe as g,Se as h,Re as i,j as k,Ae as l,Ce as m,Ve as n,Me as o,we as p,ze as r,je as s,Be as t,ke as u,V as v,de as w,le as x,ve as y};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{L as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as a}from"./Trans-DqF_OEZB.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{C as c,S as l,n as u,w as d}from"./active-backend-context-DHhm10VS.js";import{t as f}from"./createLucideIcon-D4Tak8A1.js";import{t as p}from"./check-TbOEtHKj.js";import{i as m,t as h}from"./utils-DB9LsAzA.js";import{t as g}from"./modal-backdrop-zVwfOJZr.js";import{n as _}from"./modal-classes-3qT9Ap7Q.js";import{t as v}from"./brand-button-B1izLAdR.js";import{n as y}from"./navigation-context-DPs2G0X8.js";import{t as b}from"./styled-tooltip-B14i_Uac.js";import{u as x}from"./dropdown-classes-D3wMJlXT.js";import{t as S}from"./modal-close-button-BcIBUdSq.js";import{t as ee}from"./use-tracking-DFoPQUSU.js";import{n as C,t as te}from"./recommended-automations-launcher-BWRRvMPE.js";import{n as w,t as T}from"./context-menu-list-item-6psNyl7X.js";import{t as E}from"./u-edit-DL5LgKon.js";import{t as D}from"./folder-Bk311brm.js";import{t as O}from"./search-BgOCR7_c.js";import{a as k,i as A,n as j,o as M,r as ne,t as re}from"./extension-module-card-classes-9V3J9J_b.js";import{n as N}from"./skill-card-pill-row-BPYKQ3IN.js";import{n as P,t as F}from"./use-launch-skill-in-chat-DJWEfVc5.js";import{C as ie,S as ae,T as oe,_ as I,a as se,b as ce,d as L,f as R,g as z,h as B,i as le,k as V,l as H,m as U,n as ue,o as de,p as W,r as fe,s as pe,t as me,u as G,v as K,w as he,x as ge,y as q}from"./automation-export-Djc8Tf0M.js";var _e=f(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ve=f(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ye=f(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),be=f(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),xe=f(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),J=e(t(),1),Y=n();function Se({value:e,onChange:t,className:n}){let{t:r}=o(`openhands`);return(0,Y.jsxs)(`div`,{className:h(`relative flex min-w-0 flex-1 items-center`,`h-9 rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`,n),children:[(0,Y.jsx)(O,{className:`ml-3 size-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,Y.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:r(s.AUTOMATIONS$SEARCH_PLACEHOLDER),"aria-label":r(s.AUTOMATIONS$SEARCH_PLACEHOLDER),className:`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm text-white outline-none placeholder:text-tertiary-alt`})]})}function X(e,t){let n=[];if(e.repository&&n.push({id:`repository`,node:(0,Y.jsxs)(`span`,{className:h(A,`gap-1`),children:[(0,Y.jsx)(D,{className:`size-3 shrink-0`}),e.repository]})}),e.trigger.type===`event`){let t=[e.trigger.on?L(e.trigger.on):``,e.trigger.source?`(${e.trigger.source})`:``].filter(Boolean).join(` `);n.push({id:`event-trigger`,node:(0,Y.jsxs)(`span`,{className:h(A,`gap-1`),children:[(0,Y.jsx)(W,{className:`size-3 shrink-0`}),t]})})}else n.push({id:`schedule`,node:(0,Y.jsxs)(`span`,{className:h(A,`gap-1`),children:[(0,Y.jsx)(U,{className:`size-3 shrink-0`}),t]})});return e.model&&n.push({id:`model`,node:(0,Y.jsxs)(`span`,{className:h(A,`gap-1`),children:[(0,Y.jsx)(R,{className:`size-3 shrink-0`}),e.model]})}),n}function Ce({automation:e,t,canManage:n,onRunNow:r,isRunPending:i,onView:a,onExport:o,onEdit:c,onToggle:l,onDelete:u}){return[...n?[{label:t(s.AUTOMATIONS$RUN_NOW),icon:(0,Y.jsx)(B,{className:`size-4`}),onClick:()=>r(e.id),disabled:i||!e.enabled}]:[],{label:t(s.COMMON$VIEW),icon:(0,Y.jsx)(ve,{className:`size-4`,"aria-hidden":!0}),onClick:a},{label:t(s.AUTOMATIONS$EXPORT),icon:(0,Y.jsx)(_e,{className:`size-4`,"aria-hidden":!0}),onClick:()=>o(e)},...n&&c?[{label:t(s.AUTOMATIONS$EDIT),icon:(0,Y.jsx)(E,{className:`size-4`}),onClick:()=>c(e.id)}]:[],...n?[{label:e.enabled?t(s.AUTOMATIONS$TURN_OFF):t(s.AUTOMATIONS$TURN_ON),icon:(0,Y.jsx)(G,{className:`size-4`}),onClick:()=>l(e.id,e.enabled)},{label:t(s.AUTOMATIONS$DELETE),icon:(0,Y.jsx)(H,{className:`size-4`}),onClick:()=>u(e.id)}]:[]]}function we({automation:e,onToggle:t,onRunNow:n,isRunPending:r=!1,onDelete:i,onExport:a,onEdit:c}){let{navigate:l}=y(),{t:u}=o(`openhands`),d=z(`manage_automations`),f=e.trigger.schedule_human||e.trigger.type,p=(0,J.useMemo)(()=>X(e,f),[e,f]),m=()=>{l?.(`/automations/${e.id}`)},g=Ce({automation:e,t:u,canManage:d,onRunNow:n,isRunPending:r,onView:m,onExport:a,onEdit:c,onToggle:t,onDelete:i}),_=()=>{m()};return(0,Y.jsxs)(`div`,{role:`link`,tabIndex:0,"data-testid":`automation-card-${e.id}`,onClick:_,onKeyDown:e=>{e.key===`Enter`&&_()},className:h(`flex min-w-0 flex-col gap-3 overflow-hidden p-4 text-left`,k,ne),children:[(0,Y.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,Y.jsxs)(`h3`,{className:`flex items-center gap-2 truncate text-sm font-semibold text-white`,children:[e.trigger.type===`event`?(0,Y.jsx)(W,{className:`size-4 shrink-0 text-muted`}):(0,Y.jsx)(U,{className:`size-4 shrink-0 text-muted`}),(0,Y.jsx)(`span`,{className:`truncate`,children:e.name})]}),e.prompt?(0,Y.jsx)(`p`,{className:`line-clamp-2 text-xs leading-relaxed text-tertiary-light`,children:e.prompt}):null]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[d?(0,Y.jsxs)(`button`,{type:`button`,"data-testid":`automation-run-now-${e.id}`,"aria-busy":r,disabled:r||!e.enabled,onClick:t=>{t.stopPropagation(),n(e.id)},className:q,children:[(0,Y.jsx)(B,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),u(s.AUTOMATIONS$RUN_NOW)]}):null,(0,Y.jsx)(I,{items:g})]})]}),p.length>0?(0,Y.jsx)(N,{pills:p,testId:`automation-pills-${e.id}`}):null]})}var Te=`overflow-hidden rounded-md border border-[var(--oh-border)] bg-base-secondary`,Ee=[`h-11`,`border-t border-[var(--oh-border)] transition-colors`].join(` `),De=`hover:bg-interactive-hover-low outline-none focus:outline-none focus-visible:outline-none focus-visible:bg-interactive-hover-low`,Oe=`px-3 align-middle`,ke=[Ee,De,`cursor-pointer`].join(` `),Ae=`openhands-automations-view`;function je(){return typeof window>`u`?`grid`:window.localStorage.getItem(`openhands-automations-view`)===`list`?`list`:`grid`}function Me(e){window.localStorage.setItem(Ae,e)}function Ne({automation:e,onToggle:t,onRunNow:n,isRunPending:r=!1,onDelete:i,onExport:a,onEdit:c}){let{navigate:l}=y(),{t:u}=o(`openhands`),d=z(`manage_automations`),f=e.trigger.schedule_human||e.trigger.type,p=(0,J.useMemo)(()=>X(e,f),[e,f]),m=()=>{l?.(`/automations/${e.id}`)},g=Ce({automation:e,t:u,canManage:d,onRunNow:n,isRunPending:r,onView:m,onExport:a,onEdit:c,onToggle:t,onDelete:i}),_=()=>{m()};return(0,Y.jsxs)(`tr`,{"data-testid":`automation-list-row-${e.id}`,onClick:_,onKeyDown:e=>{e.key===`Enter`&&_()},tabIndex:0,className:h(ke,`cursor-pointer`),children:[(0,Y.jsx)(`td`,{className:Oe,children:(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[e.trigger.type===`event`?(0,Y.jsx)(W,{className:`size-4 shrink-0 text-muted`}):(0,Y.jsx)(U,{className:`size-4 shrink-0 text-muted`}),(0,Y.jsx)(`span`,{className:`max-w-[40%] shrink-0 truncate text-sm font-medium text-white`,title:e.name,children:e.name}),p.length>0?(0,Y.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Y.jsx)(N,{pills:p,testId:`automation-pills-${e.id}`})}):null]})}),(0,Y.jsx)(`td`,{className:h(`w-0 whitespace-nowrap`,Oe),children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-end gap-0.5`,children:[d?(0,Y.jsx)(b,{content:u(s.AUTOMATIONS$RUN_NOW),placement:`top`,children:(0,Y.jsx)(`button`,{type:`button`,"data-testid":`automation-run-now-${e.id}`,"aria-label":u(s.AUTOMATIONS$RUN_NOW),"aria-busy":r,disabled:r||!e.enabled,onClick:t=>{t.stopPropagation(),n(e.id)},className:K,children:(0,Y.jsx)(B,{className:`size-4 shrink-0`,"aria-hidden":!0})})}):null,(0,Y.jsx)(I,{items:g})]})})]})}function Pe({title:e,count:t,automations:n,view:r,onToggle:i,onRunNow:a,runPendingId:o=null,onDelete:s,onExport:c,onEdit:l}){return n.length===0?null:(0,Y.jsxs)(`section`,{children:[(0,Y.jsxs)(`div`,{className:`flex items-center`,children:[(0,Y.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:e}),(0,Y.jsx)(C,{count:t})]}),r===`grid`?(0,Y.jsx)(`div`,{className:h(`mt-3`,j),children:(0,Y.jsx)(`div`,{className:re,children:n.map(e=>(0,Y.jsx)(we,{automation:e,onToggle:i,onRunNow:a,isRunPending:o===e.id,onDelete:s,onExport:c,onEdit:l},e.id))})}):(0,Y.jsx)(`div`,{className:h(Te,`mt-3`),children:(0,Y.jsx)(`table`,{className:`w-full min-w-full [&>tbody>tr:first-child]:border-t-0`,children:(0,Y.jsx)(`tbody`,{children:n.map(e=>(0,Y.jsx)(Ne,{automation:e,onToggle:i,onRunNow:a,isRunPending:o===e.id,onDelete:s,onExport:c,onEdit:l},e.id))})})})]})}var Fe=e(r(),1);function Ie({icon:e,label:t,isSelected:n}){return(0,Y.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:x,"aria-hidden":!0,children:(0,Y.jsx)(e,{})}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,Y.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":!0}):null]})}var Z=[{value:`grid`,icon:be,labelKey:s.AUTOMATIONS$VIEW_GRID,testId:`automations-view-toggle-grid`},{value:`list`,icon:xe,labelKey:s.AUTOMATIONS$VIEW_LIST,testId:`automations-view-toggle-list`}];function Le({view:e,onChange:t,disabled:n=!1}){let{t:r}=o(`openhands`),[i,a]=(0,J.useState)(!1),[c,l]=(0,J.useState)(),u=(0,J.useRef)(null),d=(0,J.useRef)(null),f=(Z.find(t=>t.value===e)??Z[0]).icon;(0,J.useLayoutEffect)(()=>{if(!i||!u.current)return;let e=()=>{let e=u.current?.getBoundingClientRect();e&&l({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[i]),(0,J.useEffect)(()=>{if(!i)return;let e=e=>{let t=e.target;u.current?.contains(t)||d.current?.contains(t)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[i]);let p=i&&c?(0,Y.jsx)(w,{ref:d,theme:`popover`,className:`min-w-[10rem]`,children:Z.map(n=>(0,Y.jsx)(`li`,{children:(0,Y.jsx)(T,{testId:n.testId,onClick:()=>{t(n.value),a(!1)},className:`group`,children:(0,Y.jsx)(Ie,{icon:n.icon,label:r(n.labelKey),isSelected:e===n.value})})},n.value))}):null;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{ref:u,type:`button`,"data-testid":`automations-view-toggle`,"aria-label":r(s.AUTOMATIONS$VIEW_MODE),"aria-haspopup":`menu`,"aria-expanded":i,"aria-disabled":n,disabled:n,onClick:()=>{n||a(e=>!e)},className:h(`inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-[var(--oh-border)] bg-base-secondary text-white transition-colors hover:bg-[var(--oh-interactive-hover)] focus-visible:border-white/40 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/20`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-base-secondary`),children:(0,Y.jsx)(f,{className:`size-4`,"aria-hidden":!0})}),i&&c&&typeof document<`u`?Fe.createPortal((0,Y.jsx)(`div`,{style:c,children:p}),document.body):null]})}function Re(){return(0,Y.jsxs)(`div`,{"data-testid":`automation-card-skeleton`,className:`${k} border border-transparent p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,Y.jsx)(`div`,{className:`h-5 w-40 animate-pulse rounded bg-surface-raised`}),(0,Y.jsx)(`div`,{className:`h-5 w-10 animate-pulse rounded-full bg-surface-raised`})]}),(0,Y.jsx)(`div`,{className:`mt-2 h-4 w-72 animate-pulse rounded bg-surface-raised`}),(0,Y.jsxs)(`div`,{className:`mt-4 flex gap-2`,children:[(0,Y.jsx)(`div`,{className:`h-7 w-32 animate-pulse rounded-full bg-surface-raised`}),(0,Y.jsx)(`div`,{className:`h-7 w-28 animate-pulse rounded-full bg-surface-raised`}),(0,Y.jsx)(`div`,{className:`h-7 w-24 animate-pulse rounded-full bg-surface-raised`})]})]})}var ze=e=>(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,Y.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m19.5 8.25-7.5 7.5-7.5-7.5`})}),Be=`https://docs.openhands.dev/openhands/usage/automations/overview`;function Ve({children:e}){return(0,Y.jsx)(`span`,{className:`whitespace-nowrap`,children:e})}function He({children:e}){return(0,Y.jsx)(`code`,{"data-testid":`automations-create-instructions-example`,className:h(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function Ue({children:e}){return(0,Y.jsx)(Y.Fragment,{children:e})}var We={example:(0,Y.jsx)(Ve,{}),cmd:(0,Y.jsx)(He,{}),punct:(0,Y.jsx)(Ue,{})};function Q({onLaunch:e}={}){let{t}=o(`openhands`),n=F(),r=u(),{trackAutomationCreated:i}=ee();return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Y.jsxs)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:[(0,Y.jsx)(a,{ns:`openhands`,i18nKey:s.AUTOMATIONS$EMPTY_OPTION_CONVERSATION_DESC,components:We}),` `,t(s.AUTOMATIONS$CREATE_INSTRUCTIONS_GUIDANCE)]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Y.jsx)(`a`,{href:Be,target:`_blank`,rel:`noopener noreferrer`,className:`text-sm text-muted underline transition-colors hover:text-foreground`,children:t(s.AUTOMATIONS$EMPTY_LEARN_MORE)}),(0,Y.jsx)(v,{type:`button`,variant:`primary`,testId:`automations-create-automation`,onClick:()=>{i({backendKind:r.backend.kind}),n(t(s.AUTOMATIONS$CREATE_AUTOMATION_PROMPT),e)},startContent:(0,Y.jsx)(P,{className:`size-4`,"aria-hidden":!0}),children:t(s.AUTOMATIONS$CREATE_AUTOMATION_BUTTON)})]})]})}function Ge({collapsible:e=!1}){let{t}=o(`openhands`),[n,r]=(0,J.useState)(!e);return e?(0,Y.jsxs)(`div`,{className:`w-full rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>r(!n),"aria-expanded":n,className:`flex w-full items-center justify-between rounded-lg p-4 text-left transition-colors hover:bg-surface-raised`,children:[(0,Y.jsx)(`span`,{className:`text-sm font-normal text-content`,children:t(s.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE)}),(0,Y.jsx)(ze,{className:h(`size-5 text-muted transition-transform`,n&&`rotate-180`)})]}),n?(0,Y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,Y.jsx)(Q,{})}):null]}):(0,Y.jsxs)(`div`,{className:`w-full max-w-2xl`,children:[(0,Y.jsx)(`h3`,{className:`text-center text-sm font-medium text-content`,children:t(s.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE)}),(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(Q,{})})]})}function Ke(){let{t:e}=o(`openhands`);return(0,Y.jsxs)(`div`,{"data-testid":`automations-empty`,className:M,children:[(0,Y.jsx)(`p`,{className:`text-sm text-white`,children:e(s.AUTOMATIONS$EMPTY)}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-tertiary-light`,children:e(s.AUTOMATIONS$EMPTY_HINT)}),(0,Y.jsx)(`div`,{className:`mt-8 flex justify-center border-t border-[var(--oh-border)] pt-8`,children:(0,Y.jsx)(Ge,{})})]})}function qe({isOpen:e,onClose:t}){let{t:n}=o(`openhands`);return e?(0,Y.jsx)(g,{onClose:t,"aria-label":n(s.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE),children:(0,Y.jsxs)(`div`,{"data-testid":`add-automation-modal`,className:`relative flex w-full max-w-lg flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,Y.jsx)(S,{onClose:t,testId:`add-automation-modal-close`}),(0,Y.jsx)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:(0,Y.jsx)(`h2`,{id:`add-automation-modal-title`,className:h(`pr-6`,_),children:n(s.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE)})}),(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(Q,{onLaunch:t})})]})}):null}function $({label:e,value:t}){return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs font-medium uppercase tracking-wide text-muted`,children:e}),(0,Y.jsx)(`dd`,{className:`whitespace-pre-wrap break-words text-sm text-content`,children:t})]})}function Je({isOpen:e,spec:t,isImporting:n,onClose:r,onImport:i}){let{t:a}=o(`openhands`);if(!e||!t)return null;let c=t.trigger.type===`event`?[t.trigger.source,L(t.trigger.on)].filter(Boolean).join(`: `):[t.trigger.schedule_human??t.trigger.schedule,t.timezone??t.trigger.timezone].filter(Boolean).join(` · `);return(0,Y.jsx)(g,{onClose:n?void 0:r,closeOnEscape:!n,closeOnBackdropClick:!n,"aria-label":a(s.AUTOMATIONS$IMPORT),children:(0,Y.jsxs)(`div`,{"data-testid":`import-automation-modal`,className:`relative flex max-h-[85vh] w-[min(36rem,calc(100vw-2rem))] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,Y.jsx)(S,{onClose:r,testId:`import-automation-modal-close`,disabled:n}),(0,Y.jsxs)(`header`,{className:`px-6 pb-4 pt-6`,children:[(0,Y.jsx)(`h2`,{className:h(`pr-6`,_),children:a(s.AUTOMATIONS$IMPORT)}),(0,Y.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:a(s.AUTOMATIONS$IMPORT_PREVIEW_DESCRIPTION)})]}),(0,Y.jsxs)(`dl`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto border-y border-[var(--oh-border)] px-6 py-5`,children:[(0,Y.jsx)($,{label:a(s.AUTOMATIONS$NAME),value:t.name}),(0,Y.jsx)($,{label:a(s.AUTOMATIONS$DETAIL$TRIGGER),value:c}),(0,Y.jsx)($,{label:a(s.AUTOMATIONS$PROMPT),value:t.prompt??``}),t.plugins&&t.plugins.length>0?(0,Y.jsx)($,{label:a(s.AUTOMATIONS$DETAIL$PLUGINS),value:t.plugins.join(`, `)}):null]}),(0,Y.jsxs)(`footer`,{className:`px-6 py-5`,children:[(0,Y.jsx)(`p`,{className:`mb-4 text-sm text-tertiary-light`,children:a(s.AUTOMATIONS$IMPORT_DISABLED_NOTICE)}),(0,Y.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,Y.jsx)(v,{testId:`import-automation-cancel`,type:`button`,variant:`secondary`,onClick:r,isDisabled:n,children:a(s.AUTOMATIONS$CANCEL)}),(0,Y.jsx)(v,{testId:`import-automation-confirm`,type:`button`,variant:`primary`,onClick:i,isDisabled:n,"aria-busy":n,children:a(n?s.AUTOMATIONS$IMPORTING:s.AUTOMATIONS$IMPORT)})]})]})]})})}var Ye=50,Xe=i(function(){let{t:e}=o(`openhands`),[t,n]=(0,J.useState)(``),[r,i]=(0,J.useState)(()=>je()),[a,f]=(0,J.useState)(Ye),[p,h]=(0,J.useState)(null),[g,_]=(0,J.useState)(null),[y,b]=(0,J.useState)(!1),[x,S]=(0,J.useState)(null),C=(0,J.useRef)(null),w=u(),T=w.backend.kind===`local`,{data:E,isLoading:D,refetch:O}=ce(),k=E?.status===`ok`,{data:A,isLoading:j,isError:M,refetch:ne}=ge({limit:a,offset:0,enabled:k}),{trackPrebuiltAutomationEnabled:re,trackAutomationExported:N}=ee(),P=oe(),F=ae(),I=ie(),L=he(),R=(0,J.useMemo)(()=>{if(!A?.automations)return[];let e=t.toLowerCase();return e?A.automations.filter(t=>t.name.toLowerCase().includes(e)||(t.prompt??``).toLowerCase().includes(e)||t.repository?.toLowerCase().includes(e)||t.model?.toLowerCase().includes(e)):A.automations},[A?.automations,t]),z=(0,J.useMemo)(()=>R.filter(e=>e.enabled),[R]),B=(0,J.useMemo)(()=>R.filter(e=>!e.enabled),[R]),H=(e,t)=>{let n=!t;if(P.mutate({id:e,enabled:n}),n){let t=A?.automations.find(t=>t.id===e);re({automationId:e,automationName:t?.name??e})}},U=t=>{I.mutate(t,{onSuccess:()=>{c(e(s.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{l(V(t,e(s.AUTOMATIONS$RUN_NOW_ERROR)))}})},W=e=>{let t=A?.automations.find(t=>t.id===e);t&&h({id:e,name:t.name})},G=e=>{let t=A?.automations.find(t=>t.id===e);t&&_(t)},K=e=>{let t=`${JSON.stringify(fe(e),null,2)}\n`;m(new Blob([t],{type:`application/json`}),me(e)),N({backendKind:w.backend.kind})},q=async t=>{let n=t.currentTarget,r=n.files?.[0];if(n.value=``,r)try{let t;try{t=JSON.parse(await r.text())}catch{l(e(s.AUTOMATIONS$IMPORT_INVALID_JSON));return}S(ue(t))}catch(t){l(t instanceof Error?t.message:e(s.ERROR$GENERIC))}},_e=()=>{x&&L.mutate({...x,enabled:!1},{onSuccess:t=>{S(null),d(e(s.AUTOMATIONS$IMPORT_SUCCESS,{name:t.name}),e(s.AUTOMATIONS$IMPORT_VIEW),`/automations/${encodeURIComponent(t.id)}`)},onError:t=>{l(V(t,e(s.ERROR$GENERIC)))}})},ve=()=>{p&&(F.mutate(p.id),h(null))},be=(0,J.useCallback)(e=>{i(e),Me(e)},[]),xe=A?A.total>A.automations.length:!1,X=!j&&!M&&A?.automations.length===0;return D?(0,Y.jsx)(`div`,{className:`min-h-full`,children:(0,Y.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,Y.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e(s.AUTOMATIONS$TITLE)}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:e(s.AUTOMATIONS$SUBTITLE)}),(0,Y.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:Array.from({length:3}).map((e,t)=>(0,Y.jsx)(Re,{},`skeleton-${String(t)}`))})]})}):k?(0,Y.jsx)(`div`,{className:`min-h-full`,children:(0,Y.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`h1`,{className:`text-xl font-semibold text-content`,children:e(s.AUTOMATIONS$TITLE)}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:e(s.AUTOMATIONS$SUBTITLE)})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-2`,children:[(0,Y.jsx)(v,{type:`button`,variant:`secondary`,testId:`automations-import-automation`,className:`whitespace-nowrap`,onClick:()=>C.current?.click(),startContent:(0,Y.jsx)(ye,{className:`size-4`,"aria-hidden":!0}),children:e(s.AUTOMATIONS$IMPORT)}),(0,Y.jsx)(`input`,{ref:C,type:`file`,accept:`application/json,.json`,className:`hidden`,"data-testid":`automations-import-file`,onChange:q}),(0,Y.jsx)(v,{type:`button`,variant:`secondary`,testId:`automations-add-automation`,className:`whitespace-nowrap`,onClick:()=>b(!0),children:e(s.AUTOMATIONS$ADD_AUTOMATION)})]})]}),(0,Y.jsxs)(`div`,{className:`mt-6 flex items-stretch gap-2`,children:[(0,Y.jsx)(Se,{value:t,onChange:n}),(0,Y.jsx)(Le,{view:r,onChange:be,disabled:X})]}),(0,Y.jsxs)(`div`,{className:`mt-6 flex flex-col gap-6`,children:[j&&(0,Y.jsx)(`div`,{className:`flex flex-col gap-3`,children:Array.from({length:3}).map((e,t)=>(0,Y.jsx)(Re,{},`skeleton-${String(t)}`))}),M&&!j&&(0,Y.jsx)(pe,{onRetry:ne}),X&&(0,Y.jsx)(Ke,{}),!j&&!M&&A&&A.automations.length>0&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Pe,{title:e(s.AUTOMATIONS$ACTIVE),count:z.length,automations:z,view:r,onToggle:H,onRunNow:U,runPendingId:I.isPending?I.variables??null:null,onDelete:W,onExport:K,onEdit:T?G:void 0}),(0,Y.jsx)(Pe,{title:e(s.AUTOMATIONS$INACTIVE),count:B.length,automations:B,view:r,onToggle:H,onRunNow:U,runPendingId:I.isPending?I.variables??null:null,onDelete:W,onExport:K,onEdit:T?G:void 0}),xe&&(0,Y.jsx)(`button`,{type:`button`,onClick:()=>f(e=>e+Ye),className:`self-center rounded-lg border border-[var(--oh-border)] px-6 py-2 text-sm text-white hover:bg-surface-raised`,children:e(s.AUTOMATIONS$LOAD_MORE)})]})]}),(0,Y.jsx)(`div`,{className:`mt-6`,children:(0,Y.jsx)(te,{query:t})}),(0,Y.jsx)(se,{automationName:p?.name??``,isOpen:p!==null,onConfirm:ve,onCancel:()=>h(null)}),g&&(0,Y.jsx)(le,{automation:g,isOpen:g!==null,onClose:()=>_(null)}),(0,Y.jsx)(qe,{isOpen:y,onClose:()=>b(!1)}),(0,Y.jsx)(Je,{isOpen:x!==null,spec:x,isImporting:L.isPending,onClose:()=>S(null),onImport:_e})]})}):(0,Y.jsx)(`div`,{className:`min-h-full`,children:(0,Y.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,Y.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e(s.AUTOMATIONS$TITLE)}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:e(s.AUTOMATIONS$SUBTITLE)}),(0,Y.jsx)(de,{onRetry:O})]})})});export{Xe as default};
@@ -1 +0,0 @@
1
- import{a as e,r as t}from"./rolldown-runtime-BFRubm34.js";import{Ct as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useQuery-D5pEZbY0.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{A as s,D as c,O as l,r as u}from"./active-backend-context-DHhm10VS.js";import{t as d}from"./utils-DB9LsAzA.js";import{F as f,d as p,r as m,t as h}from"./agent-server-compatibility-C0MtTTwb.js";import{n as g,r as _,y as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{a as y,i as b,n as x,r as S,t as C}from"./use-backends-health-BagmAE_W.js";import{t as w}from"./modal-backdrop-zVwfOJZr.js";import{n as T,r as E,t as ee}from"./modal-body-Cc2zp0xb.js";import{n as D,r as O}from"./modal-classes-3qT9Ap7Q.js";import{t as k}from"./brand-button-B1izLAdR.js";import{n as A}from"./navigation-context-DPs2G0X8.js";import{t as j}from"./modal-close-button-BcIBUdSq.js";import{t as M}from"./settings-input-BsgQWS5R.js";import{t as te}from"./segmented-toggle-kzwZkLaj.js";import{t as N}from"./use-tracking-DFoPQUSU.js";import{a as P,i as F,n as I,r as L}from"./cloud-funnel-analytics-uzzLlLuj.js";var R=e(n()),z=r(),ne=e=>(0,z.jsxs)(`svg`,{width:1365,height:1365,viewBox:`0 -24 148 148`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,z.jsx)(`path`,{d:`M71.7542 16.863V2.97414C71.7542 1.82355 72.6872 0.890503 73.8378 0.890503C74.9884 0.890503 75.9214 1.82355 75.9214 2.97414V16.863C75.9214 18.0136 74.9884 18.9466 73.8378 18.9466C72.6872 18.9466 71.7542 18.0136 71.7542 16.863Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M82.5272 18.9329L89.4716 6.90477C90.0469 5.90832 91.3215 5.5668 92.3179 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2863 22.3545 83.2899 21.7792C82.2934 21.2039 81.9519 19.9293 82.5272 18.9329Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.561 44.1323C109.535 43.621 109.51 43.1141 109.484 42.6146C109.241 37.9294 109.022 33.7805 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.721 43.9088C113.91 47.5661 114.106 51.4922 114.235 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0937 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.164 19.7567 123.434 21.4683C124.256 22.576 124.75 23.8775 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M7.15661 62.0292C7.15661 58.409 6.17994 47.6748 5.87291 44.1323C5.6654 41.7374 5.95357 40.4247 6.33875 39.7542C6.62116 39.2626 7.06336 38.915 8.12834 38.8436C8.89759 38.7921 9.73544 39.0114 10.3616 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6074 43.4388L12.5644 59.758C12.5988 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3887 61.7859 14.9695 61.6941L24.9988 60.1068L35.8143 58.6703C36.8135 58.5376 37.5741 57.7084 37.6208 56.7016L38.2015 44.1323C38.2279 43.621 38.2525 43.1141 38.2784 42.6146C38.5218 37.9294 38.7401 33.7805 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0227 25.9634C40.4996 25.3915 41.185 25.1402 42.6523 25.1402C43.1794 25.1402 43.5505 25.2481 43.8295 25.4111C44.1038 25.5714 44.416 25.8587 44.7138 26.4208C45.3521 27.6257 45.8173 29.891 45.6444 33.8479C45.4201 38.9804 45.0703 42.8146 44.7275 46.2718C44.3853 49.7231 44.0443 52.8561 43.8548 56.4971C43.5582 62.1966 43.5847 66.1256 43.8179 68.7924C43.9344 70.124 44.1069 71.1996 44.3396 72.0501C44.5601 72.8558 44.891 73.6757 45.4663 74.2887C46.1625 75.0303 47.1546 75.3844 48.1855 75.136C49.0033 74.9389 49.5778 74.4215 49.8918 74.0916C50.5484 73.4017 51.0123 72.5106 51.1945 72.0512C52.2527 69.3812 55.5272 63.1808 59.9601 59.6811C61.2536 58.6599 62.1958 58.3652 62.7889 58.3204C63.3476 58.2783 63.753 58.4436 64.0715 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8801 59.9968 64.8883 60.0584C63.6866 62.0865 58.9204 69.5222 56.6729 77.069C54.9977 82.6941 50.9586 88.4259 47.9431 90.8809C45.0229 93.258 39.7747 94.7313 33.8624 95.0218C28.0068 95.3095 21.9748 94.4121 17.7297 92.5092C9.52988 88.8334 7.85961 80.7382 7.11129 77.2292C6.53054 74.5057 6.5195 71.5987 6.67496 68.9009C6.75251 67.5551 6.86809 66.2969 6.96901 65.1373C7.06707 64.0105 7.1566 62.9215 7.15661 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1147 24.7049 27.6737 23.9514C28.1792 23.27 28.9221 22.7987 30.1167 22.7984C31.0942 22.7982 31.7518 22.9187 32.2162 23.1167C32.6326 23.2943 32.9817 23.5699 33.2996 24.0831C34.0328 25.2671 34.5705 27.6455 34.5738 32.384L34.0416 43.9088C33.8524 47.5661 33.6565 51.4922 33.5273 54.7707L26.7768 55.6666V27.0953ZM22.6095 56.2652L16.5904 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0847 29.5489C17.8785 28.9039 18.8058 28.6731 19.2432 28.6731C20.0404 28.6731 20.8634 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6095 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02265 34.6083 7.8501 34.6868C5.72541 34.8292 3.85197 35.718 2.72584 37.6779C1.70247 39.4592 1.48924 41.8136 1.72143 44.4927C2.0423 48.1949 2.99038 58.6457 2.99038 62.0292C2.99037 62.708 2.91991 63.6116 2.81859 64.7758C2.72014 65.907 2.59699 67.2389 2.51505 68.6606C2.3515 71.4987 2.34041 74.8383 3.0357 78.0987C3.76005 81.4953 5.72154 91.6918 16.0245 96.3108C21.0311 98.5551 27.7601 99.4936 34.0669 99.1838C40.3172 98.8767 46.6346 97.3189 50.5737 94.1122C54.2816 91.0937 58.7686 84.6307 60.6662 78.2589C62.8095 71.0619 67.4515 63.9646 68.6098 61.9533C69.2919 60.7689 69.0785 59.3628 68.7605 58.4258C68.4018 57.3688 67.707 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4748 54.1647C60.8256 54.2893 59.1162 55.0393 57.379 56.4107C52.9083 59.9401 49.6283 65.5082 48.02 68.9231C48.0034 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7232 62.3344 48.0158 56.7132C48.1989 53.1942 48.5269 50.1809 48.8737 46.6828C49.22 43.1904 49.5784 39.2713 49.8075 34.0302C49.9903 29.8481 49.5612 26.6722 48.3952 24.471C47.7909 23.3302 46.9729 22.4223 45.9321 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9497 21.2062 37.3141 22.7678C37.1698 22.4576 37.0124 22.1652 36.8419 21.8899C36.0863 20.6698 35.0817 19.8084 33.8508 19.2835C32.6679 18.7791 31.3849 18.6309 30.1167 18.6311C27.5677 18.6315 25.5986 19.7567 24.3285 21.4683C23.5066 22.576 23.0121 23.8775 22.7771 25.1982C21.4247 24.5876 20.0718 24.5068 19.2432 24.5068C17.8298 24.5068 15.9788 25.0791 14.4573 26.3154C12.8542 27.6179 11.6032 29.6733 11.6032 32.5083V35.4278Z`,fill:`white`})]}),B=e=>(0,z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.3235 10.9352L11.5016 14.2111L7.67969 10.9352L8.6152 9.84375L11.5016 12.3178L14.388 9.84375L15.3235 10.9352Z`,fill:`currentColor`})});function V(e,t,n){let r=n?.lastError??null,i=t?.kind===`cloud`;return i&&!t?.apiKey?.trim()||b(r)?e(o.BACKEND$STATUS_DISCONNECTED_ADD_API_KEY):S(r)?e(o.BACKEND$STATUS_DISCONNECTED_CHECK_API_KEY):x(r)?e(o.BACKEND$LOGGED_OUT):n?.isConnected===!0?e(o.ONBOARDING$BACKEND_STATUS_CONNECTED):i&&n?.isConnected===!1&&(C(r)||s(r))?e(o.BACKEND$STATUS_DISCONNECTED_CHECK_CLOUD_ACCESS):n?.isConnected===!1&&l(r)?e(o.BACKEND$STATUS_DISCONNECTED_CHECK_TUNNEL):n?.isConnected===!1&&s(r)?e(o.BACKEND$STATUS_DISCONNECTED_CHECK_URL_OR_NETWORK):n?.isConnected===!1?e(o.ONBOARDING$BACKEND_STATUS_DISCONNECTED):e(o.ONBOARDING$BACKEND_STATUS_CHECKING)}function H({isConnected:e,className:t}){let n,r,i;return e===`unavailable`?(n=`bg-[var(--oh-text-tertiary)]`,r=`No Backend Available`,i=`unavailable`):e===!0?(n=`bg-[var(--oh-status-success)]`,r=`Connected`,i=`connected`):e===!1?(n=`bg-red-500`,r=`Disconnected`,i=`disconnected`):(n=`bg-[var(--oh-interactive-selected)]`,r=`Checking connection`,i=`checking`),(0,z.jsx)(`span`,{"data-testid":`backend-status-dot`,"data-status":i,"aria-label":r,title:r,role:`status`,className:d(`inline-block w-2 h-2 rounded-full shrink-0`,n,t)})}var U={status:`idle`,verificationUrl:null,userCode:null,apiKey:null,error:null,errorCode:null};function re(){let[e,t]=R.useState(U),n=R.useRef(null),r=R.useCallback((e,r)=>{n.current?.abort();let i=new AbortController;n.current=i,t({...U,status:`starting`}),(async()=>{let n;try{n=await P(e)}catch(e){if(i.signal.aborted)return;let n=e instanceof Error?e.message:`Failed to start device flow`,r=e instanceof g?e.code:void 0;t({...U,status:`error`,error:n,errorCode:r??null});return}if(!i.signal.aborted){I(e,r),t({...U,status:`awaiting_authorization`,verificationUrl:n.verification_uri_complete,userCode:n.user_code});try{let a=await F(e,n.device_code,{interval:n.interval,signal:i.signal});if(i.signal.aborted)return;L(e,r),t({...U,status:`success`,apiKey:a.access_token})}catch(e){if(i.signal.aborted)return;if(e instanceof g&&e.code===`cancelled`){t(U);return}let n=e instanceof Error?e.message:`Authorization failed`,r=e instanceof g?e.code:void 0;t({...U,status:`error`,error:n,errorCode:r??null})}}})()},[]),i=R.useCallback(()=>{n.current?.abort(),n.current=null,t(U)},[]),a=R.useCallback(()=>{n.current?.abort(),n.current=null,t(U)},[]);return R.useEffect(()=>()=>{n.current?.abort()},[]),{...e,start:r,cancel:i,reset:a}}function W(e){try{return new URL(e).protocol===`https:`}catch{return!1}}function G({host:e,onSuccess:t,testIdRoot:n,isDisabled:r=!1,idleButtonLabel:i,idleButtonContent:s,className:c,buttonClassName:l,buttonVariant:u=`primary`,statusDisplay:f=`inline`,analyticsSource:p}){let{t:m}=a(`openhands`),h=re(),g=R.useRef(null);R.useEffect(()=>()=>{g.current?.close()},[]),R.useEffect(()=>{if(h.status===`awaiting_authorization`&&h.verificationUrl&&g.current&&!g.current.closed){if(!W(h.verificationUrl)){console.error(`Invalid verification URL protocol`);return}try{g.current.location.href=h.verificationUrl}catch{g.current=window.open(h.verificationUrl,`_blank`,`noopener,noreferrer`)}}},[h.status,h.verificationUrl]),R.useEffect(()=>{if(h.status===`success`&&h.apiKey)try{t(h.apiKey)}finally{h.reset(),g.current?.close()}},[h.status,h.apiKey,h.reset,t]);let _=()=>{let t=e.trim().replace(/\/+$/,``),n=/^https?:\/\//i.test(t)?t:`https://${t}`;try{let e=new URL(n);if(e.username||e.password)throw Error(`Invalid URL format`)}catch{return}g.current=window.open(`about:blank`,`_blank`),g.current||console.warn(`Popup blocked - user will need to use manual link`),h.start(n,p)},v=()=>{h.cancel(),g.current?.close()},y=(0,z.jsx)(ie,{status:h.status,error:h.error,verificationUrl:h.verificationUrl,testIdRoot:n,onCancel:v,onRetry:_}),b=f===`modal`&&h.status!==`idle`,x=i??m(o.BACKEND$LOGIN_WITH_OPENHANDS);return(0,z.jsxs)(`div`,{"data-testid":`${n}-device-flow`,className:d(`flex flex-col gap-3`,c),children:[h.status===`idle`&&u===`unstyled`&&(0,z.jsx)(`button`,{type:`button`,onClick:_,"data-testid":`${n}-login-button`,className:l,disabled:r,"aria-label":s?x:void 0,children:s??x}),h.status===`idle`&&u!==`unstyled`&&(0,z.jsx)(k,{type:`button`,variant:u,onClick:_,testId:`${n}-login-button`,className:d(`w-full`,l),isDisabled:r,ariaLabel:s?x:void 0,children:s??x}),f===`inline`?y:null,b?(0,z.jsx)(w,{onClose:v,"aria-label":m(o.BACKEND$LOGIN_WITH_OPENHANDS),closeOnBackdropClick:!1,children:(0,z.jsx)(T,{testID:`${n}-auth-modal`,width:`sm`,className:`items-stretch border border-[var(--oh-border)]`,children:y})}):null]})}function ie({status:e,error:t,verificationUrl:n,testIdRoot:r,onCancel:i,onRetry:s}){let{t:c}=a(`openhands`);if(e===`idle`||e===`success`)return null;if(e===`starting`)return(0,z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-base-tertiary p-3`,"data-testid":`${r}-auth-starting`,role:`status`,"aria-live":`polite`,children:[(0,z.jsx)(K,{}),(0,z.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:c(o.BACKEND$AUTH_STARTING)})]});if(e===`awaiting_authorization`){let e=n&&W(n)?n:null;return(0,z.jsxs)(`div`,{className:`flex flex-col gap-4 rounded-lg bg-base-tertiary p-4`,"data-testid":`${r}-auth-awaiting`,role:`status`,"aria-live":`polite`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(K,{}),(0,z.jsx)(`span`,{className:`text-sm font-medium text-white`,children:c(o.BACKEND$AUTH_AWAITING)})]}),(0,z.jsx)(`p`,{className:`text-sm leading-5 text-[var(--oh-text-tertiary)]`,children:c(o.BACKEND$AUTH_BROWSER_OPENED)}),e?(0,z.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-md border border-[var(--oh-border)] bg-[var(--oh-surface)] p-3 text-xs text-[var(--oh-muted)]`,children:[(0,z.jsx)(`p`,{children:c(o.BACKEND$AUTH_OPEN_MANUALLY)}),(0,z.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`max-h-16 overflow-auto break-all text-blue-400 hover:underline`,children:e})]}):null,(0,z.jsx)(k,{type:`button`,variant:`secondary`,onClick:i,testId:`${r}-auth-cancel`,className:`w-full`,children:c(o.BACKEND$AUTH_CANCEL)})]})}return(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-red-700 bg-red-900/20 p-4`,"data-testid":`${r}-auth-error`,role:`alert`,children:[(0,z.jsx)(`p`,{className:`text-sm text-red-400`,children:t}),(0,z.jsx)(k,{type:`button`,variant:`secondary`,onClick:s,testId:`${r}-auth-retry`,className:`w-full`,children:c(o.BACKEND$AUTH_RETRY)})]})}function K(){return(0,z.jsx)(`svg`,{className:`animate-spin h-4 w-4 text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})})}var ae=t({BackendConnectionOptions:()=>$,BackendForm:()=>Q,BackendFormModal:()=>ge});function oe(e){return _(e)?`cloud`:`local`}function se(e){let t=e.toLowerCase().replace(/^\[|\]$/g,``);return!!(t===`localhost`||t===`::1`||t===`::`||t===`0.0.0.0`||/^127\./.test(t)||/^::ffff:127\./i.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2\d|3[01])\./.test(t)||/^fe[89ab][0-9a-f]:/i.test(t)||/^f[cd][0-9a-f]{2}:/i.test(t)||t.endsWith(`.local`)||!t.includes(`.`)&&!t.includes(`:`))}function q(e){let t=e.trim().replace(/\/+$/,``);if(!t)return``;if(/^https?:\/\//i.test(t))return t;let n=t.match(/^\[([^\]]+)\]/);return`${se(n?n[1]:(t.match(/:/g)??[]).length>1?t:t.split(`:`)[0])?`http`:`https`}://${t}`}function J(e){let t=e.trim();if(!t||/\s/.test(t))return!1;let n=q(t);if(!n)return!1;try{let e=new URL(n);return(e.protocol===`http:`||e.protocol===`https:`)&&e.hostname.length>0}catch{return!1}}var Y=`https://app.all-hands.dev`;function ce(e,t){return e(o.BACKEND$CONNECTION_TEST_FAILED,{host:t,interpolation:{escapeValue:!1}})}function le(e){return c(e)}function ue(e,t){let n=le(t);return n?`${e}\n${n}`:e}async function X(e){e.kind===`local`&&h(await new v(p({host:e.host,sessionApiKey:e.apiKey||null,timeout:5e3})).getServerInfo())}function de({backend:e,testIdRoot:t}){let{t:n}=a(`openhands`),r=y([e])[e.id],s=r?.isConnected??null,c=r?.disabled===!0,l=r?.consecutiveFailures??0,u=r?.lastError??null,{data:d}=i({queryKey:[`backend-version`,e.host,e.apiKey],queryFn:async()=>m(await new v(p({host:e.host,sessionApiKey:e.apiKey||null,timeout:5e3})).getServerInfo()),retry:!1,staleTime:6e4,enabled:e.kind===`local`&&!c}),f=V(n,e,r),h=e.kind===`cloud`?n(o.BACKEND$KIND_CLOUD):n(o.BACKEND$KIND_LOCAL);return(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`div`,{"data-testid":`${t}-status`,className:`flex items-center gap-3 text-sm`,children:[(0,z.jsx)(H,{isConnected:s}),(0,z.jsx)(`span`,{className:`text-white`,"data-testid":`${t}-status-label`,children:f}),(0,z.jsx)(`span`,{className:`text-tertiary-alt`,children:`·`}),(0,z.jsx)(`span`,{className:`text-[var(--oh-text-tertiary)]`,children:h}),d?(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,"data-testid":`${t}-version`,children:n(o.BACKEND$VERSION_LABEL,{version:d})}):null]}),c?(0,z.jsxs)(`div`,{"data-testid":`${t}-status-error`,className:`flex flex-col gap-1 rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-red-300`,children:n(o.BACKEND$HEALTH_FAILED_TITLE)}),(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-text-tertiary)]`,children:n(o.BACKEND$HEALTH_FAILED_DETAIL,{count:l})}),u?(0,z.jsx)(`span`,{"data-testid":`${t}-status-error-message`,className:`text-xs text-red-300 whitespace-pre-wrap break-words`,children:u}):null]}):null]})}function Z({initialName:e=``,initialHost:t=``,initialApiKey:n=``,onTestConnection:r,onSuccess:i,requireApiKey:o=!1,onSubmitOverride:s}){let{t:c}=a(`openhands`),[l,u]=R.useState(e),[d,f]=R.useState(t),[p,m]=R.useState(n),[h,g]=R.useState(null),[_,v]=R.useState(!1),[y,b]=R.useState(null),x=y??oe(d),S=o||x!==`local`,C=l.trim().length>0&&J(d)&&(!S||p.trim().length>0);return{name:l,setName:u,host:d,setHost:f,apiKey:p,setApiKey:m,connectionError:h,setConnectionError:g,isSubmitting:_,kind:x,setKind:b,canSubmit:C,handleSubmit:R.useCallback(async e=>{if(e.preventDefault(),!C||_)return;let t={name:l.trim(),host:q(d),apiKey:p.trim(),kind:x};g(null),v(!0);try{s?await s(t):(await r(t),i())}catch(e){g(ue(ce(c,t.host),e))}finally{v(!1)}},[C,_,l,d,p,x,r,i,o,s,c])}}function Q({mode:e,backend:t,onSubmitted:n,renderActions:r,testIdRoot:i,hostReadOnly:s,requireApiKey:c,hideConfigurationFields:l=!1,onSubmitOverride:f}){let{t:p}=a(`openhands`),{addBackend:m,updateBackend:h}=u(),g=e===`edit`&&t?t.kind:null,{name:_,setName:v,host:y,setHost:b,apiKey:x,setApiKey:S,connectionError:C,setConnectionError:w,isSubmitting:T,kind:E,handleSubmit:ee}=Z({initialName:t?.name??``,initialHost:t?.host??``,initialApiKey:t?.apiKey??``,onTestConnection:X,onSuccess:async()=>{let r={name:_.trim(),host:q(y),apiKey:x.trim(),kind:g??E};e===`edit`&&t?h(t.id,r):m(r),n()},requireApiKey:c,onSubmitOverride:f}),[D,O]=R.useState(!1),[A,j]=R.useState(!1),te=g??E,N=i??(e===`edit`?`edit-backend`:`add-backend`),P=c||te!==`local`,F=_.trim().length>0&&J(y)&&(!P||x.trim().length>0),I=D&&!_.trim()?p(o.BACKEND$NAME_REQUIRED):void 0,L=A?y.trim()?J(y)?void 0:p(o.BACKEND$HOST_INVALID):p(o.BACKEND$HOST_REQUIRED):void 0;return(0,z.jsxs)(`form`,{"data-testid":`${N}-form`,onSubmit:async e=>{if(!F){O(!0),j(!0);return}await ee(e)},className:`flex flex-col gap-4`,children:[(0,z.jsxs)(`div`,{"data-testid":`${N}-configuration-fields`,className:d(`flex flex-col gap-4`,l&&`hidden`),children:[(0,z.jsx)(M,{testId:`${N}-name`,name:`${N}-name`,type:`text`,label:p(o.BACKEND$NAME_LABEL),value:_,onChange:e=>{v(e),w(null)},onBlur:()=>O(!0),placeholder:`Production`,className:`w-full`,showRequiredTag:!0,error:I}),(0,z.jsx)(M,{testId:`${N}-host`,name:`${N}-host`,type:`text`,label:p(o.BACKEND$HOST_LABEL),value:y,onChange:s?void 0:e=>{b(e),w(null)},onBlur:()=>j(!0),placeholder:Y,className:`w-full`,showRequiredTag:!0,error:L,isDisabled:s}),(0,z.jsx)(M,{testId:`${N}-api-key`,name:`${N}-api-key`,type:`password`,label:p(o.BACKEND$KEY_LABEL),value:x,onChange:e=>{S(e),w(null)},placeholder:``,className:`w-full`}),C?(0,z.jsx)(`div`,{role:`alert`,"data-testid":`${N}-error`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:C}):null,e===`edit`&&t&&(0,z.jsx)(de,{backend:t,testIdRoot:N})]}),r?r({canSubmit:F&&!T,isSubmitting:T,testIdRoot:N}):(0,z.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2 w-full`,children:[(0,z.jsx)(k,{type:`button`,variant:`secondary`,onClick:n,testId:`${N}-cancel`,children:p(o.BUTTON$CANCEL)}),(0,z.jsx)(k,{type:`submit`,variant:`primary`,isDisabled:!F||T,testId:`${N}-submit`,children:p(o.BACKEND$SAVE)})]})]})}function fe(){let{currentPath:e,navigate:t}=A();return R.useCallback(()=>{/^\/automations\/[^/]+/.test(e)?t(`/automations`):/^\/conversations\/[^/]+/.test(e)&&t(`/conversations`)},[e,t])}function $({onConnected:e,testIdRoot:t=`add-backend`,initialManualBackend:n,requireManualApiKey:r=!1,manualSubmitLabel:i,manualSubmittingLabel:s,manualSubmitTestId:c,analyticsSource:l}){let{t:u}=a(`openhands`),d=f();return d?(0,z.jsx)(`div`,{"data-testid":`${t}-connection-options`,className:`flex justify-center`,children:(0,z.jsx)(`div`,{className:`w-full`,children:(0,z.jsx)(me,{onConnected:e,testIdRoot:t,lockedHost:d,analyticsSource:l})})}):(0,z.jsxs)(`div`,{"data-testid":`${t}-connection-options`,className:`flex flex-col gap-6 md:flex-row`,children:[(0,z.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,z.jsx)(pe,{onConnected:e,testIdRoot:t,initialBackend:n,requireApiKey:r,submitLabel:i??u(o.BACKEND$CONNECT),submittingLabel:s??u(o.ONBOARDING$BACKEND_STATUS_CHECKING),submitTestId:c})}),(0,z.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,z.jsx)(me,{onConnected:e,testIdRoot:t,analyticsSource:l})})]})}function pe({onConnected:e,testIdRoot:t,initialBackend:n,requireApiKey:r,submitLabel:i,submittingLabel:s,submitTestId:c}){let{t:l}=a(`openhands`),{name:u,setName:d,host:f,setHost:p,apiKey:m,setApiKey:h,connectionError:g,setConnectionError:_,isSubmitting:v,kind:y,setKind:b,canSubmit:x,handleSubmit:S}=Z({initialName:n?.name??``,initialHost:n?.host??``,initialApiKey:n?.apiKey??``,onTestConnection:X,onSuccess:()=>{e({name:u.trim(),host:q(f),apiKey:m.trim(),kind:y},`manual`)},requireApiKey:r});return(0,z.jsxs)(`form`,{"data-testid":`${t}-form`,onSubmit:S,className:`flex flex-col gap-4 flex-1 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(M,{testId:`${t}-name`,name:`${t}-name`,type:`text`,label:l(o.BACKEND$NAME_LABEL),value:u,onChange:e=>{d(e),_(null)},placeholder:`e.g. My Server`,className:`w-full`}),(0,z.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:l(o.BACKEND$NAME_HELPER)})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(M,{testId:`${t}-host`,name:`${t}-host`,type:`text`,label:l(o.BACKEND$HOST_LABEL),value:f,onChange:e=>{p(e),_(null)},placeholder:`http://localhost:8000`,className:`w-full`}),(0,z.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,"data-testid":`${t}-host-helper`,children:l(o.BACKEND$HOST_HELPER)})]}),(0,z.jsxs)(`div`,{className:`flex flex-col items-start gap-2.5`,children:[(0,z.jsx)(`span`,{className:`text-sm`,children:l(o.BACKEND$KIND_LABEL)}),(0,z.jsx)(te,{value:y,options:[{value:`local`,label:l(o.BACKEND$KIND_LOCAL)},{value:`cloud`,label:l(o.BACKEND$KIND_CLOUD)}],onChange:e=>b(e),ariaLabel:l(o.BACKEND$KIND_LABEL),testId:`${t}-kind`})]}),(0,z.jsx)(M,{testId:`${t}-api-key`,name:`${t}-api-key`,type:`password`,label:l(o.BACKEND$KEY_LABEL),value:m,onChange:e=>{h(e),_(null)},placeholder:`sk-••••••••••`,className:`w-full`}),g?(0,z.jsx)(`div`,{role:`alert`,"data-testid":`${t}-error`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:g}):null,(0,z.jsx)(k,{type:`submit`,variant:`secondary`,isDisabled:!x||v,testId:c??`${t}-submit`,className:`w-full text-center`,children:v?s:i})]})}function me({onConnected:e,testIdRoot:t,lockedHost:n,analyticsSource:r}){let{t:i}=a(`openhands`),[s,c]=R.useState(!1),[l,u]=R.useState(``),f=n??(l.trim()||Y);return(0,z.jsxs)(`div`,{className:`flex flex-1 min-w-0 flex-col items-center gap-3 pb-8`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,z.jsx)(ne,{width:56,height:56,"aria-hidden":!0}),(0,z.jsx)(`h4`,{className:O,"data-testid":`${t}-cloud-title`,children:i(o.BACKEND$CLOUD_TITLE)})]}),(0,z.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-[var(--oh-muted)]`,children:i(o.BACKEND$CLOUD_DESCRIPTION)}),(0,z.jsx)(G,{host:f,onSuccess:t=>{e({name:`OpenHands Cloud`,host:q(f),apiKey:t,kind:`cloud`},`cloud_login`)},testIdRoot:t,analyticsSource:r}),n?null:(0,z.jsxs)(`div`,{className:`w-full`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>c(e=>!e),"aria-expanded":s,"data-testid":`${t}-advanced-toggle`,className:`flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2`,children:[(0,z.jsx)(`span`,{children:i(o.BACKEND$ADVANCED)}),(0,z.jsx)(B,{className:d(`h-4 w-4 shrink-0 text-muted transition-transform`,s&&`rotate-180`),"aria-hidden":!0})]}),(0,z.jsxs)(`div`,{className:d(`pt-2`,!s&&`pointer-events-none invisible`),"aria-hidden":!s,children:[(0,z.jsx)(M,{testId:`${t}-cloud-host`,name:`${t}-cloud-host`,type:`text`,label:i(o.BACKEND$HOST_LABEL),value:l,onChange:u,placeholder:Y,className:`w-full`}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-[var(--oh-muted)]`,children:i(o.BACKEND$LOGIN_CLOUD_HINT)})]})]})]})}function he({onClose:e,source:t}){let{addBackend:n}=u(),r=fe(),{trackBackendAdded:i}=N();return(0,z.jsx)($,{onConnected:R.useCallback((a,o)=>{n(a);let s=_(a.host);i({backendKind:a.kind,connectionMethod:o,isOpenhandsCloud:s,isCustomHost:!s,hasApiKey:!!a.apiKey,source:t}),r(),e()},[n,r,e,i,t]),analyticsSource:t})}function ge({mode:e,backend:t,onClose:n,source:r=`add_backend_modal`,hideCloseButton:i=!1}){let{t:s}=a(`openhands`);if(e===`add`)return(0,z.jsx)(w,{onClose:i?void 0:n,closeOnEscape:!1,closeOnBackdropClick:!i,"aria-label":s(o.BACKEND$ADD_TITLE),children:(0,z.jsxs)(`div`,{"data-testid":i?`onboarding-modal`:`add-backend-modal`,className:d(`relative rounded-xl border border-[var(--oh-border)] bg-base-secondary`,E(`xl`),ee),children:[i?null:(0,z.jsx)(j,{onClose:n,testId:`add-backend-close`}),i?null:(0,z.jsx)(`div`,{className:`px-6 pt-6 pb-2 pr-12`,children:(0,z.jsx)(`h2`,{className:D,children:s(o.BACKEND$ADD_TITLE)})}),(0,z.jsx)(`div`,{className:d(`px-6 pb-6`,i?`pt-6`:`pt-2`),children:(0,z.jsx)(he,{onClose:n,source:r})})]})});let c=`edit-backend`;return(0,z.jsx)(w,{onClose:n,closeOnEscape:!1,"aria-label":s(o.BACKEND$EDIT_TITLE),children:(0,z.jsxs)(`div`,{"data-testid":`${c}-modal`,className:d(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,E(`md`)),children:[(0,z.jsx)(j,{onClose:n,testId:`${c}-close`}),(0,z.jsx)(`h2`,{className:d(`pr-6`,D),children:s(o.BACKEND$EDIT_TITLE)}),(0,z.jsx)(Q,{mode:`edit`,backend:t,onSubmitted:n,testIdRoot:c})]})})}export{G as a,B as c,ae as i,Q as n,H as o,ge as r,V as s,$ as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./react-DPDgL6du.js";var t={url:``,screenshotSrc:``},n=e(e=>({...t,setUrl:t=>e({url:t}),setScreenshotSrc:t=>e({screenshotSrc:t}),reset:()=>e(t)}));export{n as t};
@@ -1 +0,0 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./createLucideIcon-D4Tak8A1.js";import{t as n}from"./utils-DB9LsAzA.js";var r=t(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),i=t(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),a=e();function o({buttonClassName:e,handleSubmit:t,disabled:i}){return(0,a.jsx)(`button`,{type:`button`,className:n(`flex items-center justify-center rounded-full border border-white size-8`,i?`cursor-not-allowed border-[var(--oh-muted)]`:`cursor-pointer hover:bg-white/10`,e),"data-name":`arrow-up-circle-fill`,"data-testid":`submit-button`,onClick:t,disabled:i,children:(0,a.jsx)(r,{className:`w-4 h-4`,color:i?`var(--oh-muted)`:`white`})})}export{i as n,o as t};
@@ -1 +0,0 @@
1
- var e={name:`@openhands/agent-canvas`,version:`1.5.2`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.9.0`,"@openhands/typescript-client":`1.34.0`,"@react-router/node":`7.17.0`,"@react-router/serve":`7.17.0`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,httpxy:`0.5.3`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.17.0`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`1.8.4`,sirv:`3.0.2`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,winston:`3.19.0`,"winston-daily-rotate-file":`5.0.0`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`,"example:acp-docker:env":`node scripts/gen-acp-docker-env.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`node scripts/run-staged-typecheck.mjs`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.17.0`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{"@vercel/static-config":{ajv:`8.20.0`},dompurify:`3.4.7`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.17.0`}},t=`agent_canvas`,n=e.version,r={"X-OpenHands-Client":t,"X-OpenHands-Client-Version":n};export{e as i,t as n,n as r,r as t};
@@ -1 +0,0 @@
1
- import{a as e,i as t,r as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{n as r,t as i}from"./client-source-CtQjJEy6.js";import{d as a}from"./telemetry-SHxpVxk8.js";function o(t){return e(t,{headers:i})}function s(e,n,r){return t(e,n,{...r,headers:i})}var c=`${r}:cloud_conversation_ready`;function l(e,t){a(e,t)}function u(e){let t=n(e);return{is_openhands_cloud:t,is_custom_host:!t}}function d(e,t){l(`cloud_device_authorization_started`,{...u(e),source:t})}function f(e,t){l(`cloud_device_authorization_succeeded`,{...u(e),source:t})}function p(e,t){l(`cloud_conversation_ready`,{$insert_id:`${c}:${e}`,task_id:e,conversation_id:t})}export{o as a,s as i,d as n,f as r,p as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./conversation-Lmqm6VJC.js";export{e as default};