@openhands/agent-canvas 1.8.0 → 1.10.0

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 (1282) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-WUD4tfSq.js → acp-providers-DLe_gVDY.js} +1 -1
  4. package/build/assets/active-backend-context-B0wI7OzM.js +2 -0
  5. package/build/assets/agent-context-settings-CaQtdNA-.js +1 -0
  6. package/build/assets/agent-profiles-settings-CvuErjp6.js +1 -0
  7. package/build/assets/agent-server-conversation-service.api-km_8sOVf.js +41 -0
  8. package/build/assets/{agent-settings-BGTyoT6X.js → agent-settings-UE-U4Xii.js} +2 -2
  9. package/build/assets/agent-settings-nmO-KSXr.js +1 -0
  10. package/build/assets/alert-banner-BMaOtTCG.js +1 -0
  11. package/build/assets/{api-key-entry-screen-JOx3SH1-.js → api-key-entry-screen-Cy66vT4D.js} +1 -1
  12. package/build/assets/{app-settings-D53QZy5p.js → app-settings-9ok42bV6.js} +1 -1
  13. package/build/assets/automation-C_eCrGyP.js +1 -0
  14. package/build/assets/automation-detail-fuITm6i3.js +3 -0
  15. package/build/assets/automation-export-CRq40mux.js +2 -0
  16. package/build/assets/automation-setup-route-EXDazOHW.js +1 -0
  17. package/build/assets/automation-templates-BArZsaxP.js +1 -0
  18. package/build/assets/automations-list-CG4HKOTn.js +1 -0
  19. package/build/assets/{back-nav-button-C02hGa8t.js → back-nav-button-BZB6H7xz.js} +1 -1
  20. package/build/assets/backend-form-modal-B_lXjOGa.js +1 -0
  21. package/build/assets/{backend-synced-settings-badge-CQ9xtNWm.js → backend-synced-settings-badge-B_NXJ3u1.js} +1 -1
  22. package/build/assets/{badge-CzXbf7tR.js → badge-C64c-7PO.js} +1 -1
  23. package/build/assets/{base-modal-DkVyzFMt.js → base-modal-C0RQPug5.js} +1 -1
  24. package/build/assets/bot-DuN83i3p.js +1 -0
  25. package/build/assets/{brand-button-BUlDL-mz.js → brand-button-DJmFCyMK.js} +1 -1
  26. package/build/assets/browser-D3gd2n83.js +6 -0
  27. package/build/assets/{browser-tab-BijpUbdt.js → browser-tab-BicAWuJ1.js} +1 -1
  28. package/build/assets/{chat-send-button-BKsVjhtA.js → chat-send-button-CCrH1E8u.js} +1 -1
  29. package/build/assets/check-DLOKoFU9.js +1 -0
  30. package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
  31. package/build/assets/chevron-down-CnIbtM6i.js +1 -0
  32. package/build/assets/circle-check-CxCYJrpZ.js +1 -0
  33. package/build/assets/{circle-plus-check-toggle-DdjUiOo1.js → circle-plus-check-toggle-CB_sNERY.js} +1 -1
  34. package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
  35. package/build/assets/cloud-funnel-analytics-XynamQGU.js +1 -0
  36. package/build/assets/{combobox-caret-Dl9UtvD6.js → combobox-caret-Bwiifgjs.js} +1 -1
  37. package/build/assets/command-menu-CA3IjGNc.js +1 -0
  38. package/build/assets/condenser-settings-cNGy75gq.js +1 -0
  39. package/build/assets/{confirmation-modal-CRBJSllP.js → confirmation-modal-BATFmFyP.js} +1 -1
  40. package/build/assets/context-menu-list-item-DhJCcBA0.js +1 -0
  41. package/build/assets/conversation-B6t6EiVp.js +1 -0
  42. package/build/assets/conversation-Csdxh9Xt.js +90 -0
  43. package/build/assets/conversation-panel-B6t6EiVp.js +1 -0
  44. package/build/assets/conversation-state-store-C2QzhPaK.js +1 -0
  45. package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
  46. package/build/assets/{conversation-tab-empty-state-CDjvNgpG.js → conversation-tab-empty-state-D3fb5xIA.js} +1 -1
  47. package/build/assets/{copy-Drwu97Gx.js → copy-DaHuDtG4.js} +1 -1
  48. package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
  49. package/build/assets/{copy-to-clipboard-button-NbN1clVr.js → copy-to-clipboard-button-c4MQwKGj.js} +1 -1
  50. package/build/assets/{device-verify-CDm_WrVu.js → device-verify-oFpQoLgm.js} +1 -1
  51. package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
  52. package/build/assets/{dropdown-classes-CqA2BTCL.js → dropdown-classes-f91ARMV1.js} +1 -1
  53. package/build/assets/entry.client-BCzY2Bf3.js +2 -0
  54. package/build/assets/enum-filter-dropdown-HG3q3rkV.js +1 -0
  55. package/build/assets/{environment-switch-overlay-mGl2pqqx.js → environment-switch-overlay-CquZXolz.js} +1 -1
  56. package/build/assets/{extensions-hub-Br3Lgynp.js → extensions-hub-BeweE0PW.js} +1 -1
  57. package/build/assets/{extensions-navigation-BQmstKDZ.js → extensions-navigation-Dd58NlUF.js} +1 -1
  58. package/build/assets/{external-link-D9B2QMPf.js → external-link-zWbg5KXS.js} +1 -1
  59. package/build/assets/file-text-RecuaId_.js +1 -0
  60. package/build/assets/files-tab-CLLG55-q.js +1 -0
  61. package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
  62. package/build/assets/{form-control-classes-CtVAktAy.js → form-control-classes-pHtZUI6K.js} +1 -1
  63. package/build/assets/format-relative-time-6-3uvOXe.js +1 -0
  64. package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
  65. package/build/assets/git-provider-icon-wg7ShB98.js +1 -0
  66. package/build/assets/git-repo-dropdown-CWnaUyxL.js +1 -0
  67. package/build/assets/git-repo-dropdown-TzOuG5Ef.js +1 -0
  68. package/build/assets/{highlighted-source-view-KMsA9c4a.js → highlighted-source-view-DBtI3por.js} +1 -1
  69. package/build/assets/home-BpZQkDWM.js +1 -0
  70. package/build/assets/home-OEx0XtfP.js +1 -0
  71. package/build/assets/home-store-DM4qw1lF.js +1 -0
  72. package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
  73. package/build/assets/index-home-OEx0XtfP.js +1 -0
  74. package/build/assets/info-C9lpK5pw.js +1 -0
  75. package/build/assets/install-server-modal-DnjZrJUy.js +1 -0
  76. package/build/assets/kebab-menu-item-content-By16Tm_0.js +1 -0
  77. package/build/assets/{launch-DjkKw55l.js → launch-C9uijypN.js} +1 -1
  78. package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
  79. package/build/assets/list-filter-C86CBRDE.js +1 -0
  80. package/build/assets/{list-todo-BpAf7aOT.js → list-todo-CheUtB7F.js} +1 -1
  81. package/build/assets/llm-not-configured-banner-DrBrhfN0.js +27 -0
  82. package/build/assets/{llm-settings-D8zNkIlP.js → llm-settings-CRsLqxgu.js} +1 -1
  83. package/build/assets/llm-settings-RBm_3kNm.js +1 -0
  84. package/build/assets/{llm-subscription-service-COTgZc1C.js → llm-subscription-service-DwjJ8-_X.js} +1 -1
  85. package/build/assets/loader-circle-C5AnEN8r.js +1 -0
  86. package/build/assets/{loading-spinner-DRFyh6Iy.js → loading-spinner-6Yj-YyoS.js} +1 -1
  87. package/build/assets/{manage-backends-modal-DiRWE3tJ.js → manage-backends-modal-DrwErS0N.js} +1 -1
  88. package/build/assets/manifest-c352d453.js +1 -0
  89. package/build/assets/manifest-subpage-layout-CtqVwIvJ.js +1 -0
  90. package/build/assets/markdown-renderer-lsvsp7jn.js +8 -0
  91. package/build/assets/mcp-DD4hPTRE.js +9 -0
  92. package/build/assets/mcp-marketplace-utils-BMnYz0Gc.js +1 -0
  93. package/build/assets/messages-Dt77e0qi.js +40 -0
  94. package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
  95. package/build/assets/{modal-body-C3bGicn4.js → modal-body-BHGCSAtj.js} +1 -1
  96. package/build/assets/{modal-classes-DFFO6BMU.js → modal-classes-DSTLuxkA.js} +1 -1
  97. package/build/assets/{modal-close-button-vxkAIRyZ.js → modal-close-button-dheWZ2ys.js} +1 -1
  98. package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
  99. package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
  100. package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
  101. package/build/assets/onboarding-5CZvRBbh.js +1 -0
  102. package/build/assets/onboarding-modal-CD2ehuxt.js +1 -0
  103. package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
  104. package/build/assets/{organization-service.api-CQ73CB-S.js → organization-service.api-Dsuoep0g.js} +1 -1
  105. package/build/assets/{pencil-DzW2GB2M.js → pencil-Bl3GWhgq.js} +1 -1
  106. package/build/assets/{planner-tab-YG0bGxDY.js → planner-tab-DeO7Thb0.js} +1 -1
  107. package/build/assets/{plugins-management-service-ijhH8OSh.js → plugins-management-service-C9f75R6X.js} +1 -1
  108. package/build/assets/plus-CtzlyAoF.js +1 -0
  109. package/build/assets/{profiles-service.api-C32pPm70.js → profiles-service.api-Dl20_2IM.js} +1 -1
  110. package/build/assets/{providers-DuSn9s2i.js → providers-CeuhK46N.js} +1 -1
  111. package/build/assets/{proxy-BiyDhMBd.js → proxy-CIGI9zQC.js} +1 -1
  112. package/build/assets/{puzzle-DlqT0yvr.js → puzzle-B3v361yY.js} +1 -1
  113. package/build/assets/recommended-automations-launcher-6xmbf7lh.js +1 -0
  114. package/build/assets/{refresh-cw-Br5254f4.js → refresh-cw-B9GhC3QC.js} +1 -1
  115. package/build/assets/root-BQPNqNvD.js +2 -0
  116. package/build/assets/root-BeuHFY2s.css +1 -0
  117. package/build/assets/root-layout-Dl_2CDoq.js +3 -0
  118. package/build/assets/{schema-field-htfNouTG.js → schema-field-z2vSLuLo.js} +1 -1
  119. package/build/assets/{sdk-section-page-D0K1dBQY.js → sdk-section-page-BnCXAytf.js} +1 -1
  120. package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
  121. package/build/assets/search-CYaiKHRp.js +1 -0
  122. package/build/assets/{secrets-service-Dbv5Zb8G.js → secrets-service-DGUNlwQd.js} +1 -1
  123. package/build/assets/{secrets-settings-Da4SSaX9.js → secrets-settings-DUmML_dK.js} +1 -1
  124. package/build/assets/segmented-toggle-eSofF7gn.js +1 -0
  125. package/build/assets/settings-CWFxymAf.js +1 -0
  126. package/build/assets/{settings-F4a09IxY.js → settings-Co-M5bK9.js} +1 -1
  127. package/build/assets/{settings-dropdown-input-jOiv5Yrk.js → settings-dropdown-input-Cx4g7Xfl.js} +1 -1
  128. package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
  129. package/build/assets/{settings-index-CyJBf5NA.js → settings-index-BECdgecg.js} +1 -1
  130. package/build/assets/settings-input-BQY115xH.js +1 -0
  131. package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
  132. package/build/assets/{settings-list-classes-VqMzkYYt.js → settings-list-classes-C9cLrrcc.js} +1 -1
  133. package/build/assets/{settings-modal-C-S1NpbC.js → settings-modal-ChBJNTdd.js} +1 -1
  134. package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
  135. package/build/assets/settings-service.api-Dz9cZyvx.js +1 -0
  136. package/build/assets/{settings-switch-B405oU_v.js → settings-switch-BIodMVz9.js} +1 -1
  137. package/build/assets/shared-conversation-CSF0aTuE.js +1 -0
  138. package/build/assets/{sidebar-layout-BGMuyC86.js → sidebar-layout-DEycoFd_.js} +1 -1
  139. package/build/assets/sidebar-mobile-menu-toggle-DeRvTupV.js +1 -0
  140. package/build/assets/{sidebar-nav-link-DA4_ct9G.js → sidebar-nav-link-BjpQ-NVc.js} +1 -1
  141. package/build/assets/{sidebar-store-FRJ3rADB.js → sidebar-store-B04sX8aP.js} +1 -1
  142. package/build/assets/{skill-card-pill-row-BMdhr_sd.js → skill-card-pill-row-BH6fPGba.js} +1 -1
  143. package/build/assets/{skill-icon-badge-CGUkgcVH.js → skill-icon-badge-D4uznfjU.js} +1 -1
  144. package/build/assets/skill-scope-DH_AUUUP.js +1 -0
  145. package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
  146. package/build/assets/{skills-plugins-C5eJnyft.js → skills-plugins-vfvOk34h.js} +1 -1
  147. package/build/assets/skills-settings-DnbIu2eO.js +2 -0
  148. package/build/assets/sparkles-g7y3r-Ut.js +1 -0
  149. package/build/assets/{styled-tooltip-B3kIdVyH.js → styled-tooltip-CQ9JEFiO.js} +1 -1
  150. package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
  151. package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
  152. package/build/assets/{task-list-tab-B3k4W1cK.js → task-list-tab-DeF_uXdw.js} +1 -1
  153. package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
  154. package/build/assets/{terminal-CBI_41Zc.js → terminal-DRc4rup7.js} +1 -1
  155. package/build/assets/{toggle-switch-DYRr9CAR.js → toggle-switch--8n8NeV_.js} +1 -1
  156. package/build/assets/{trash-2-gZPlx23R.js → trash-2-CzDVN-Iw.js} +1 -1
  157. package/build/assets/{typography-B1UxuuEC.js → typography-BSbUhJPn.js} +1 -1
  158. package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
  159. package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
  160. package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
  161. package/build/assets/{use-acp-credential-form-CjSvKWFH.js → use-acp-credential-form-BGKFi1VL.js} +1 -1
  162. package/build/assets/{use-activate-agent-profile-DCRf47e-.js → use-activate-agent-profile-2nvALjC-.js} +1 -1
  163. package/build/assets/use-agent-profiles-BlQA67MW.js +1 -0
  164. package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
  165. package/build/assets/{use-can-manage-org-profiles-vBiP7rHF.js → use-can-manage-org-profiles-Clw5Dh1s.js} +1 -1
  166. package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
  167. package/build/assets/{use-cloud-current-user-id-BMq9gw93.js → use-cloud-current-user-id-B8AQSQFM.js} +1 -1
  168. package/build/assets/use-config-C3zGuUQI.js +1 -0
  169. package/build/assets/{use-create-conversation-CakhLF0X.js → use-create-conversation-FaP0kUpg.js} +1 -1
  170. package/build/assets/{use-create-secret-RT4QtSS9.js → use-create-secret-CgQ3pXd6.js} +1 -1
  171. package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
  172. package/build/assets/{use-is-creating-conversation-CIAcnd8M.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
  173. package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
  174. package/build/assets/use-llm-profiles-C-tDO6UB.js +1 -0
  175. package/build/assets/use-manifest-capabilities-DLP5wCxp.js +1 -0
  176. package/build/assets/{use-onboarding-completion-CJU4MNAY.js → use-onboarding-completion-BiCdXvlU.js} +1 -1
  177. package/build/assets/{use-plugins-marketplace-D-93nqtJ.js → use-plugins-marketplace-DRFNLBlr.js} +1 -1
  178. package/build/assets/use-save-agent-profile-CaGVAudI.js +1 -0
  179. package/build/assets/{use-save-settings--C6LZXfI.js → use-save-settings-C9B8Y-h3.js} +1 -1
  180. package/build/assets/{use-settings-DIAo5KFk.js → use-settings-3RcgdUuZ.js} +1 -1
  181. package/build/assets/use-settings-nav-items-y-Oyc93G.js +16 -0
  182. package/build/assets/use-tracking-CTtkLAmx.js +3 -0
  183. package/build/assets/{use-user-conversation-DhcAEyJX.js → use-user-conversation-Bei82QsZ.js} +1 -1
  184. package/build/assets/useInfiniteQuery-DbCv0Jzd.js +1 -0
  185. package/build/assets/{useMutation-DHLpZ6J0.js → useMutation-ChpkYxI5.js} +1 -1
  186. package/build/assets/{useQueries-B3T1a7qt.js → useQueries-Cjv3E8_1.js} +1 -1
  187. package/build/assets/useQuery-BCnzy4LX.js +1 -0
  188. package/build/assets/utils-BX9XJ0IE.js +1 -0
  189. package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
  190. package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
  191. package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
  192. package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
  193. package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
  194. package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
  195. package/build/assets/{vendor~entry.client-Di4qO77Y.js → vendor~entry.client-zSIea5EO.js} +2 -2
  196. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
  197. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
  198. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
  199. package/build/assets/{vendor~files-tab-atebg0iG.js → vendor~files-tab-C87pjSpi.js} +1 -1
  200. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
  201. package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
  202. package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
  203. package/build/assets/vendor~module-DyG7x7JT.js +2 -0
  204. package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
  205. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
  206. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
  207. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js +1 -0
  208. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js +1 -0
  209. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js +1 -0
  210. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
  211. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
  212. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
  213. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +175 -54
  214. package/build/assets/{verification-settings-Vr5cN4md.js → verification-settings-nD61Ijph.js} +1 -1
  215. package/build/assets/wrench-DRitTfwe.js +1 -0
  216. package/build/assets/x-RYDBg-e2.js +1 -0
  217. package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
  218. package/build/assets/zap-tbKDzCe3.js +1 -0
  219. package/build/index.html +4 -4
  220. package/build/locales/ar/openhands.json +106 -5
  221. package/build/locales/ca/openhands.json +106 -5
  222. package/build/locales/de/openhands.json +106 -5
  223. package/build/locales/en/openhands.json +107 -6
  224. package/build/locales/es/openhands.json +106 -5
  225. package/build/locales/fr/openhands.json +106 -5
  226. package/build/locales/it/openhands.json +106 -5
  227. package/build/locales/ja/openhands.json +106 -5
  228. package/build/locales/ko-KR/openhands.json +106 -5
  229. package/build/locales/no/openhands.json +106 -5
  230. package/build/locales/pt/openhands.json +106 -5
  231. package/build/locales/tr/openhands.json +106 -5
  232. package/build/locales/uk/openhands.json +106 -5
  233. package/build/locales/zh-CN/openhands.json +106 -5
  234. package/build/locales/zh-TW/openhands.json +106 -5
  235. package/build/mockServiceWorker.js +21 -9
  236. package/config/defaults.json +3 -3
  237. package/dist/api/agent-server-adapter.cjs +3 -3
  238. package/dist/api/agent-server-adapter.cjs.map +1 -1
  239. package/dist/api/agent-server-adapter.d.ts +46 -6
  240. package/dist/api/agent-server-adapter.js +187 -168
  241. package/dist/api/agent-server-adapter.js.map +1 -1
  242. package/dist/api/agent-server-compatibility.cjs +1 -1
  243. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  244. package/dist/api/agent-server-compatibility.d.ts +4 -0
  245. package/dist/api/agent-server-compatibility.js +41 -38
  246. package/dist/api/agent-server-compatibility.js.map +1 -1
  247. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  248. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  249. package/dist/api/automation-service/automation-service.api.d.ts +25 -0
  250. package/dist/api/automation-service/automation-service.api.js +110 -62
  251. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  252. package/dist/api/backend-registry/active-store.cjs +1 -1
  253. package/dist/api/backend-registry/active-store.cjs.map +1 -1
  254. package/dist/api/backend-registry/active-store.js +36 -31
  255. package/dist/api/backend-registry/active-store.js.map +1 -1
  256. package/dist/api/backend-registry/url-selection.cjs +2 -0
  257. package/dist/api/backend-registry/url-selection.cjs.map +1 -0
  258. package/dist/api/backend-registry/url-selection.d.ts +31 -0
  259. package/dist/api/backend-registry/url-selection.js +29 -0
  260. package/dist/api/backend-registry/url-selection.js.map +1 -0
  261. package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
  262. package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
  263. package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
  264. package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
  265. package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
  266. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  267. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  268. package/dist/api/mcp-service/mcp-service.api.js +19 -19
  269. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  270. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  271. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  272. package/dist/api/settings-service/settings-service.api.d.ts +10 -0
  273. package/dist/api/settings-service/settings-service.api.js +90 -100
  274. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  275. package/dist/api/skills-service.cjs +1 -1
  276. package/dist/api/skills-service.cjs.map +1 -1
  277. package/dist/api/skills-service.js +1 -0
  278. package/dist/api/skills-service.js.map +1 -1
  279. package/dist/assets/chevron-left.d.ts +1 -1
  280. package/dist/assets/chevron-right.d.ts +1 -1
  281. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +2 -0
  282. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -0
  283. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts +12 -0
  284. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +94 -0
  285. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -0
  286. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  287. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  288. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +31 -90
  289. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
  291. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
  292. package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
  293. package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
  294. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
  295. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  296. package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
  297. package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
  298. package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
  299. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
  300. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
  301. package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
  302. package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
  303. package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
  304. package/dist/components/features/alerts/alert-banner.d.ts +1 -1
  305. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
  306. package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
  307. package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
  308. package/dist/components/features/automations/automation-card.d.ts +9 -1
  309. package/dist/components/features/automations/automation-group.d.ts +9 -1
  310. package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
  311. package/dist/components/features/automations/automation-list-row.d.ts +3 -1
  312. package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
  313. package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
  314. package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
  315. package/dist/components/features/automations/create-instructions.d.ts +2 -2
  316. package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
  317. package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
  318. package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
  319. package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
  320. package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
  321. package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
  322. package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
  323. package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
  324. package/dist/components/features/automations/detail/back-link.d.ts +1 -1
  325. package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
  326. package/dist/components/features/automations/detail/config-field.d.ts +1 -1
  327. package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
  328. package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
  329. package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
  330. package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
  331. package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
  332. package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
  333. package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
  334. package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
  335. package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
  336. package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
  337. package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
  338. package/dist/components/features/automations/detail/section-card.d.ts +1 -1
  339. package/dist/components/features/automations/empty-state.d.ts +1 -1
  340. package/dist/components/features/automations/error-state.d.ts +1 -1
  341. package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
  342. package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
  343. package/dist/components/features/automations/kebab-menu.d.ts +1 -1
  344. package/dist/components/features/automations/metadata-chip.d.ts +1 -1
  345. package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -8
  346. package/dist/components/features/automations/recommended-automations-section.d.ts +1 -7
  347. package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
  348. package/dist/components/features/automations/search-input.d.ts +1 -1
  349. package/dist/components/features/automations/status-badge.d.ts +1 -1
  350. package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
  351. package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
  352. package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
  353. package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
  354. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  355. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  356. package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
  357. package/dist/components/features/backends/backend-form-modal.js +568 -358
  358. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  359. package/dist/components/features/backends/backend-row.d.ts +1 -1
  360. package/dist/components/features/backends/backend-selector.d.ts +2 -1
  361. package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
  362. package/dist/components/features/backends/backend-version.d.ts +1 -1
  363. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  364. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  365. package/dist/components/features/backends/device-flow-auth.d.ts +9 -1
  366. package/dist/components/features/backends/device-flow-auth.js +56 -55
  367. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  368. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  369. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  370. package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
  371. package/dist/components/features/backends/manage-backends-modal.js +1 -1
  372. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  373. package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
  374. package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
  375. package/dist/components/features/browser/browser.d.ts +1 -1
  376. package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
  377. package/dist/components/features/chat/btw-messages.d.ts +1 -1
  378. package/dist/components/features/chat/change-agent-button.d.ts +2 -1
  379. package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
  380. package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
  381. package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
  382. package/dist/components/features/chat/chat-interface.cjs +1 -1
  383. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  384. package/dist/components/features/chat/chat-interface.d.ts +2 -1
  385. package/dist/components/features/chat/chat-interface.js +105 -105
  386. package/dist/components/features/chat/chat-interface.js.map +1 -1
  387. package/dist/components/features/chat/chat-message.cjs +1 -1
  388. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  389. package/dist/components/features/chat/chat-message.d.ts +2 -1
  390. package/dist/components/features/chat/chat-message.js +59 -49
  391. package/dist/components/features/chat/chat-message.js.map +1 -1
  392. package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
  393. package/dist/components/features/chat/chat-play-button.d.ts +1 -1
  394. package/dist/components/features/chat/chat-send-button.d.ts +1 -1
  395. package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
  396. package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
  397. package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
  398. package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
  399. package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
  400. package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
  401. package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
  402. package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
  403. package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
  404. package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
  405. package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
  406. package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
  407. package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
  408. package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
  409. package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
  410. package/dist/components/features/chat/drag-over.d.ts +1 -1
  411. package/dist/components/features/chat/error-message-banner.d.ts +2 -1
  412. package/dist/components/features/chat/error-message.d.ts +2 -1
  413. package/dist/components/features/chat/generic-event-message.d.ts +1 -1
  414. package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
  415. package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
  416. package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
  417. package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
  418. package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
  419. package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
  420. package/dist/components/features/chat/git-control-bar.d.ts +1 -1
  421. package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
  422. package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
  423. package/dist/components/features/chat/goal-status-content.d.ts +1 -1
  424. package/dist/components/features/chat/got-it-button.d.ts +1 -1
  425. package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
  426. package/dist/components/features/chat/model-messages.d.ts +2 -1
  427. package/dist/components/features/chat/mono-component.d.ts +1 -1
  428. package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
  429. package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
  430. package/dist/components/features/chat/path-component.d.ts +1 -1
  431. package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
  432. package/dist/components/features/chat/pending-user-messages.cjs +1 -1
  433. package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
  434. package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
  435. package/dist/components/features/chat/pending-user-messages.js +4 -1
  436. package/dist/components/features/chat/pending-user-messages.js.map +1 -1
  437. package/dist/components/features/chat/plan-preview.d.ts +1 -1
  438. package/dist/components/features/chat/remove-file-button.d.ts +1 -1
  439. package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
  440. package/dist/components/features/chat/success-indicator.d.ts +1 -1
  441. package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
  442. package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
  443. package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
  444. package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
  445. package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
  446. package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
  447. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
  448. package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
  449. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
  450. package/dist/components/features/chat/typing-indicator.cjs +1 -1
  451. package/dist/components/features/chat/typing-indicator.cjs.map +1 -1
  452. package/dist/components/features/chat/typing-indicator.d.ts +8 -1
  453. package/dist/components/features/chat/typing-indicator.js +94 -10
  454. package/dist/components/features/chat/typing-indicator.js.map +1 -1
  455. package/dist/components/features/chat/uploaded-file.d.ts +1 -1
  456. package/dist/components/features/chat/uploaded-files.d.ts +1 -1
  457. package/dist/components/features/chat/uploaded-image.d.ts +2 -1
  458. package/dist/components/features/chat/user-message-body.d.ts +2 -2
  459. package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
  460. package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
  461. package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
  462. package/dist/components/features/command-menu/command-menu-items.d.ts +5 -1
  463. package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
  464. package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
  465. package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
  466. package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
  467. package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
  468. package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
  469. package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
  470. package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
  471. package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
  472. package/dist/components/features/controls/agent-loading.d.ts +1 -1
  473. package/dist/components/features/controls/agent-status.d.ts +1 -1
  474. package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
  475. package/dist/components/features/controls/macros-submenu.d.ts +1 -1
  476. package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
  477. package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
  478. package/dist/components/features/controls/server-status.d.ts +1 -1
  479. package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
  480. package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
  481. package/dist/components/features/controls/tools.d.ts +2 -1
  482. package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
  483. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
  484. package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
  485. package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
  486. package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
  487. package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
  488. package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
  489. package/dist/components/features/conversation/conversation-name.d.ts +2 -1
  490. package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
  491. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
  492. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
  493. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
  494. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
  495. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
  496. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
  497. package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
  498. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
  499. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
  500. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
  501. package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
  502. package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
  503. package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
  504. package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
  505. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
  506. package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
  507. package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
  508. package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
  509. package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
  510. package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
  511. package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
  512. package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
  513. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
  514. package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
  515. package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
  516. package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
  517. package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
  518. package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
  519. package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
  520. package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
  521. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
  522. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
  523. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
  524. package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
  525. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +1 -1
  526. package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
  527. package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
  528. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
  529. package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
  530. package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
  531. package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
  532. package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
  533. package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
  534. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +1 -1
  535. package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
  536. package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
  537. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  538. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  539. package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
  540. package/dist/components/features/conversation-panel/conversation-panel.js +221 -220
  541. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  542. package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
  543. package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
  544. package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
  545. package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
  546. package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
  547. package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
  548. package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
  549. package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
  550. package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
  551. package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
  552. package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
  553. package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
  554. package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
  555. package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
  556. package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
  557. package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
  558. package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
  559. package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
  560. package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
  561. package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
  562. package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
  563. package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
  564. package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
  565. package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
  566. package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
  567. package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
  568. package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
  569. package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
  570. package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
  571. package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
  572. package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
  573. package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
  574. package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
  575. package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
  576. package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
  577. package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
  578. package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
  579. package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
  580. package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
  581. package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
  582. package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
  583. package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
  584. package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
  585. package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
  586. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
  587. package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
  588. package/dist/components/features/files/file-item.d.ts +1 -1
  589. package/dist/components/features/files/file-list.d.ts +2 -1
  590. package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
  591. package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
  592. package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
  593. package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
  594. package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
  595. package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
  596. package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
  597. package/dist/components/features/files-tab/segmented-toggle.d.ts +3 -1
  598. package/dist/components/features/files-tab/segmented-toggle.js +17 -14
  599. package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
  600. package/dist/components/features/files-tab/tree-node.d.ts +1 -1
  601. package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
  602. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
  603. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
  604. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
  605. package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
  606. package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
  607. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
  608. package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
  609. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
  610. package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
  611. package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
  612. package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
  613. package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
  614. package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
  615. package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
  616. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
  617. package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
  618. package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
  619. package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
  620. package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
  621. package/dist/components/features/home/home-header/home-header.d.ts +1 -1
  622. package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
  623. package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
  624. package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
  625. package/dist/components/features/home/new-conversation.d.ts +1 -1
  626. package/dist/components/features/home/open-launcher-button.d.ts +1 -1
  627. package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
  628. package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
  629. package/dist/components/features/home/repo-selection-form.d.ts +2 -1
  630. package/dist/components/features/home/shared/clear-button.d.ts +2 -1
  631. package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
  632. package/dist/components/features/home/shared/empty-state.d.ts +2 -1
  633. package/dist/components/features/home/shared/error-message.d.ts +2 -1
  634. package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
  635. package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
  636. package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
  637. package/dist/components/features/home/tasks/task-card.d.ts +1 -1
  638. package/dist/components/features/home/tasks/task-group.d.ts +1 -1
  639. package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
  640. package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
  641. package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
  642. package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
  643. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
  644. package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
  645. package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
  646. package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
  647. package/dist/components/features/images/image-carousel.d.ts +2 -1
  648. package/dist/components/features/images/image-preview.d.ts +1 -1
  649. package/dist/components/features/images/thumbnail.d.ts +1 -1
  650. package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
  651. package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
  652. package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
  653. package/dist/components/features/manifest/manifest-form-field.d.ts +27 -0
  654. package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
  655. package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
  656. package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +11 -0
  657. package/dist/components/features/manifest/manifest-review-step.d.ts +14 -0
  658. package/dist/components/features/manifest/manifest-setup-dialog.d.ts +14 -0
  659. package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
  660. package/dist/components/features/markdown/anchor.d.ts +1 -1
  661. package/dist/components/features/markdown/blockquote.d.ts +1 -1
  662. package/dist/components/features/markdown/code.d.ts +1 -1
  663. package/dist/components/features/markdown/headings.d.ts +6 -6
  664. package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
  665. package/dist/components/features/markdown/list.d.ts +3 -3
  666. package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
  667. package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
  668. package/dist/components/features/markdown/paragraph.d.ts +1 -1
  669. package/dist/components/features/markdown/plan-components.d.ts +36 -36
  670. package/dist/components/features/markdown/table.d.ts +3 -3
  671. package/dist/components/features/mcp-logo-badge.d.ts +1 -1
  672. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  673. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  674. package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
  675. package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
  676. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  677. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  678. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  679. package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
  680. package/dist/components/features/mcp-page/install-server-modal.js +117 -118
  681. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  682. package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
  683. package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
  684. package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
  685. package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
  686. package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
  687. package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
  688. package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
  689. package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
  690. package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
  691. package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
  692. package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
  693. package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
  694. package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
  695. package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
  696. package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
  697. package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
  698. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
  699. package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
  700. package/dist/components/features/plugins/plugin-card.d.ts +2 -1
  701. package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
  702. package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
  703. package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
  704. package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
  705. package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
  706. package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
  707. package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
  708. package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
  709. package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
  710. package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
  711. package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
  712. package/dist/components/features/settings/agent-canvas-update-card.d.ts +1 -1
  713. package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
  714. package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
  715. package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
  716. package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
  717. package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
  718. package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
  719. package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
  720. package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
  721. package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
  722. package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
  723. package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
  724. package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
  725. package/dist/components/features/settings/banner-message.d.ts +1 -1
  726. package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
  727. package/dist/components/features/settings/input-skeleton.d.ts +1 -1
  728. package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
  729. package/dist/components/features/settings/key-status-icon.d.ts +1 -1
  730. package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
  731. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
  732. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
  733. package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
  734. package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
  735. package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
  736. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
  737. package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
  738. package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
  739. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
  740. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
  741. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  742. package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
  743. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
  744. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  745. package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
  746. package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
  747. package/dist/components/features/settings/mobile-header.d.ts +1 -1
  748. package/dist/components/features/settings/optional-tag.d.ts +1 -1
  749. package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
  750. package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
  751. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
  752. package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
  753. package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
  754. package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
  755. package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
  756. package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
  757. package/dist/components/features/settings/settings-input.cjs +1 -1
  758. package/dist/components/features/settings/settings-input.cjs.map +1 -1
  759. package/dist/components/features/settings/settings-input.d.ts +6 -0
  760. package/dist/components/features/settings/settings-input.js +13 -8
  761. package/dist/components/features/settings/settings-input.js.map +1 -1
  762. package/dist/components/features/settings/settings-layout.d.ts +1 -1
  763. package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
  764. package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
  765. package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
  766. package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
  767. package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
  768. package/dist/components/features/settings/settings-navigation.d.ts +1 -1
  769. package/dist/components/features/settings/settings-switch.d.ts +1 -1
  770. package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
  771. package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
  772. package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
  773. package/dist/components/features/settings/upgrade-button.d.ts +1 -1
  774. package/dist/components/features/sidebar/avatar.d.ts +1 -1
  775. package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
  776. package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
  777. package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
  778. package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
  779. package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
  780. package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
  781. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  782. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  783. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
  784. package/dist/components/features/sidebar/sidebar-rail-body.js +124 -123
  785. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  786. package/dist/components/features/sidebar/sidebar.d.ts +2 -1
  787. package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
  788. package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
  789. package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
  790. package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
  791. package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
  792. package/dist/components/features/skills/skill-card.d.ts +2 -1
  793. package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
  794. package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
  795. package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
  796. package/dist/components/features/skills/skill-filter.d.ts +34 -0
  797. package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
  798. package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
  799. package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
  800. package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
  801. package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
  802. package/dist/components/features/suggestions/suggestions.d.ts +1 -1
  803. package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
  804. package/dist/components/features/terminal/terminal.d.ts +1 -1
  805. package/dist/components/features/tips/random-tip.d.ts +2 -1
  806. package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
  807. package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
  808. package/dist/components/providers/telemetry-provider.d.ts +1 -1
  809. package/dist/components/shared/action-tooltip.d.ts +1 -1
  810. package/dist/components/shared/agent-brand-icon.d.ts +1 -1
  811. package/dist/components/shared/badge.d.ts +1 -1
  812. package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
  813. package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
  814. package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
  815. package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
  816. package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
  817. package/dist/components/shared/buttons/modal-button.d.ts +1 -1
  818. package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
  819. package/dist/components/shared/buttons/remove-button.d.ts +1 -1
  820. package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
  821. package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
  822. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  823. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  824. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
  825. package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
  826. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  827. package/dist/components/shared/git-provider-icon.d.ts +1 -1
  828. package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
  829. package/dist/components/shared/loading-spinner.d.ts +1 -1
  830. package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
  831. package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
  832. package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
  833. package/dist/components/shared/modals/modal-body.d.ts +1 -1
  834. package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
  835. package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
  836. package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
  837. package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
  838. package/dist/components/shared/navigation-link.cjs +1 -1
  839. package/dist/components/shared/navigation-link.cjs.map +1 -1
  840. package/dist/components/shared/navigation-link.js +11 -7
  841. package/dist/components/shared/navigation-link.js.map +1 -1
  842. package/dist/components/shared/risk-alert.d.ts +1 -1
  843. package/dist/components/shared/text-shimmer.d.ts +1 -1
  844. package/dist/components/ui/resize-handle.d.ts +1 -1
  845. package/dist/config/defaults.cjs +1 -1
  846. package/dist/config/defaults.cjs.map +1 -1
  847. package/dist/config/defaults.js +3 -3
  848. package/dist/config/defaults.js.map +1 -1
  849. package/dist/context/navigation-context.d.ts +1 -1
  850. package/dist/context/scroll-context.d.ts +1 -1
  851. package/dist/contexts/active-backend-context.d.ts +1 -1
  852. package/dist/contexts/conversation-websocket-context.d.ts +1 -1
  853. package/dist/contexts/settings-section-header-context.d.ts +1 -1
  854. package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
  855. package/dist/fixtures/home-automations-demo.d.ts +19 -0
  856. package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
  857. package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
  858. package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
  859. package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
  860. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  861. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  862. package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
  863. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
  864. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  865. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  866. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  867. package/dist/hooks/mutation/use-save-settings.js +8 -4
  868. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  869. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  870. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  871. package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
  872. package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
  873. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  874. package/dist/hooks/query/query-keys.cjs.map +1 -1
  875. package/dist/hooks/query/query-keys.d.ts +4 -0
  876. package/dist/hooks/query/query-keys.js.map +1 -1
  877. package/dist/hooks/query/use-active-conversation.d.ts +1 -1
  878. package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
  879. package/dist/hooks/query/use-app-installations.d.ts +1 -1
  880. package/dist/hooks/query/use-automation-detail.d.ts +2 -2
  881. package/dist/hooks/query/use-automation-health.d.ts +2 -0
  882. package/dist/hooks/query/use-automations.d.ts +5 -1
  883. package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
  884. package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
  885. package/dist/hooks/query/use-commit-changes.d.ts +1 -1
  886. package/dist/hooks/query/use-config.d.ts +1 -1
  887. package/dist/hooks/query/use-conversation-history.d.ts +1 -1
  888. package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
  889. package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
  890. package/dist/hooks/query/use-get-secrets.d.ts +1 -1
  891. package/dist/hooks/query/use-home-automations.d.ts +20 -0
  892. package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
  893. package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
  894. package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
  895. package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
  896. package/dist/hooks/query/use-local-git-info.d.ts +1 -1
  897. package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
  898. package/dist/hooks/query/use-manifest-capabilities.d.ts +23 -0
  899. package/dist/hooks/query/use-manifest-prerequisites.d.ts +24 -0
  900. package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
  901. package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
  902. package/dist/hooks/query/use-provider-models.d.ts +1 -1
  903. package/dist/hooks/query/use-search-branches.d.ts +1 -1
  904. package/dist/hooks/query/use-search-providers.d.ts +1 -1
  905. package/dist/hooks/query/use-search-repositories.d.ts +1 -1
  906. package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
  907. package/dist/hooks/query/use-settings.d.ts +2 -2
  908. package/dist/hooks/query/use-skills.d.ts +1 -1
  909. package/dist/hooks/query/use-start-tasks.d.ts +1 -1
  910. package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
  911. package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
  912. package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
  913. package/dist/hooks/query/use-task-polling.d.ts +2 -2
  914. package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
  915. package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
  916. package/dist/hooks/query/use-user-conversation.d.ts +1 -1
  917. package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
  918. package/dist/hooks/use-backend-scoped-path.cjs +2 -0
  919. package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
  920. package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
  921. package/dist/hooks/use-backend-scoped-path.js +13 -0
  922. package/dist/hooks/use-backend-scoped-path.js.map +1 -0
  923. package/dist/hooks/use-home-automation-actions.d.ts +23 -0
  924. package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
  925. package/dist/hooks/use-llm-configured.cjs +1 -1
  926. package/dist/hooks/use-llm-configured.cjs.map +1 -1
  927. package/dist/hooks/use-llm-configured.js +2 -1
  928. package/dist/hooks/use-llm-configured.js.map +1 -1
  929. package/dist/hooks/use-manifest-preflight.d.ts +18 -0
  930. package/dist/hooks/use-tracking.cjs +1 -1
  931. package/dist/hooks/use-tracking.cjs.map +1 -1
  932. package/dist/hooks/use-tracking.d.ts +18 -0
  933. package/dist/hooks/use-tracking.js +25 -1
  934. package/dist/hooks/use-tracking.js.map +1 -1
  935. package/dist/i18n/declaration.cjs +1 -1
  936. package/dist/i18n/declaration.cjs.map +1 -1
  937. package/dist/i18n/declaration.d.ts +103 -2
  938. package/dist/i18n/declaration.js +1 -1
  939. package/dist/i18n/declaration.js.map +1 -1
  940. package/dist/i18n/translation.cjs +2 -2
  941. package/dist/i18n/translation.cjs.map +1 -1
  942. package/dist/i18n/translation.js +1780 -63
  943. package/dist/i18n/translation.js.map +1 -1
  944. package/dist/icons/code-pill.d.ts +1 -1
  945. package/dist/icons/external-link.cjs +2 -0
  946. package/dist/icons/external-link.cjs.map +1 -0
  947. package/dist/icons/external-link.js +22 -0
  948. package/dist/icons/external-link.js.map +1 -0
  949. package/dist/icons/server.cjs +2 -0
  950. package/dist/icons/server.cjs.map +1 -0
  951. package/dist/icons/server.js +17 -0
  952. package/dist/icons/server.js.map +1 -0
  953. package/dist/locales/ar/openhands.json +106 -5
  954. package/dist/locales/ca/openhands.json +106 -5
  955. package/dist/locales/de/openhands.json +106 -5
  956. package/dist/locales/en/openhands.json +107 -6
  957. package/dist/locales/es/openhands.json +106 -5
  958. package/dist/locales/fr/openhands.json +106 -5
  959. package/dist/locales/it/openhands.json +106 -5
  960. package/dist/locales/ja/openhands.json +106 -5
  961. package/dist/locales/ko-KR/openhands.json +106 -5
  962. package/dist/locales/no/openhands.json +106 -5
  963. package/dist/locales/pt/openhands.json +106 -5
  964. package/dist/locales/tr/openhands.json +106 -5
  965. package/dist/locales/uk/openhands.json +106 -5
  966. package/dist/locales/zh-CN/openhands.json +106 -5
  967. package/dist/locales/zh-TW/openhands.json +106 -5
  968. package/dist/manifests/automation-insights.d.ts +64 -0
  969. package/dist/manifests/automation-interface.cjs +2 -0
  970. package/dist/manifests/automation-interface.cjs.map +1 -0
  971. package/dist/manifests/automation-interface.d.ts +76 -0
  972. package/dist/manifests/automation-interface.js +82 -0
  973. package/dist/manifests/automation-interface.js.map +1 -0
  974. package/dist/manifests/automation-setup.cjs +2 -0
  975. package/dist/manifests/automation-setup.cjs.map +1 -0
  976. package/dist/manifests/automation-setup.d.ts +52 -0
  977. package/dist/manifests/automation-setup.js +8 -0
  978. package/dist/manifests/automation-setup.js.map +1 -0
  979. package/dist/manifests/interface-validation.cjs +2 -0
  980. package/dist/manifests/interface-validation.cjs.map +1 -0
  981. package/dist/manifests/interface-validation.d.ts +27 -0
  982. package/dist/manifests/interface-validation.js +360 -0
  983. package/dist/manifests/interface-validation.js.map +1 -0
  984. package/dist/manifests/manifest-actions.d.ts +15 -0
  985. package/dist/manifests/manifest-capabilities.d.ts +25 -0
  986. package/dist/manifests/manifest-error-map.d.ts +40 -0
  987. package/dist/manifests/manifest-local-validation.d.ts +56 -0
  988. package/dist/manifests/manifest-registry.cjs +2 -0
  989. package/dist/manifests/manifest-registry.cjs.map +1 -0
  990. package/dist/manifests/manifest-registry.d.ts +15 -0
  991. package/dist/manifests/manifest-registry.js +26 -0
  992. package/dist/manifests/manifest-registry.js.map +1 -0
  993. package/dist/manifests/manifest-sources.cjs +2 -0
  994. package/dist/manifests/manifest-sources.cjs.map +1 -0
  995. package/dist/manifests/manifest-sources.d.ts +15 -0
  996. package/dist/manifests/manifest-sources.js +8 -0
  997. package/dist/manifests/manifest-sources.js.map +1 -0
  998. package/dist/manifests/manifest-template.d.ts +20 -0
  999. package/dist/manifests/manifest-validation.cjs +2 -0
  1000. package/dist/manifests/manifest-validation.cjs.map +1 -0
  1001. package/dist/manifests/manifest-validation.d.ts +30 -0
  1002. package/dist/manifests/manifest-validation.js +145 -0
  1003. package/dist/manifests/manifest-validation.js.map +1 -0
  1004. package/dist/manifests/types.cjs +2 -0
  1005. package/dist/manifests/types.cjs.map +1 -0
  1006. package/dist/manifests/types.d.ts +355 -0
  1007. package/dist/manifests/types.js +39 -0
  1008. package/dist/manifests/types.js.map +1 -0
  1009. package/dist/mockServiceWorker.js +21 -9
  1010. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -0
  1011. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -0
  1012. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +75 -0
  1013. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -0
  1014. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +9 -0
  1015. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -0
  1016. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +78 -0
  1017. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -0
  1018. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs +17 -0
  1019. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs.map +1 -0
  1020. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js +89 -0
  1021. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js.map +1 -0
  1022. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +10 -0
  1023. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -0
  1024. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +17 -0
  1025. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -0
  1026. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs +9 -0
  1027. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs.map +1 -0
  1028. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js +15 -0
  1029. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js.map +1 -0
  1030. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs +9 -0
  1031. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs.map +1 -0
  1032. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js +18 -0
  1033. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js.map +1 -0
  1034. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs +9 -0
  1035. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs.map +1 -0
  1036. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js +14 -0
  1037. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js.map +1 -0
  1038. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs +9 -0
  1039. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs.map +1 -0
  1040. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js +14 -0
  1041. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js.map +1 -0
  1042. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
  1043. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
  1044. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
  1045. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
  1046. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +2 -0
  1047. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -0
  1048. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +25 -0
  1049. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -0
  1050. package/dist/node_modules/@openhands/extensions/automations/index.cjs +2 -0
  1051. package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -0
  1052. package/dist/node_modules/@openhands/extensions/automations/index.js +18 -0
  1053. package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -0
  1054. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +2 -0
  1055. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -0
  1056. package/dist/node_modules/@openhands/extensions/automations/interface.js +210 -0
  1057. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -0
  1058. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
  1059. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
  1060. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +3 -3
  1061. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
  1062. package/dist/node_modules/@openhands/extensions/skills/index.cjs +174 -53
  1063. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  1064. package/dist/node_modules/@openhands/extensions/skills/index.js +115 -53
  1065. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  1066. package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
  1067. package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
  1068. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
  1069. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
  1070. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
  1071. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
  1072. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
  1073. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
  1074. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
  1075. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
  1076. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
  1077. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
  1078. package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
  1079. package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
  1080. package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
  1081. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  1082. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs +2 -0
  1083. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs.map +1 -0
  1084. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +29 -0
  1085. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
  1086. package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
  1087. package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
  1088. package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
  1089. package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
  1090. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
  1091. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
  1092. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
  1093. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
  1094. package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
  1095. package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
  1096. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
  1097. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  1098. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
  1099. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
  1100. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
  1101. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  1102. package/dist/package.cjs +1 -1
  1103. package/dist/package.cjs.map +1 -1
  1104. package/dist/package.js +34 -33
  1105. package/dist/package.js.map +1 -1
  1106. package/dist/routes/agent-settings.d.ts +3 -2
  1107. package/dist/routes/app-settings.d.ts +2 -1
  1108. package/dist/routes/browser-tab.d.ts +1 -1
  1109. package/dist/routes/changes-tab.d.ts +2 -1
  1110. package/dist/routes/commits-tab.d.ts +1 -1
  1111. package/dist/routes/conversation.d.ts +2 -1
  1112. package/dist/routes/files-tab.d.ts +1 -1
  1113. package/dist/routes/llm-settings.d.ts +3 -2
  1114. package/dist/routes/mcp.cjs +1 -1
  1115. package/dist/routes/mcp.cjs.map +1 -1
  1116. package/dist/routes/mcp.d.ts +2 -1
  1117. package/dist/routes/mcp.js +1 -1
  1118. package/dist/routes/mcp.js.map +1 -1
  1119. package/dist/routes/planner-tab.d.ts +2 -1
  1120. package/dist/routes/secrets-settings.d.ts +2 -1
  1121. package/dist/routes/task-list-tab.d.ts +1 -1
  1122. package/dist/services/settings.cjs +1 -1
  1123. package/dist/services/settings.cjs.map +1 -1
  1124. package/dist/services/settings.js +3 -7
  1125. package/dist/services/settings.js.map +1 -1
  1126. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +2 -19
  1127. package/dist/types/agent-server/core/events/observation-event.d.ts +2 -18
  1128. package/dist/types/automation.d.ts +23 -4
  1129. package/dist/types/mcp-auth.cjs.map +1 -1
  1130. package/dist/types/mcp-auth.d.ts +5 -41
  1131. package/dist/types/mcp-auth.js.map +1 -1
  1132. package/dist/types/mcp-server.d.ts +17 -32
  1133. package/dist/types/settings.d.ts +8 -28
  1134. package/dist/ui/card-title.d.ts +1 -1
  1135. package/dist/ui/card.d.ts +1 -1
  1136. package/dist/ui/combobox-caret.d.ts +3 -3
  1137. package/dist/ui/context-menu.cjs +1 -1
  1138. package/dist/ui/context-menu.cjs.map +1 -1
  1139. package/dist/ui/context-menu.d.ts +3 -2
  1140. package/dist/ui/context-menu.js +10 -9
  1141. package/dist/ui/context-menu.js.map +1 -1
  1142. package/dist/ui/divider.d.ts +1 -1
  1143. package/dist/ui/dropdown/clear-button.d.ts +1 -1
  1144. package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
  1145. package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
  1146. package/dist/ui/dropdown/dropdown.d.ts +1 -1
  1147. package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
  1148. package/dist/ui/dropdown/toggle-button.d.ts +1 -1
  1149. package/dist/ui/help-link.d.ts +1 -1
  1150. package/dist/ui/pre.d.ts +1 -1
  1151. package/dist/ui/toggle-switch.d.ts +2 -2
  1152. package/dist/ui/typography.d.ts +7 -7
  1153. package/dist/utils/api-error-message.d.ts +6 -2
  1154. package/dist/utils/automation-activity-log-export.d.ts +17 -0
  1155. package/dist/utils/automation-catalog.cjs +2 -0
  1156. package/dist/utils/automation-catalog.cjs.map +1 -0
  1157. package/dist/utils/automation-catalog.d.ts +28 -0
  1158. package/dist/utils/automation-catalog.js +5 -0
  1159. package/dist/utils/automation-catalog.js.map +1 -0
  1160. package/dist/utils/automation-timeout.d.ts +5 -6
  1161. package/dist/utils/custom-toast-handlers.d.ts +2 -2
  1162. package/dist/utils/format-relative-time.d.ts +3 -0
  1163. package/dist/utils/mcp-config.cjs +1 -1
  1164. package/dist/utils/mcp-config.cjs.map +1 -1
  1165. package/dist/utils/mcp-config.d.ts +12 -29
  1166. package/dist/utils/mcp-config.js +161 -143
  1167. package/dist/utils/mcp-config.js.map +1 -1
  1168. package/dist/utils/mcp-installed-servers.cjs +1 -1
  1169. package/dist/utils/mcp-installed-servers.cjs.map +1 -1
  1170. package/dist/utils/mcp-installed-servers.d.ts +2 -2
  1171. package/dist/utils/mcp-installed-servers.js +21 -32
  1172. package/dist/utils/mcp-installed-servers.js.map +1 -1
  1173. package/dist/utils/mcp-server-health-key.cjs.map +1 -1
  1174. package/dist/utils/mcp-server-health-key.d.ts +2 -4
  1175. package/dist/utils/mcp-server-health-key.js.map +1 -1
  1176. package/dist/utils/responder-deployment.d.ts +5 -1
  1177. package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
  1178. package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
  1179. package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
  1180. package/dist/utils/settings-like-page-layout-classes.js +1 -1
  1181. package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
  1182. package/dist/utils/skill-category.d.ts +12 -0
  1183. package/dist/utils/transcript-export/index.cjs +5 -5
  1184. package/dist/utils/transcript-export/index.js +12 -12
  1185. package/package.json +36 -33
  1186. package/scripts/check-sdk-version-sync.mjs +6 -6
  1187. package/scripts/check-translation-completeness.cjs +1 -0
  1188. package/scripts/dev-safe.mjs +17 -12
  1189. package/scripts/dev-static.mjs +17 -0
  1190. package/scripts/dev-with-automation.mjs +15 -16
  1191. package/scripts/ingress.mjs +22 -0
  1192. package/scripts/proxy-utils.mjs +157 -2
  1193. package/scripts/runtime-services-info.mjs +6 -6
  1194. package/scripts/static-build.mjs +0 -7
  1195. package/scripts/static-server.mjs +10 -0
  1196. package/build/assets/Trans-B7lYw4uD.js +0 -1
  1197. package/build/assets/active-backend-context-mY7Gff5c.js +0 -2
  1198. package/build/assets/agent-context-settings-BTUmWEzL.js +0 -1
  1199. package/build/assets/agent-profiles-settings-Ilqid_R5.js +0 -1
  1200. package/build/assets/agent-server-conversation-service.api-C_7YnjzP.js +0 -41
  1201. package/build/assets/agent-settings-CxfT4ksO.js +0 -1
  1202. package/build/assets/alert-banner-eRyIwDyU.js +0 -1
  1203. package/build/assets/automation-BGP_I1RR.js +0 -1
  1204. package/build/assets/automation-detail-nEflClmc.js +0 -2
  1205. package/build/assets/automation-export-BO_kfqC8.js +0 -2
  1206. package/build/assets/automations-list-BYncC7gv.js +0 -1
  1207. package/build/assets/backend-form-modal-CKrBF80P.js +0 -1
  1208. package/build/assets/browser-3QjrEr1D.js +0 -6
  1209. package/build/assets/check-CrxQfJZ2.js +0 -1
  1210. package/build/assets/chevron-down-D_LsyTA7.js +0 -1
  1211. package/build/assets/circle-check-DZn9HkLE.js +0 -1
  1212. package/build/assets/cloud-funnel-analytics-NlmDoeo2.js +0 -1
  1213. package/build/assets/command-menu-CvLPs7dg.js +0 -1
  1214. package/build/assets/condenser-settings-C4Y9CzQV.js +0 -1
  1215. package/build/assets/context-menu-list-item-FGaafXGh.js +0 -1
  1216. package/build/assets/conversation-D_ORtpKC.js +0 -1
  1217. package/build/assets/conversation-Dpc5nmGi.js +0 -90
  1218. package/build/assets/conversation-panel-D_ORtpKC.js +0 -1
  1219. package/build/assets/conversation-state-store-CGRQemtx.js +0 -1
  1220. package/build/assets/entry.client-BO2KQj0y.js +0 -2
  1221. package/build/assets/enum-filter-dropdown-DSqPZnsD.js +0 -1
  1222. package/build/assets/files-tab-4c9HFSLo.js +0 -1
  1223. package/build/assets/format-time-delta-DICE64sz.js +0 -1
  1224. package/build/assets/git-provider-icon-0PqmIS_S.js +0 -1
  1225. package/build/assets/home-D9JsyEmE.js +0 -1
  1226. package/build/assets/home-TFhnmZLx.js +0 -1
  1227. package/build/assets/index-home-D9JsyEmE.js +0 -1
  1228. package/build/assets/install-server-modal-BgGRnqA0.js +0 -1
  1229. package/build/assets/llm-not-configured-banner-Y4W9-sar.js +0 -27
  1230. package/build/assets/llm-settings-nPwv7hKu.js +0 -1
  1231. package/build/assets/loader-circle-CGD6-Vak.js +0 -1
  1232. package/build/assets/manifest-1cf33a7b.js +0 -1
  1233. package/build/assets/markdown-renderer-U40HF0Ak.js +0 -8
  1234. package/build/assets/mcp-xDMaHzOw.js +0 -9
  1235. package/build/assets/messages-CdNfZPgd.js +0 -40
  1236. package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
  1237. package/build/assets/onboarding-DWuFieEA.js +0 -1
  1238. package/build/assets/onboarding-modal-C8m72Dpb.js +0 -1
  1239. package/build/assets/plus-CTGLo3aa.js +0 -1
  1240. package/build/assets/recommended-automations-launcher-Dru1yN46.js +0 -58
  1241. package/build/assets/root-B5JXKp1P.css +0 -1
  1242. package/build/assets/root-DOLLQteU.js +0 -2
  1243. package/build/assets/root-layout-xmylWoew.js +0 -3
  1244. package/build/assets/search-BrpWXWUi.js +0 -1
  1245. package/build/assets/segmented-toggle-CZKOdIly.js +0 -1
  1246. package/build/assets/settings-Chfn5xTD.js +0 -1
  1247. package/build/assets/settings-input-BEaTCem1.js +0 -1
  1248. package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
  1249. package/build/assets/settings-service.api-CTJRrvMu.js +0 -1
  1250. package/build/assets/shared-conversation-BvWtTwES.js +0 -1
  1251. package/build/assets/sidebar-mobile-menu-toggle-xiKoUfGa.js +0 -1
  1252. package/build/assets/skills-settings-pUxMr6WZ.js +0 -2
  1253. package/build/assets/use-agent-profiles-DmT9zxAN.js +0 -1
  1254. package/build/assets/use-config-C959QcRC.js +0 -1
  1255. package/build/assets/use-is-authed-BsS4XwSL.js +0 -1
  1256. package/build/assets/use-llm-profiles-CdaxVpyY.js +0 -1
  1257. package/build/assets/use-save-agent-profile-DGJ3-u0M.js +0 -1
  1258. package/build/assets/use-settings-nav-items-DPK5sxvR.js +0 -16
  1259. package/build/assets/use-skills-D_mLhYNa.js +0 -1
  1260. package/build/assets/use-tracking-COqZLobY.js +0 -1
  1261. package/build/assets/useQuery-B38jBavx.js +0 -1
  1262. package/build/assets/utils-DsWhWn2F.js +0 -1
  1263. package/build/assets/v4-DDdyfk2q.js +0 -1
  1264. package/build/assets/vendor~browser-CIoZCqGs.js +0 -47
  1265. package/build/assets/vendor~entry.client-BfviqoVc.js +0 -1
  1266. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js +0 -1
  1267. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js +0 -26
  1268. package/build/assets/vendor~module-BZXjBMvd.js +0 -2
  1269. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js +0 -1
  1270. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js +0 -1
  1271. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C7Yh77RT.js +0 -1
  1272. package/build/assets/x-Dx_JbpHA.js +0 -1
  1273. package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
  1274. package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
  1275. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
  1276. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
  1277. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
  1278. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
  1279. package/dist/node_modules/void-elements/index.cjs +0 -2
  1280. package/dist/node_modules/void-elements/index.cjs.map +0 -1
  1281. package/dist/node_modules/void-elements/index.js +0 -25
  1282. package/dist/node_modules/void-elements/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agent-server-adapter.js","names":[],"sources":["../../src/api/agent-server-adapter.ts"],"sourcesContent":["import { ACP_SETTINGS_KEYS } from \"@openhands/typescript-client\";\nimport { SKILLS_CATALOG } from \"@openhands/extensions/skills\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { ExecutionStatus } from \"#/types/agent-server/core\";\nimport { AgentKind, Settings, SettingsValue } from \"#/types/settings\";\nimport {\n getAcpPreferredDefaultModel,\n getAcpProvider,\n resolveEffectiveAcpModel,\n} from \"#/constants/acp-providers\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport { isAgentServerToolAvailable } from \"./agent-server-compatibility\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getEffectiveLocalBackend } from \"./backend-registry/active-store\";\nimport { buildAuthHeaders } from \"./backend-registry/auth\";\nimport {\n GetHooksResponse,\n PluginSpec,\n AppConversation,\n AppConversationPage,\n SandboxStatus,\n} from \"./conversation-service/agent-server-conversation-service.types\";\nimport SettingsService from \"./settings-service/settings-service.api\";\nimport { getStoredConversationMetadata } from \"./conversation-metadata-store\";\nimport LLMSubscriptionService from \"./llm-subscription-service\";\nimport {\n LLM_AUTH_TYPE_SUBSCRIPTION,\n OPENAI_SUBSCRIPTION_VENDOR,\n isSubscriptionLlmConfig,\n} from \"#/constants/llm-subscription\";\nimport {\n CANVAS_UI_CLIENT_TOOL,\n CANVAS_UI_CLIENT_TOOL_NAME,\n LEGACY_CANVAS_UI_TOOL_NAME,\n type ClientToolSpec,\n} from \"./canvas-ui-client-tool\";\n\nexport interface DirectConversationInfo {\n id: string;\n title?: string | null;\n created_at: string;\n updated_at: string;\n execution_status?: string | null;\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\n sandbox_status?: string | null;\n metrics?: {\n accumulated_cost?: number | null;\n max_budget_per_task?: number | null;\n accumulated_token_usage?: {\n prompt_tokens?: number;\n completion_tokens?: number;\n cache_read_tokens?: number;\n cache_write_tokens?: number;\n context_window?: number;\n per_turn_token?: number;\n } | null;\n } | null;\n agent?: {\n /**\n * Pydantic discriminator from the SDK union: ``\"ACPAgent\"`` for ACP CLI\n * subprocesses (model lives on the subprocess via ``acp_model``),\n * ``\"Agent\"`` for direct litellm. Read by {@link toAppConversation}.\n */\n kind?: string | null;\n acp_model?: string | null;\n /**\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\n */\n acp_server?: string | null;\n llm?: {\n model?: string | null;\n } | null;\n } | null;\n current_model_id?: string | null;\n current_model_name?: string | null;\n workspace?: {\n working_dir?: string | null;\n } | null;\n /**\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\n * ``ACP_SERVER_TAG_KEY`` (\"acpserver\") — but the field is typed as a\n * generic record so future readers don't need another wire-shape change.\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\n * values are opaque strings.\n */\n tags?: Record<string, string> | null;\n launched_agent_profile?: {\n agent_profile_id: string;\n revision: number;\n } | null;\n}\n\nconst DEFAULT_TOOL_NAMES = [\"terminal\", \"file_editor\", \"task_tracker\"];\nconst BROWSER_TOOL_SET_NAME = \"browser_tool_set\";\nconst TASK_TOOL_SET_NAME = \"task_tool_set\";\n\nfunction browserToolsEnabled() {\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \"false\";\n}\n\n/**\n * Shape of the runtime services info (set by the dev launchers in\n * scripts/dev-*.mjs as `VITE_RUNTIME_SERVICES_INFO`, or injected at serve time\n * by `scripts/static-server.mjs` for static builds — see\n * `getRawRuntimeServicesInfo`). All URLs are written from the agent's point of\n * view, not the browser's. The block is rendered into the agent's system prompt\n * via `AgentContext.system_message_suffix` so the agent knows what's\n * reachable from inside its sandbox without having to probe.\n */\ninterface RuntimeServicesInfo {\n mode?: string;\n agent_host_alias?: string;\n services?: {\n agent_server?: { description?: string; url_from_agent?: string };\n ingress?: { description?: string; url_from_agent?: string };\n frontend?: {\n kind?: \"vite\" | \"static\";\n description?: string;\n url_from_agent?: string;\n };\n // `vite` is the legacy key name for the frontend entry, accepted for\n // one release while older dev-stack launchers may still emit it.\n vite?: { description?: string; url_from_agent?: string };\n automation?: {\n description?: string;\n url_from_agent?: string;\n api_prefix?: string;\n docs_url?: string;\n openapi_url?: string;\n auth_env_var?: string;\n };\n };\n}\n\n/**\n * Return the raw runtime-services JSON string, consulting two sources in order\n * (mirrors `getBakedSessionApiKey` in agent-server-config.ts):\n * 1. `VITE_RUNTIME_SERVICES_INFO` — baked into the bundle at build time by\n * the dev launchers (`npm run dev`, dev:static).\n * 2. `window.__AGENT_CANVAS_RUNTIME_SERVICES_INFO__` — injected into\n * index.html at serve time by `scripts/static-server.mjs\n * --runtime-services-info <json>`. This is the path used by static builds\n * (the Docker image and the published binary), where the env var is empty\n * in the prebuilt bundle. Without it the `<RUNTIME_SERVICES>` block is\n * missing and the agent cannot reach the local automation backend.\n */\nfunction getRawRuntimeServicesInfo(): string | null {\n const envRaw = import.meta.env.VITE_RUNTIME_SERVICES_INFO?.trim();\n if (envRaw) return envRaw;\n\n if (typeof window !== \"undefined\") {\n const injected = (window as unknown as Record<string, unknown>)\n .__AGENT_CANVAS_RUNTIME_SERVICES_INFO__;\n if (typeof injected === \"string\") {\n return injected.trim() || null;\n }\n }\n\n return null;\n}\n\nfunction parseRuntimeServicesInfo(): RuntimeServicesInfo | null {\n const raw = getRawRuntimeServicesInfo();\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw) as RuntimeServicesInfo;\n if (!parsed || typeof parsed !== \"object\") return null;\n return parsed;\n } catch {\n // Malformed JSON: ignore and fall back to no runtime info, rather than\n // tearing down conversation creation over a misconfigured env var or\n // injected value.\n return null;\n }\n}\n\n/**\n * Return the deployment mode from the runtime services info, e.g. \"docker\",\n * \"dev:automation\", etc. Returns `null` when no runtime info is configured.\n */\nexport function getDeploymentMode(): string | null {\n return parseRuntimeServicesInfo()?.mode ?? null;\n}\n\n/**\n * Render the runtime services info into a markdown block suitable for\n * appending to the system prompt via `AgentContext.system_message_suffix`.\n *\n * Returns `undefined` when no runtime info is configured, so callers can\n * safely omit the field on production builds (where the launcher doesn't\n * set `VITE_RUNTIME_SERVICES_INFO`).\n */\nexport function buildRuntimeServicesSystemSuffix(): string | undefined {\n const info = parseRuntimeServicesInfo();\n if (!info?.services) return undefined;\n\n const lines: string[] = [];\n lines.push(\"<RUNTIME_SERVICES>\");\n if (info.mode) {\n lines.push(\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\n );\n } else {\n lines.push(\"You are running inside an agent-canvas dev stack.\");\n }\n lines.push(\n \"The following services are reachable from your sandbox. URLs are written\",\n \"from your point of view (i.e., as you should curl/fetch them).\",\n \"\",\n );\n\n const { agent_server, ingress, automation } = info.services;\n const { frontend } = info.services;\n\n if (agent_server?.url_from_agent) {\n lines.push(\n `* Agent Server (you): ${agent_server.url_from_agent}`,\n ` ${agent_server.description ?? \"The agent-server hosting your tool calls.\"}`,\n );\n }\n if (ingress?.url_from_agent) {\n lines.push(\n `* Ingress: ${ingress.url_from_agent}`,\n ` ${ingress.description ?? \"Unified entry point for browser-facing traffic.\"}`,\n );\n }\n if (frontend?.url_from_agent) {\n lines.push(\n `* Frontend: ${frontend.url_from_agent}`,\n ` ${frontend.description ?? \"Frontend dev server.\"}`,\n );\n }\n if (automation?.url_from_agent) {\n lines.push(\n `* Automation backend: ${automation.url_from_agent}`,\n ` ${automation.description ?? \"OpenHands Automations service.\"}`,\n );\n if (automation.docs_url) {\n lines.push(` Docs: ${automation.docs_url}`);\n }\n if (automation.openapi_url) {\n lines.push(` OpenAPI: ${automation.openapi_url}`);\n }\n if (automation.auth_env_var) {\n // X-Session-API-Key is the local convention shared by the agent-server\n // and automation backend (see openhands-automation auth.py).\n lines.push(\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\n );\n }\n } else {\n lines.push(\n \"* Automation backend: not running in this dev mode (skip /api/automation calls).\",\n );\n }\n\n // Anchor the \"don't guess\" warning to the actual agent-server URL for\n // this stack instead of a hardcoded port. The agent-server listens on\n // different ports across dev modes, and baking the wrong port into the\n // system prompt is exactly the kind of confusion this block is meant to\n // prevent.\n const agentServerUrl = agent_server?.url_from_agent;\n lines.push(\n \"\",\n \"Trust this block over guessing: do not assume any other URLs are running.\",\n );\n if (agentServerUrl) {\n lines.push(\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\n \"you are running inside of — NOT the automation backend.\",\n );\n }\n lines.push(\"</RUNTIME_SERVICES>\");\n\n return lines.join(\"\\n\");\n}\n\nexport function toConversationUrl(conversationId: string): string {\n // Local-format conversation URL — points at whichever local agent-server\n // is actually serving the conversation (the bundled one when the active\n // selection is cloud).\n const { host } = getAgentServerClientOptions();\n return `${host}/api/conversations/${conversationId}`;\n}\n\n// TODO(i18n): extract \"Conversation\" once we add CONVERSATION$DEFAULT_TITLE\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\n// fallback inside this pure adapter rather than fanning out to display sites.\nexport function getDefaultConversationTitle(conversationId: string): string {\n return `Conversation ${conversationId.slice(0, 5)}`;\n}\n\nexport function toAppConversation(\n info: DirectConversationInfo,\n): AppConversation {\n const metadata = getStoredConversationMetadata(info.id);\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\n // runtime model fields when available, then the configured ``acp_model`` that\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\n // switching, so surfacing this string is display-only.\n const isAcp = info.agent?.kind === \"ACPAgent\";\n // Only surface ``acp_server`` for ACP conversations even if the wire\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\n // conversation — the chip is identity info for the ACP CLI subprocess,\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\n // picker and degrade the chip to a generic \"ACP\" (#1571).\n const acpServer = isAcp\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\n : null;\n return {\n id: info.id,\n created_by_user_id: null,\n selected_repository: metadata?.selected_repository ?? null,\n selected_branch: metadata?.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? null,\n selected_workspace: metadata?.selected_workspace ?? null,\n active_profile: metadata?.active_profile ?? null,\n title: info.title?.trim()\n ? info.title\n : getDefaultConversationTitle(info.id),\n trigger: null,\n pr_number: [],\n agent_kind: isAcp ? \"acp\" : \"openhands\",\n acp_server: acpServer,\n tags: info.tags ?? null,\n launched_agent_profile: info.launched_agent_profile ?? null,\n // Chip path: omit ``providerDefault`` so that when no concrete model\n // resolves, the chip falls back to the provider display name in\n // ConversationCardFooter rather than a registry default the session may\n // not actually be running.\n llm_model: isAcp\n ? resolveEffectiveAcpModel({\n runtimeName: info.current_model_name,\n runtimeId: info.current_model_id,\n configured: info.agent?.acp_model,\n sdkLlm: info.agent?.llm?.model,\n })\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\n metrics: info.metrics\n ? {\n accumulated_cost: info.metrics.accumulated_cost ?? null,\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\n accumulated_token_usage: info.metrics.accumulated_token_usage\n ? {\n prompt_tokens:\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\n completion_tokens:\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\n cache_read_tokens:\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\n cache_write_tokens:\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\n context_window:\n info.metrics.accumulated_token_usage.context_window ?? 0,\n per_turn_token:\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\n }\n : null,\n }\n : null,\n created_at: info.created_at,\n updated_at: info.updated_at,\n execution_status:\n (info.execution_status as AppConversation[\"execution_status\"]) ??\n ExecutionStatus.IDLE,\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\n conversation_url: toConversationUrl(info.id),\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\n sandbox_id: null,\n workspace: {\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\n },\n public: false,\n sub_conversation_ids: [],\n };\n}\n\nexport function toConversationPage(data: {\n items: DirectConversationInfo[];\n next_page_id?: string | null;\n}): AppConversationPage {\n return {\n items: data.items.map(toAppConversation),\n next_page_id: data.next_page_id ?? null,\n };\n}\n\ntype SettingsRecord = Record<string, unknown>;\n\ninterface AgentToolSpec {\n name: string;\n params: SettingsRecord;\n}\n\ntype AgentSettingsPayload = SettingsRecord & {\n llm?: SettingsRecord;\n agent_context: SettingsRecord;\n tools?: AgentToolSpec[];\n};\n\ninterface LocalWorkspacePayload {\n kind: \"LocalWorkspace\";\n working_dir: string;\n}\n\ninterface InitialMessagePayload {\n role: \"user\";\n content: Array<{ type: \"text\"; text: string }>;\n run: true;\n}\n\ntype ConversationSettingsPayload = SettingsRecord & {\n workspace: LocalWorkspacePayload;\n initial_message?: InitialMessagePayload;\n};\n\nexport const ACP_SERVER_TAG_KEY = \"acpserver\";\n\n/**\n * Conversation tag keys Canvas itself stamps/consumes for internal routing.\n * They are already surfaced through dedicated UI (the ACP provider chip), so\n * the generic tag-chip display filters them out.\n */\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\n ACP_SERVER_TAG_KEY,\n]);\n\n/**\n * User-facing subset of a conversation's server-side tags: everything except\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries\n * sorted by key so chip order doesn't shuffle between refetches.\n */\nexport function getDisplayConversationTags(\n tags: Record<string, string> | null | undefined,\n): Array<[string, string]> {\n if (!tags) {\n return [];\n }\n return Object.entries(tags)\n .filter(([key]) => !RESERVED_CONVERSATION_TAG_KEYS.has(key))\n .sort(([a], [b]) => a.localeCompare(b));\n}\n\nconst FERNET_TOKEN_PREFIX = \"gAAAAA\";\n\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\n \"schema_version\",\n \"agent_settings\",\n \"workspace\",\n \"conversation_id\",\n \"initial_message\",\n \"plugins\",\n]);\n\nfunction toRecord(value: unknown): SettingsRecord {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n\n return structuredClone(value as SettingsRecord);\n}\n\nfunction normalizeSecretString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction hasEncryptedString(value: unknown): boolean {\n if (typeof value === \"string\") {\n return value.startsWith(FERNET_TOKEN_PREFIX);\n }\n if (Array.isArray(value)) {\n return value.some(hasEncryptedString);\n }\n if (isPlainRecord(value)) {\n return Object.values(value).some(hasEncryptedString);\n }\n return false;\n}\n\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\n if (!isPlainRecord(mcpConfig)) {\n return false;\n }\n\n return Object.values(mcpConfig).some(hasEncryptedString);\n}\n\nfunction getConversationConfirmationPolicy(\n conversationSettings: SettingsRecord,\n) {\n if (conversationSettings.confirmation_mode !== true) {\n return { kind: \"NeverConfirm\" };\n }\n\n if (conversationSettings.security_analyzer === \"llm\") {\n return { kind: \"ConfirmRisky\", threshold: \"HIGH\", confirm_unknown: true };\n }\n\n return { kind: \"AlwaysConfirm\" };\n}\n\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\n switch (conversationSettings.security_analyzer) {\n case \"llm\":\n return { kind: \"LLMSecurityAnalyzer\" };\n case \"pattern\":\n return { kind: \"PatternSecurityAnalyzer\" };\n case \"policy_rail\":\n return { kind: \"PolicyRailSecurityAnalyzer\" };\n default:\n return undefined;\n }\n}\n\nfunction isToolRecord(\n value: unknown,\n): value is { name: string; params?: unknown } {\n return (\n !!value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n typeof (value as { name?: unknown }).name === \"string\"\n );\n}\n\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\n if (name === BROWSER_TOOL_SET_NAME) {\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\n }\n\n if (name === TASK_TOOL_SET_NAME) {\n return (\n agentSettings.enable_sub_agents === true &&\n isAgentServerToolAvailable(name)\n );\n }\n\n return true;\n}\n\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\n const tools = new Map<string, AgentToolSpec>();\n\n for (const name of DEFAULT_TOOL_NAMES) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n const configuredTools = agentSettings.tools;\n if (\n Array.isArray(configuredTools) &&\n configuredTools.every((tool) => isToolRecord(tool))\n ) {\n for (const tool of configuredTools) {\n if (shouldIncludeTool(tool.name, agentSettings)) {\n tools.set(tool.name, {\n name: tool.name,\n params: toRecord(tool.params),\n });\n }\n }\n }\n\n return Array.from(tools.values());\n}\n\nfunction buildInitialMessage(\n query?: string,\n conversationInstructions?: string,\n): InitialMessagePayload | null {\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\n Boolean,\n );\n if (parts.length === 0) {\n return null;\n }\n\n return {\n role: \"user\",\n content: [{ type: \"text\", text: parts.join(\"\\n\\n\") }],\n run: true,\n };\n}\n\n/**\n * Shape of a bundled skill entry passed to the agent-server SDK via\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\n * the server uses for trigger matching, activation, and system-prompt\n * injection.\n */\ninterface BundledSkill {\n name: string;\n content: string;\n trigger: { type: \"keyword\"; keywords: string[] } | null;\n source: string;\n description: string | null;\n is_agentskills_format: true;\n license?: string;\n compatibility?: string;\n}\n\n/**\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\n * shape so the agent-server can perform trigger matching, skill activation,\n * and system-prompt injection without cloning the extensions repo.\n *\n * The SDK discriminates triggers via `{ type: \"keyword\", keywords: [...] }`.\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\n */\nfunction buildBundledSkills(): BundledSkill[] {\n return SKILLS_CATALOG.map((entry) => {\n const trigger: BundledSkill[\"trigger\"] =\n entry.triggers?.length > 0\n ? { type: \"keyword\", keywords: entry.triggers }\n : null;\n\n // Use the absolute path to the skill's SKILL.md so the Python\n // agent-server can resolve bundled resources (scripts/, references/).\n // Falls back to \"public\" in library builds where the path isn't known.\n const source = __EXTENSIONS_SKILLS_DIR__\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\n : \"public\";\n\n return {\n name: entry.name,\n content: entry.content,\n trigger,\n source,\n description: entry.description ?? null,\n is_agentskills_format: true as const,\n ...(entry.license ? { license: entry.license } : {}),\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\n };\n });\n}\n\nfunction buildAgentContext(\n agentSettings: SettingsRecord,\n disabledSkills: string[] = [],\n): SettingsRecord {\n const runtimeServicesSuffix = buildRuntimeServicesSystemSuffix();\n const existingContext = toRecord(agentSettings.agent_context);\n\n // Merge bundled public skills with any skills already present in the\n // agent context (e.g. user-defined skills set via the settings API).\n const existingSkills = Array.isArray(existingContext.skills)\n ? (existingContext.skills as SettingsRecord[])\n : [];\n const disabledSkillNames = new Set(disabledSkills);\n const mergedSkills = [...existingSkills, ...buildBundledSkills()].filter(\n (skill) =>\n typeof skill.name !== \"string\" || !disabledSkillNames.has(skill.name),\n );\n\n return {\n ...existingContext,\n // Public skills are bundled at build time from the @openhands/extensions\n // npm package and passed directly in agent_context.skills. Setting\n // load_public_skills to false tells the agent-server SDK to skip its own\n // extensions-repo clone — the frontend is the sole source of public\n // skills now.\n //\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\n // because bundled skills have no clone latency. Users who previously set\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\n skills: mergedSkills,\n load_public_skills: false,\n load_user_skills: true,\n load_project_skills: true,\n ...(runtimeServicesSuffix\n ? { system_message_suffix: runtimeServicesSuffix }\n : {}),\n };\n}\n\nfunction isAcpAgent(settings: Settings): boolean {\n const agentSettings = toRecord(settings.agent_settings);\n return agentSettings.agent_kind === \"acp\";\n}\n\nfunction getAcpServerTag(settings: Settings): string | undefined {\n const agentSettings = toRecord(settings.agent_settings);\n const value = agentSettings.acp_server;\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\n const cmd = agentSettings.acp_command;\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\n const noCommand = cmd === undefined;\n if (!isEmpty && !noCommand) {\n return cmd;\n }\n\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const provider = getAcpProvider(serverKey);\n return provider ? [...provider.default_command] : cmd;\n}\n\nfunction buildConfiguredAcpAgentSettings(\n settings: Settings,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const payload: AgentSettingsPayload = {\n agent_kind: \"acp\",\n agent_context: buildAgentContext(agentSettings, settings.disabled_skills),\n };\n\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\n // backend so concurrent same-provider conversations don't race on a shared\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\n\n for (const key of ACP_SETTINGS_KEYS) {\n // ``acp_model`` is resolved separately below so a saved ``null`` still\n // falls back to the provider's default rather than being dropped.\n if (key === \"acp_model\") continue;\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\n if (key === \"acp_env\") continue;\n const value =\n key === \"acp_command\"\n ? resolveAcpCommand(agentSettings)\n : agentSettings[key];\n if (value !== undefined && value !== null) {\n payload[key] = value;\n }\n }\n\n // ``mcp_config`` is a shared field (not in ACP_SETTINGS_KEYS): forward it\n // so the ACP subprocess connects to the configured MCP servers at session\n // creation. Only include it when it actually carries servers — an empty or\n // malformed value is dropped rather than sending ``mcp_config: {}``.\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length > 0) {\n payload.mcp_config = mcpConfig;\n }\n\n // Saved settings may carry ``acp_model: null`` (existing users predating\n // the default-model registry, or saved fields the agent-server stripped).\n // Fall back to the *preferred* default (Vertex-safe for Gemini) so the\n // conversation starts with whatever the Settings → Agent UI shows — without\n // that, the form's displayed default would silently not take effect at\n // runtime until the user re-saved the page.\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const effectiveModel = resolveEffectiveAcpModel({\n configured: agentSettings.acp_model as string | null | undefined,\n providerDefault: getAcpPreferredDefaultModel(serverKey),\n });\n if (effectiveModel) {\n payload.acp_model = effectiveModel;\n }\n\n return payload;\n}\n\nfunction buildConfiguredOpenHandsAgentSettings(\n settings: Settings,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const llm = toRecord(agentSettings.llm);\n\n llm.model =\n typeof llm.model === \"string\" && llm.model.trim().length > 0\n ? llm.model\n : DEFAULT_SETTINGS.llm_model;\n\n // Stream assistant tokens (parity with ACP agents). The agent-server only\n // emits StreamingDeltaEvents for SDK LLM agents when an LLM has stream=True.\n llm.stream = true;\n\n const apiKey = normalizeSecretString(llm.api_key);\n if (apiKey) {\n llm.api_key = apiKey;\n } else {\n delete llm.api_key;\n }\n\n const baseUrl = normalizeSecretString(llm.base_url);\n if (baseUrl) {\n llm.base_url = baseUrl;\n } else {\n delete llm.base_url;\n }\n\n if (isSubscriptionLlmConfig(llm)) {\n llm.auth_type = LLM_AUTH_TYPE_SUBSCRIPTION;\n llm.subscription_vendor = OPENAI_SUBSCRIPTION_VENDOR;\n delete llm.api_key;\n delete llm.base_url;\n } else {\n delete llm.auth_type;\n delete llm.subscription_vendor;\n }\n\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length === 0) {\n delete agentSettings.mcp_config;\n }\n\n delete agentSettings.acp_server;\n for (const key of ACP_SETTINGS_KEYS) {\n delete agentSettings[key];\n }\n // ``acp_env`` is no longer a forwarded ACP setting (provider creds ride the\n // Secrets panel), but a legacy value may linger on persisted settings —\n // scrub it so it never leaks onto the OpenHands payload.\n delete agentSettings.acp_env;\n\n return {\n ...agentSettings,\n llm,\n agent_context: buildAgentContext(agentSettings, settings.disabled_skills),\n tools: getAgentTools(agentSettings),\n };\n}\n\nfunction buildConfiguredAgentSettings(\n settings: Settings,\n): AgentSettingsPayload {\n return isAcpAgent(settings)\n ? buildConfiguredAcpAgentSettings(settings)\n : buildConfiguredOpenHandsAgentSettings(settings);\n}\n\nfunction buildConfiguredConversationSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n workingDir?: string;\n}): ConversationSettingsPayload {\n const { settings, query, conversationInstructions, plugins, workingDir } =\n options;\n const conversationSettings = toRecord(settings.conversation_settings);\n const initialMessage = buildInitialMessage(query, conversationInstructions);\n\n CONVERSATION_SETTINGS_METADATA_KEYS.forEach(\n (key) => delete conversationSettings[key],\n );\n\n const payload: ConversationSettingsPayload = {\n ...conversationSettings,\n workspace: {\n kind: \"LocalWorkspace\",\n working_dir: workingDir ?? getAgentServerWorkingDir(),\n },\n ...(initialMessage ? { initial_message: initialMessage } : {}),\n ...(plugins?.length\n ? {\n plugins: plugins.map((plugin) => ({\n source: plugin.source,\n ...(plugin.ref ? { ref: plugin.ref } : {}),\n ...(plugin.repo_path ? { repo_path: plugin.repo_path } : {}),\n })),\n }\n : {}),\n };\n\n return payload;\n}\n\ninterface LookupSecret {\n kind: \"LookupSecret\";\n url: string;\n headers?: Record<string, string>;\n description?: string;\n}\n\ntype StartConversationPayload = Record<string, unknown> & {\n // Omitted when launching via ``agent_profile_id`` — the two are mutually\n // exclusive agent sources; the server resolves the profile server-side.\n agent_settings?: AgentSettingsPayload;\n agent_profile_id?: string;\n workspace: LocalWorkspacePayload;\n confirmation_policy: SettingsRecord;\n security_analyzer?: SettingsRecord;\n initial_message?: InitialMessagePayload;\n max_iterations: number;\n stuck_detection: true;\n autotitle: true;\n title_llm_profile?: string;\n worktree: boolean;\n secrets_encrypted?: true;\n conversation_id?: string;\n secrets?: Record<string, LookupSecret>;\n tags?: Record<string, string>;\n client_tools: ClientToolSpec[];\n tool_module_qualnames?: Record<string, string>;\n};\n\nexport interface StartConversationOptions {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n encryptedAgentSettings?: Record<string, SettingsValue>;\n encryptedConversationSettings?: Record<string, SettingsValue>;\n secretsEncrypted?: boolean;\n customSecrets?: Array<{ name: string; description?: string }>;\n // When set, the conversation launches from this AgentProfile (resolved\n // server-side) instead of an inline ``agent_settings`` dump (#3727).\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n}\n\nexport function buildStartConversationRequest(\n options: StartConversationOptions,\n): StartConversationPayload {\n const sourceAgentSettings = options.encryptedAgentSettings\n ? { ...options.settings, agent_settings: options.encryptedAgentSettings }\n : options.settings;\n\n const acpMode = isAcpAgent(sourceAgentSettings);\n const launchAgentKind = options.agentProfileId\n ? options.agentProfileKind\n : acpMode\n ? \"acp\"\n : \"openhands\";\n const agentSettings = buildConfiguredAgentSettings(sourceAgentSettings);\n const acpServerTag = acpMode\n ? getAcpServerTag(sourceAgentSettings)\n : undefined;\n\n const sourceConversationOptions = options.encryptedConversationSettings\n ? {\n ...options,\n settings: {\n ...options.settings,\n conversation_settings: options.encryptedConversationSettings,\n },\n }\n : options;\n\n const conversationSettings = buildConfiguredConversationSettings(\n sourceConversationOptions,\n );\n\n const payload: StartConversationPayload = {\n // ``agent_profile_id`` and ``agent_settings`` are mutually exclusive agent\n // sources; the profile path lets the server resolve the profile (#3727).\n //\n // Enrichment boundary: on the profile path the server rebuilds the agent\n // purely from the stored profile fields, so the client-owned enrichments\n // this adapter folds into ``agent_settings`` do NOT apply. The exec toolset\n // (terminal/file_editor/task_tracker) and public-skill loading are the\n // server/SDK's responsibility to restore on the profile path — tracked in\n // software-agent-sdk#3967 (profile resolution must attach the default\n // toolset + public skills, else a profile-launched OpenHands agent has only\n // Finish/Think). The dev ``RUNTIME_SERVICES`` system-message suffix remains\n // agent-settings-only; the Canvas UI tool is a top-level client tool and\n // therefore works on both inline-agent and profile launch paths.\n //\n // Persistent memory is NOT on that boundary: ``load_memory`` is a global\n // user preference, so the agent-server stamps the stored\n // ``agent_settings.agent_context.load_memory`` onto the profile-resolved\n // agent the same way it already applies the global ``mcp_config``. The\n // toggle therefore applies to both launch paths, and the client must not\n // re-send it here (``agent_profile_id`` and ``agent_settings`` are\n // mutually exclusive).\n ...(options.agentProfileId\n ? { agent_profile_id: options.agentProfileId }\n : { agent_settings: agentSettings }),\n workspace: conversationSettings.workspace,\n client_tools:\n launchAgentKind === \"openhands\" ? [CANVAS_UI_CLIENT_TOOL] : [],\n confirmation_policy:\n getConversationConfirmationPolicy(conversationSettings),\n max_iterations:\n typeof conversationSettings.max_iterations === \"number\"\n ? conversationSettings.max_iterations\n : 500,\n stuck_detection: true,\n autotitle: true,\n ...(options.titleLlmProfile\n ? { title_llm_profile: options.titleLlmProfile }\n : {}),\n worktree: options.worktree ?? true,\n };\n\n // A profile launch resolves the ACP server server-side, so don't stamp the\n // tag from current settings (it may not match the launched profile).\n if (!options.agentProfileId && acpServerTag) {\n payload.tags = { [ACP_SERVER_TAG_KEY]: acpServerTag };\n }\n\n // ``secrets_encrypted`` makes the agent-server decrypt request secrets at\n // conversation start. Non-ACP conversations need it for encrypted LLM keys.\n // ACP normally carries provider credentials as LookupSecrets, so avoid\n // forcing a cipher on fresh ACP-only backends. The exception is MCP:\n // encrypted settings round-trip mcp_config secrets as Fernet tokens,\n // and ACP forwards mcp_config directly to the subprocess.\n if (\n !options.agentProfileId &&\n options.secretsEncrypted &&\n (!acpMode || hasEncryptedMcpSecrets(agentSettings.mcp_config))\n ) {\n payload.secrets_encrypted = true;\n }\n\n if (options.conversationId) {\n payload.conversation_id = options.conversationId;\n }\n\n const securityAnalyzer =\n getConversationSecurityAnalyzer(conversationSettings);\n if (securityAnalyzer) {\n payload.security_analyzer = securityAnalyzer;\n }\n\n if (conversationSettings.initial_message) {\n payload.initial_message = conversationSettings.initial_message;\n }\n\n if (conversationSettings.plugins) {\n payload.plugins = conversationSettings.plugins;\n }\n\n if (conversationSettings.hook_config) {\n payload.hook_config = conversationSettings.hook_config;\n }\n\n const toolModuleQualnames = {\n ...((conversationSettings.tool_module_qualnames as\n | Record<string, string>\n | undefined) ?? {}),\n };\n delete toolModuleQualnames[LEGACY_CANVAS_UI_TOOL_NAME];\n delete toolModuleQualnames[CANVAS_UI_CLIENT_TOOL_NAME];\n if (Object.keys(toolModuleQualnames).length > 0) {\n payload.tool_module_qualnames = toolModuleQualnames;\n }\n\n if (conversationSettings.agent_definitions) {\n payload.agent_definitions = conversationSettings.agent_definitions;\n }\n\n // Every saved secret rides as a LookupSecret the agent-server resolves back\n // from its own store at spawn time — ``request.secrets`` is the sole channel,\n // uniform for ACP and non-ACP (agent-canvas#1039). For ACP the resolution\n // runs off the event loop (software-agent-sdk#3510, >=1.25.0), so the loopback\n // fetch can't deadlock.\n if (options.customSecrets && options.customSecrets.length > 0) {\n const backend = getEffectiveLocalBackend();\n const headers = backend ? buildAuthHeaders(backend) : {};\n\n const secrets: Record<string, LookupSecret> = {};\n for (const secret of options.customSecrets) {\n const lookupSecret: LookupSecret = {\n kind: \"LookupSecret\",\n url: `/api/settings/secrets/${encodeURIComponent(secret.name)}`,\n description: secret.description,\n };\n\n if (Object.keys(headers).length > 0) {\n lookupSecret.headers = headers;\n }\n\n secrets[secret.name] = lookupSecret;\n }\n\n payload.secrets = secrets;\n }\n\n return payload;\n}\n\nexport const SUBSCRIPTION_LOGIN_REQUIRED_ERROR =\n \"Connect your ChatGPT subscription before starting a conversation with this LLM profile.\";\n\n/**\n * Throws if a ChatGPT subscription LLM profile is not connected.\n * Called before conversation creation and LLM profile switch only — not on\n * subsequent message sends or conversation resume. The agent-server must handle\n * mid-conversation token expiry gracefully.\n */\nexport async function assertSubscriptionAuthReady(\n agentSettings: Record<string, unknown>,\n): Promise<void> {\n const llm = toRecord(agentSettings.llm);\n if (!isSubscriptionLlmConfig(llm)) return;\n\n const status = await LLMSubscriptionService.getOpenAIStatus();\n if (!status.connected) {\n throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR);\n }\n}\n\nexport async function buildStartConversationRequestWithEncryptedSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n}): Promise<Record<string, unknown>> {\n const { SecretsService } = await import(\"./secrets-service\");\n\n const [settingsResult, customSecrets] = await Promise.all([\n SettingsService.getSettingsForConversation(),\n SecretsService.getSecrets(),\n ]);\n\n const { agentSettings, conversationSettings, secretsEncrypted } =\n settingsResult;\n\n // A profile launch resolves the LLM server-side, so the current-settings\n // subscription check doesn't apply (and can't see the profile's LLM).\n if (!options.agentProfileId) {\n await assertSubscriptionAuthReady(agentSettings);\n }\n\n return buildStartConversationRequest({\n ...options,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: conversationSettings,\n secretsEncrypted,\n customSecrets,\n });\n}\n\nexport function emptyHooksResponse(): GetHooksResponse {\n return { hooks: [] };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgGA,IAAM,IAAqB;CAAC;CAAY;CAAe;AAAc,GAC/D,IAAwB,oBACxB,IAAqB;AAE3B,SAAS,IAAsB;CAC7B,OAAO;AACT;AAgDA,SAAS,IAA2C;CAIlD,IAAI,OAAO,SAAW,KAAa;EACjC,IAAM,IAAY,OACf;EACH,IAAI,OAAO,KAAa,UACtB,OAAO,EAAS,KAAK,KAAK;CAE9B;CAEA,OAAO;AACT;AAEA,SAA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;AACrB"}
1
+ {"version":3,"file":"agent-server-adapter.js","names":[],"sources":["../../src/api/agent-server-adapter.ts"],"sourcesContent":["import { ACP_SETTINGS_KEYS } from \"@openhands/typescript-client\";\nimport { ServerClient } from \"@openhands/typescript-client/clients\";\nimport { SKILLS_CATALOG } from \"@openhands/extensions/skills\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { ExecutionStatus } from \"#/types/agent-server/core\";\nimport { AgentKind, Settings, SettingsValue } from \"#/types/settings\";\nimport {\n getAcpPreferredDefaultModel,\n getAcpProvider,\n resolveEffectiveAcpModel,\n} from \"#/constants/acp-providers\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport {\n getCachedAgentServerInfo,\n isAgentServerToolAvailable,\n} from \"./agent-server-compatibility\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getEffectiveLocalBackend } from \"./backend-registry/active-store\";\nimport { buildAuthHeaders } from \"./backend-registry/auth\";\nimport {\n GetHooksResponse,\n PluginSpec,\n AppConversation,\n AppConversationPage,\n SandboxStatus,\n} from \"./conversation-service/agent-server-conversation-service.types\";\nimport SettingsService from \"./settings-service/settings-service.api\";\nimport { getStoredConversationMetadata } from \"./conversation-metadata-store\";\nimport LLMSubscriptionService from \"./llm-subscription-service\";\nimport {\n LLM_AUTH_TYPE_SUBSCRIPTION,\n OPENAI_SUBSCRIPTION_VENDOR,\n isSubscriptionLlmConfig,\n} from \"#/constants/llm-subscription\";\nimport {\n CANVAS_UI_CLIENT_TOOL,\n CANVAS_UI_CLIENT_TOOL_NAME,\n LEGACY_CANVAS_UI_TOOL_NAME,\n type ClientToolSpec,\n} from \"./canvas-ui-client-tool\";\n\nexport interface DirectConversationInfo {\n id: string;\n title?: string | null;\n created_at: string;\n updated_at: string;\n execution_status?: string | null;\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\n sandbox_status?: string | null;\n metrics?: {\n accumulated_cost?: number | null;\n max_budget_per_task?: number | null;\n accumulated_token_usage?: {\n prompt_tokens?: number;\n completion_tokens?: number;\n cache_read_tokens?: number;\n cache_write_tokens?: number;\n context_window?: number;\n per_turn_token?: number;\n } | null;\n } | null;\n agent?: {\n /**\n * Pydantic discriminator from the SDK union: ``\"ACPAgent\"`` for ACP CLI\n * subprocesses (model lives on the subprocess via ``acp_model``),\n * ``\"Agent\"`` for direct litellm. Read by {@link toAppConversation}.\n */\n kind?: string | null;\n acp_model?: string | null;\n /**\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\n */\n acp_server?: string | null;\n llm?: {\n model?: string | null;\n } | null;\n } | null;\n current_model_id?: string | null;\n current_model_name?: string | null;\n workspace?: {\n working_dir?: string | null;\n } | null;\n /**\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\n * ``ACP_SERVER_TAG_KEY`` (\"acpserver\") — but the field is typed as a\n * generic record so future readers don't need another wire-shape change.\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\n * values are opaque strings.\n */\n tags?: Record<string, string> | null;\n launched_agent_profile?: {\n agent_profile_id: string;\n revision: number;\n } | null;\n}\n\nconst DEFAULT_TOOL_NAMES = [\"terminal\", \"file_editor\", \"task_tracker\"];\nconst BROWSER_TOOL_SET_NAME = \"browser_tool_set\";\nconst TASK_TOOL_SET_NAME = \"task_tool_set\";\n\nfunction browserToolsEnabled() {\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \"false\";\n}\n\n/**\n * Shape of the runtime services info served by Agent Canvas backends in\n * `/server_info.runtime_services`. All URLs are written from the agent's point of\n * view, not the browser's. The block is rendered into the agent's system prompt\n * via `AgentContext.system_message_suffix` so the agent knows what's reachable\n * from inside its sandbox without having to probe.\n */\nexport interface RuntimeServicesInfo {\n mode?: string;\n agent_host_alias?: string;\n services?: {\n agent_server?: { description?: string; url_from_agent?: string };\n ingress?: { description?: string; url_from_agent?: string };\n frontend?: {\n kind?: \"vite\" | \"static\";\n description?: string;\n url_from_agent?: string;\n };\n // `vite` is the legacy key name for the frontend entry, accepted for\n // one release while older dev-stack launchers may still emit it.\n vite?: { description?: string; url_from_agent?: string };\n automation?: {\n description?: string;\n url_from_agent?: string;\n api_prefix?: string;\n docs_url?: string;\n openapi_url?: string;\n auth_env_var?: string;\n };\n };\n}\n\nexport function parseRuntimeServicesInfo(\n value: unknown,\n): RuntimeServicesInfo | null {\n if (typeof value === \"string\") {\n const raw = value.trim();\n if (!raw) return null;\n try {\n return parseRuntimeServicesInfo(JSON.parse(raw));\n } catch {\n return null;\n }\n }\n\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n\n const parsed = value as RuntimeServicesInfo;\n if (!parsed.services || typeof parsed.services !== \"object\") return null;\n return parsed;\n}\n\nexport async function fetchBackendRuntimeServicesInfo(): Promise<RuntimeServicesInfo | null> {\n let clientOptions: ReturnType<typeof getAgentServerClientOptions>;\n try {\n clientOptions = getAgentServerClientOptions({ timeout: 3000 });\n } catch {\n return null;\n }\n\n const cached = parseRuntimeServicesInfo(\n getCachedAgentServerInfo({ host: clientOptions.host })?.runtime_services,\n );\n if (cached) return cached;\n\n try {\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n return parseRuntimeServicesInfo(\n (serverInfo as { runtime_services?: unknown }).runtime_services,\n );\n } catch {\n return null;\n }\n}\n\n/**\n * Return the deployment mode from the runtime services info, e.g. \"docker\",\n * \"dev:automation\", etc. Returns `null` when no runtime info is supplied.\n */\nexport function getDeploymentMode(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | null {\n return runtimeServicesInfo?.mode ?? null;\n}\n\n/**\n * Render the runtime services info into a markdown block suitable for\n * appending to the system prompt via `AgentContext.system_message_suffix`.\n *\n * Returns `undefined` when no runtime info is available, so callers can safely\n * omit the field when the selected backend does not advertise runtime services.\n */\nexport function buildRuntimeServicesSystemSuffix(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | undefined {\n const info = parseRuntimeServicesInfo(runtimeServicesInfo);\n if (!info?.services) return undefined;\n\n const lines: string[] = [];\n lines.push(\"<RUNTIME_SERVICES>\");\n if (info.mode) {\n lines.push(\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\n );\n } else {\n lines.push(\"You are running inside an agent-canvas dev stack.\");\n }\n lines.push(\n \"The following services are reachable from your sandbox. URLs are written\",\n \"from your point of view (i.e., as you should curl/fetch them).\",\n \"\",\n );\n\n const { agent_server, ingress, automation } = info.services;\n const { frontend } = info.services;\n\n if (agent_server?.url_from_agent) {\n lines.push(\n `* Agent Server (you): ${agent_server.url_from_agent}`,\n ` ${agent_server.description ?? \"The agent-server hosting your tool calls.\"}`,\n );\n }\n if (ingress?.url_from_agent) {\n lines.push(\n `* Ingress: ${ingress.url_from_agent}`,\n ` ${ingress.description ?? \"Unified entry point for browser-facing traffic.\"}`,\n );\n }\n if (frontend?.url_from_agent) {\n lines.push(\n `* Frontend: ${frontend.url_from_agent}`,\n ` ${frontend.description ?? \"Frontend dev server.\"}`,\n );\n }\n if (automation?.url_from_agent) {\n lines.push(\n `* Automation backend: ${automation.url_from_agent}`,\n ` ${automation.description ?? \"OpenHands Automations service.\"}`,\n );\n if (automation.docs_url) {\n lines.push(` Docs: ${automation.docs_url}`);\n }\n if (automation.openapi_url) {\n lines.push(` OpenAPI: ${automation.openapi_url}`);\n }\n if (automation.auth_env_var) {\n // X-Session-API-Key is the local convention shared by the agent-server\n // and automation backend (see openhands-automation auth.py).\n lines.push(\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\n );\n }\n } else {\n lines.push(\n \"* Automation backend: not running in this dev mode (skip /api/automation calls).\",\n );\n }\n\n // Anchor the \"don't guess\" warning to the actual agent-server URL for\n // this stack instead of a hardcoded port. The agent-server listens on\n // different ports across dev modes, and baking the wrong port into the\n // system prompt is exactly the kind of confusion this block is meant to\n // prevent.\n const agentServerUrl = agent_server?.url_from_agent;\n lines.push(\n \"\",\n \"Trust this block over guessing: do not assume any other URLs are running.\",\n );\n if (agentServerUrl) {\n lines.push(\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\n \"you are running inside of — NOT the automation backend.\",\n );\n }\n lines.push(\"</RUNTIME_SERVICES>\");\n\n return lines.join(\"\\n\");\n}\n\nexport function toConversationUrl(conversationId: string): string {\n // Local-format conversation URL — points at whichever local agent-server\n // is actually serving the conversation (the bundled one when the active\n // selection is cloud).\n const { host } = getAgentServerClientOptions();\n return `${host}/api/conversations/${conversationId}`;\n}\n\n// TODO(i18n): extract \"Conversation\" once we add CONVERSATION$DEFAULT_TITLE\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\n// fallback inside this pure adapter rather than fanning out to display sites.\nexport function getDefaultConversationTitle(conversationId: string): string {\n return `Conversation ${conversationId.slice(0, 5)}`;\n}\n\nexport function toAppConversation(\n info: DirectConversationInfo,\n): AppConversation {\n const metadata = getStoredConversationMetadata(info.id);\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\n // runtime model fields when available, then the configured ``acp_model`` that\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\n // switching, so surfacing this string is display-only.\n const isAcp = info.agent?.kind === \"ACPAgent\";\n // Only surface ``acp_server`` for ACP conversations even if the wire\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\n // conversation — the chip is identity info for the ACP CLI subprocess,\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\n // picker and degrade the chip to a generic \"ACP\" (#1571).\n const acpServer = isAcp\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\n : null;\n return {\n id: info.id,\n created_by_user_id: null,\n selected_repository: metadata?.selected_repository ?? null,\n selected_branch: metadata?.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? null,\n selected_workspace: metadata?.selected_workspace ?? null,\n active_profile: metadata?.active_profile ?? null,\n title: info.title?.trim()\n ? info.title\n : getDefaultConversationTitle(info.id),\n trigger: null,\n pr_number: [],\n agent_kind: isAcp ? \"acp\" : \"openhands\",\n acp_server: acpServer,\n tags: info.tags ?? null,\n launched_agent_profile: info.launched_agent_profile ?? null,\n // Chip path: omit ``providerDefault`` so that when no concrete model\n // resolves, the chip falls back to the provider display name in\n // ConversationCardFooter rather than a registry default the session may\n // not actually be running.\n llm_model: isAcp\n ? resolveEffectiveAcpModel({\n runtimeName: info.current_model_name,\n runtimeId: info.current_model_id,\n configured: info.agent?.acp_model,\n sdkLlm: info.agent?.llm?.model,\n })\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\n metrics: info.metrics\n ? {\n accumulated_cost: info.metrics.accumulated_cost ?? null,\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\n accumulated_token_usage: info.metrics.accumulated_token_usage\n ? {\n prompt_tokens:\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\n completion_tokens:\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\n cache_read_tokens:\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\n cache_write_tokens:\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\n context_window:\n info.metrics.accumulated_token_usage.context_window ?? 0,\n per_turn_token:\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\n }\n : null,\n }\n : null,\n created_at: info.created_at,\n updated_at: info.updated_at,\n execution_status:\n (info.execution_status as AppConversation[\"execution_status\"]) ??\n ExecutionStatus.IDLE,\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\n conversation_url: toConversationUrl(info.id),\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\n sandbox_id: null,\n workspace: {\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\n },\n public: false,\n sub_conversation_ids: [],\n };\n}\n\nexport function toConversationPage(data: {\n items: DirectConversationInfo[];\n next_page_id?: string | null;\n}): AppConversationPage {\n return {\n items: data.items.map(toAppConversation),\n next_page_id: data.next_page_id ?? null,\n };\n}\n\ntype SettingsRecord = Record<string, unknown>;\n\ninterface AgentToolSpec {\n name: string;\n params: SettingsRecord;\n}\n\ntype AgentSettingsPayload = SettingsRecord & {\n llm?: SettingsRecord;\n agent_context: SettingsRecord;\n tools?: AgentToolSpec[];\n};\n\ninterface LocalWorkspacePayload {\n kind: \"LocalWorkspace\";\n working_dir: string;\n}\n\ninterface InitialMessagePayload {\n role: \"user\";\n content: Array<{ type: \"text\"; text: string }>;\n run: true;\n}\n\ntype ConversationSettingsPayload = SettingsRecord & {\n workspace: LocalWorkspacePayload;\n initial_message?: InitialMessagePayload;\n};\n\nexport const ACP_SERVER_TAG_KEY = \"acpserver\";\n\n/**\n * Conversation tag keys Canvas itself stamps/consumes for internal routing.\n * They are already surfaced through dedicated UI (the ACP provider chip), so\n * the generic tag-chip display filters them out.\n */\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\n ACP_SERVER_TAG_KEY,\n]);\n\n/**\n * User-facing subset of a conversation's server-side tags: everything except\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries\n * sorted by key so chip order doesn't shuffle between refetches.\n */\nexport function getDisplayConversationTags(\n tags: Record<string, string> | null | undefined,\n): Array<[string, string]> {\n if (!tags) {\n return [];\n }\n return Object.entries(tags)\n .filter(([key]) => !RESERVED_CONVERSATION_TAG_KEYS.has(key))\n .sort(([a], [b]) => a.localeCompare(b));\n}\n\nconst FERNET_TOKEN_PREFIX = \"gAAAAA\";\n\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\n \"schema_version\",\n \"agent_settings\",\n \"workspace\",\n \"conversation_id\",\n \"initial_message\",\n \"plugins\",\n]);\n\nfunction toRecord(value: unknown): SettingsRecord {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n\n return structuredClone(value as SettingsRecord);\n}\n\nfunction normalizeSecretString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction hasEncryptedString(value: unknown): boolean {\n if (typeof value === \"string\") {\n return value.startsWith(FERNET_TOKEN_PREFIX);\n }\n if (Array.isArray(value)) {\n return value.some(hasEncryptedString);\n }\n if (isPlainRecord(value)) {\n return Object.values(value).some(hasEncryptedString);\n }\n return false;\n}\n\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\n if (!isPlainRecord(mcpConfig)) {\n return false;\n }\n\n return Object.values(mcpConfig).some(hasEncryptedString);\n}\n\nfunction getConversationConfirmationPolicy(\n conversationSettings: SettingsRecord,\n) {\n if (conversationSettings.confirmation_mode !== true) {\n return { kind: \"NeverConfirm\" };\n }\n\n if (conversationSettings.security_analyzer === \"llm\") {\n return { kind: \"ConfirmRisky\", threshold: \"HIGH\", confirm_unknown: true };\n }\n\n return { kind: \"AlwaysConfirm\" };\n}\n\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\n switch (conversationSettings.security_analyzer) {\n case \"llm\":\n return { kind: \"LLMSecurityAnalyzer\" };\n case \"pattern\":\n return { kind: \"PatternSecurityAnalyzer\" };\n case \"policy_rail\":\n return { kind: \"PolicyRailSecurityAnalyzer\" };\n default:\n return undefined;\n }\n}\n\nfunction isToolRecord(\n value: unknown,\n): value is { name: string; params?: unknown } {\n return (\n !!value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n typeof (value as { name?: unknown }).name === \"string\"\n );\n}\n\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\n if (name === BROWSER_TOOL_SET_NAME) {\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\n }\n\n if (name === TASK_TOOL_SET_NAME) {\n return (\n agentSettings.enable_sub_agents === true &&\n isAgentServerToolAvailable(name)\n );\n }\n\n return true;\n}\n\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\n const tools = new Map<string, AgentToolSpec>();\n\n for (const name of DEFAULT_TOOL_NAMES) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n const configuredTools = agentSettings.tools;\n if (\n Array.isArray(configuredTools) &&\n configuredTools.every((tool) => isToolRecord(tool))\n ) {\n for (const tool of configuredTools) {\n if (shouldIncludeTool(tool.name, agentSettings)) {\n tools.set(tool.name, {\n name: tool.name,\n params: toRecord(tool.params),\n });\n }\n }\n }\n\n return Array.from(tools.values());\n}\n\nfunction buildInitialMessage(\n query?: string,\n conversationInstructions?: string,\n): InitialMessagePayload | null {\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\n Boolean,\n );\n if (parts.length === 0) {\n return null;\n }\n\n return {\n role: \"user\",\n content: [{ type: \"text\", text: parts.join(\"\\n\\n\") }],\n run: true,\n };\n}\n\n/**\n * Shape of a bundled skill entry passed to the agent-server SDK via\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\n * the server uses for trigger matching, activation, and system-prompt\n * injection.\n */\ninterface BundledSkill {\n name: string;\n content: string;\n trigger: { type: \"keyword\"; keywords: string[] } | null;\n source: string;\n description: string | null;\n is_agentskills_format: true;\n license?: string;\n compatibility?: string;\n}\n\n/**\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\n * shape so the agent-server can perform trigger matching, skill activation,\n * and system-prompt injection without cloning the extensions repo.\n *\n * The SDK discriminates triggers via `{ type: \"keyword\", keywords: [...] }`.\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\n */\nfunction buildBundledSkills(): BundledSkill[] {\n return SKILLS_CATALOG.map((entry) => {\n const trigger: BundledSkill[\"trigger\"] =\n entry.triggers?.length > 0\n ? { type: \"keyword\", keywords: entry.triggers }\n : null;\n\n // Use the absolute path to the skill's SKILL.md so the Python\n // agent-server can resolve bundled resources (scripts/, references/).\n // Falls back to \"public\" in library builds where the path isn't known.\n const source = __EXTENSIONS_SKILLS_DIR__\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\n : \"public\";\n\n return {\n name: entry.name,\n content: entry.content,\n trigger,\n source,\n description: entry.description ?? null,\n is_agentskills_format: true as const,\n ...(entry.license ? { license: entry.license } : {}),\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\n };\n });\n}\n\nfunction buildAgentContext(\n agentSettings: SettingsRecord,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n disabledSkills: string[] = [],\n): SettingsRecord {\n const runtimeServicesSuffix =\n buildRuntimeServicesSystemSuffix(runtimeServicesInfo);\n const existingContext = toRecord(agentSettings.agent_context);\n\n // Merge bundled public skills with any skills already present in the\n // agent context (e.g. user-defined skills set via the settings API).\n const existingSkills = Array.isArray(existingContext.skills)\n ? (existingContext.skills as SettingsRecord[])\n : [];\n const disabledSkillNames = new Set(disabledSkills);\n const mergedSkills = [...existingSkills, ...buildBundledSkills()].filter(\n (skill) =>\n typeof skill.name !== \"string\" || !disabledSkillNames.has(skill.name),\n );\n\n return {\n ...existingContext,\n // Public skills are bundled at build time from the @openhands/extensions\n // npm package and passed directly in agent_context.skills. Setting\n // load_public_skills to false tells the agent-server SDK to skip its own\n // extensions-repo clone — the frontend is the sole source of public\n // skills now.\n //\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\n // because bundled skills have no clone latency. Users who previously set\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\n skills: mergedSkills,\n load_public_skills: false,\n load_user_skills: true,\n load_project_skills: true,\n ...(runtimeServicesSuffix\n ? { system_message_suffix: runtimeServicesSuffix }\n : {}),\n };\n}\n\nfunction isAcpAgent(settings: Settings): boolean {\n const agentSettings = toRecord(settings.agent_settings);\n return agentSettings.agent_kind === \"acp\";\n}\n\nfunction getAcpServerTag(settings: Settings): string | undefined {\n const agentSettings = toRecord(settings.agent_settings);\n const value = agentSettings.acp_server;\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\n const cmd = agentSettings.acp_command;\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\n const noCommand = cmd === undefined;\n if (!isEmpty && !noCommand) {\n return cmd;\n }\n\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const provider = getAcpProvider(serverKey);\n return provider ? [...provider.default_command] : cmd;\n}\n\nfunction buildConfiguredAcpAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const payload: AgentSettingsPayload = {\n agent_kind: \"acp\",\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n };\n\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\n // backend so concurrent same-provider conversations don't race on a shared\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\n\n for (const key of ACP_SETTINGS_KEYS) {\n // ``acp_model`` is resolved separately below so a saved ``null`` still\n // falls back to the provider's default rather than being dropped.\n if (key === \"acp_model\") continue;\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\n if (key === \"acp_env\") continue;\n const value =\n key === \"acp_command\"\n ? resolveAcpCommand(agentSettings)\n : agentSettings[key];\n if (value !== undefined && value !== null) {\n payload[key] = value;\n }\n }\n\n // ``mcp_config`` is a shared field (not in ACP_SETTINGS_KEYS): forward it\n // so the ACP subprocess connects to the configured MCP servers at session\n // creation. Only include it when it actually carries servers — an empty or\n // malformed value is dropped rather than sending ``mcp_config: {}``.\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length > 0) {\n payload.mcp_config = mcpConfig;\n }\n\n // Saved settings may carry ``acp_model: null`` (existing users predating\n // the default-model registry, or saved fields the agent-server stripped).\n // Fall back to the *preferred* default (Vertex-safe for Gemini) so the\n // conversation starts with whatever the Settings → Agent UI shows — without\n // that, the form's displayed default would silently not take effect at\n // runtime until the user re-saved the page.\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const effectiveModel = resolveEffectiveAcpModel({\n configured: agentSettings.acp_model as string | null | undefined,\n providerDefault: getAcpPreferredDefaultModel(serverKey),\n });\n if (effectiveModel) {\n payload.acp_model = effectiveModel;\n }\n\n return payload;\n}\n\nfunction buildConfiguredOpenHandsAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const llm = toRecord(agentSettings.llm);\n\n llm.model =\n typeof llm.model === \"string\" && llm.model.trim().length > 0\n ? llm.model\n : DEFAULT_SETTINGS.llm_model;\n\n // Stream assistant tokens (parity with ACP agents). The agent-server only\n // emits StreamingDeltaEvents for SDK LLM agents when an LLM has stream=True.\n llm.stream = true;\n\n const apiKey = normalizeSecretString(llm.api_key);\n if (apiKey) {\n llm.api_key = apiKey;\n } else {\n delete llm.api_key;\n }\n\n const baseUrl = normalizeSecretString(llm.base_url);\n if (baseUrl) {\n llm.base_url = baseUrl;\n } else {\n delete llm.base_url;\n }\n\n if (isSubscriptionLlmConfig(llm)) {\n llm.auth_type = LLM_AUTH_TYPE_SUBSCRIPTION;\n llm.subscription_vendor = OPENAI_SUBSCRIPTION_VENDOR;\n delete llm.api_key;\n delete llm.base_url;\n } else {\n delete llm.auth_type;\n delete llm.subscription_vendor;\n }\n\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length === 0) {\n delete agentSettings.mcp_config;\n }\n\n delete agentSettings.acp_server;\n for (const key of ACP_SETTINGS_KEYS) {\n delete agentSettings[key];\n }\n // ``acp_env`` is no longer a forwarded ACP setting (provider creds ride the\n // Secrets panel), but a legacy value may linger on persisted settings —\n // scrub it so it never leaks onto the OpenHands payload.\n delete agentSettings.acp_env;\n\n return {\n ...agentSettings,\n llm,\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n tools: getAgentTools(agentSettings),\n };\n}\n\nfunction buildConfiguredAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n return isAcpAgent(settings)\n ? buildConfiguredAcpAgentSettings(settings, runtimeServicesInfo)\n : buildConfiguredOpenHandsAgentSettings(settings, runtimeServicesInfo);\n}\n\nfunction buildConfiguredConversationSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n workingDir?: string;\n}): ConversationSettingsPayload {\n const { settings, query, conversationInstructions, plugins, workingDir } =\n options;\n const conversationSettings = toRecord(settings.conversation_settings);\n const initialMessage = buildInitialMessage(query, conversationInstructions);\n\n CONVERSATION_SETTINGS_METADATA_KEYS.forEach(\n (key) => delete conversationSettings[key],\n );\n\n const payload: ConversationSettingsPayload = {\n ...conversationSettings,\n workspace: {\n kind: \"LocalWorkspace\",\n working_dir: workingDir ?? getAgentServerWorkingDir(),\n },\n ...(initialMessage ? { initial_message: initialMessage } : {}),\n ...(plugins?.length\n ? {\n plugins: plugins.map((plugin) => ({\n source: plugin.source,\n ...(plugin.ref ? { ref: plugin.ref } : {}),\n ...(plugin.repo_path ? { repo_path: plugin.repo_path } : {}),\n })),\n }\n : {}),\n };\n\n return payload;\n}\n\ninterface LookupSecret {\n kind: \"LookupSecret\";\n url: string;\n headers?: Record<string, string>;\n description?: string;\n}\n\ntype StartConversationPayload = Record<string, unknown> & {\n // Omitted when launching via ``agent_profile_id`` — the two are mutually\n // exclusive agent sources; the server resolves the profile server-side.\n agent_settings?: AgentSettingsPayload;\n agent_profile_id?: string;\n workspace: LocalWorkspacePayload;\n confirmation_policy: SettingsRecord;\n security_analyzer?: SettingsRecord;\n initial_message?: InitialMessagePayload;\n max_iterations: number;\n stuck_detection: true;\n autotitle: true;\n title_llm_profile?: string;\n worktree: boolean;\n secrets_encrypted?: true;\n conversation_id?: string;\n secrets?: Record<string, LookupSecret>;\n tags?: Record<string, string>;\n client_tools: ClientToolSpec[];\n tool_module_qualnames?: Record<string, string>;\n};\n\nexport interface StartConversationOptions {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n encryptedAgentSettings?: Record<string, SettingsValue>;\n encryptedConversationSettings?: Record<string, SettingsValue>;\n secretsEncrypted?: boolean;\n customSecrets?: Array<{ name: string; description?: string }>;\n // When set, the conversation launches from this AgentProfile (resolved\n // server-side) instead of an inline ``agent_settings`` dump (#3727).\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n runtimeServicesInfo?: RuntimeServicesInfo | null;\n}\n\nexport function buildStartConversationRequest(\n options: StartConversationOptions,\n): StartConversationPayload {\n const sourceAgentSettings = options.encryptedAgentSettings\n ? { ...options.settings, agent_settings: options.encryptedAgentSettings }\n : options.settings;\n\n const acpMode = isAcpAgent(sourceAgentSettings);\n const launchAgentKind = options.agentProfileId\n ? options.agentProfileKind\n : acpMode\n ? \"acp\"\n : \"openhands\";\n const agentSettings = buildConfiguredAgentSettings(\n sourceAgentSettings,\n options.runtimeServicesInfo,\n );\n const acpServerTag = acpMode\n ? getAcpServerTag(sourceAgentSettings)\n : undefined;\n\n const sourceConversationOptions = options.encryptedConversationSettings\n ? {\n ...options,\n settings: {\n ...options.settings,\n conversation_settings: options.encryptedConversationSettings,\n },\n }\n : options;\n\n const conversationSettings = buildConfiguredConversationSettings(\n sourceConversationOptions,\n );\n\n const payload: StartConversationPayload = {\n // ``agent_profile_id`` and ``agent_settings`` are mutually exclusive agent\n // sources; the profile path lets the server resolve the profile (#3727).\n //\n // Enrichment boundary: on the profile path the server rebuilds the agent\n // purely from the stored profile fields, so the client-owned enrichments\n // this adapter folds into ``agent_settings`` do NOT apply. The exec toolset\n // (terminal/file_editor/task_tracker) and public-skill loading are the\n // server/SDK's responsibility to restore on the profile path — tracked in\n // software-agent-sdk#3967 (profile resolution must attach the default\n // toolset + public skills, else a profile-launched OpenHands agent has only\n // Finish/Think). The dev ``RUNTIME_SERVICES`` system-message suffix remains\n // agent-settings-only; the Canvas UI tool is a top-level client tool and\n // therefore works on both inline-agent and profile launch paths.\n //\n // Persistent memory is NOT on that boundary: ``load_memory`` is a global\n // user preference, so the agent-server stamps the stored\n // ``agent_settings.agent_context.load_memory`` onto the profile-resolved\n // agent the same way it already applies the global ``mcp_config``. The\n // toggle therefore applies to both launch paths, and the client must not\n // re-send it here (``agent_profile_id`` and ``agent_settings`` are\n // mutually exclusive).\n ...(options.agentProfileId\n ? { agent_profile_id: options.agentProfileId }\n : { agent_settings: agentSettings }),\n workspace: conversationSettings.workspace,\n client_tools:\n launchAgentKind === \"openhands\" ? [CANVAS_UI_CLIENT_TOOL] : [],\n confirmation_policy:\n getConversationConfirmationPolicy(conversationSettings),\n max_iterations:\n typeof conversationSettings.max_iterations === \"number\"\n ? conversationSettings.max_iterations\n : 500,\n stuck_detection: true,\n autotitle: true,\n ...(options.titleLlmProfile\n ? { title_llm_profile: options.titleLlmProfile }\n : {}),\n worktree: options.worktree ?? true,\n };\n\n // A profile launch resolves the ACP server server-side, so don't stamp the\n // tag from current settings (it may not match the launched profile).\n if (!options.agentProfileId && acpServerTag) {\n payload.tags = { [ACP_SERVER_TAG_KEY]: acpServerTag };\n }\n\n // ``secrets_encrypted`` makes the agent-server decrypt request secrets at\n // conversation start. Non-ACP conversations need it for encrypted LLM keys.\n // ACP normally carries provider credentials as LookupSecrets, so avoid\n // forcing a cipher on fresh ACP-only backends. The exception is MCP:\n // encrypted settings round-trip mcp_config secrets as Fernet tokens,\n // and ACP forwards mcp_config directly to the subprocess.\n if (\n !options.agentProfileId &&\n options.secretsEncrypted &&\n (!acpMode || hasEncryptedMcpSecrets(agentSettings.mcp_config))\n ) {\n payload.secrets_encrypted = true;\n }\n\n if (options.conversationId) {\n payload.conversation_id = options.conversationId;\n }\n\n const securityAnalyzer =\n getConversationSecurityAnalyzer(conversationSettings);\n if (securityAnalyzer) {\n payload.security_analyzer = securityAnalyzer;\n }\n\n if (conversationSettings.initial_message) {\n payload.initial_message = conversationSettings.initial_message;\n }\n\n if (conversationSettings.plugins) {\n payload.plugins = conversationSettings.plugins;\n }\n\n if (conversationSettings.hook_config) {\n payload.hook_config = conversationSettings.hook_config;\n }\n\n const toolModuleQualnames = {\n ...((conversationSettings.tool_module_qualnames as\n | Record<string, string>\n | undefined) ?? {}),\n };\n delete toolModuleQualnames[LEGACY_CANVAS_UI_TOOL_NAME];\n delete toolModuleQualnames[CANVAS_UI_CLIENT_TOOL_NAME];\n if (Object.keys(toolModuleQualnames).length > 0) {\n payload.tool_module_qualnames = toolModuleQualnames;\n }\n\n if (conversationSettings.agent_definitions) {\n payload.agent_definitions = conversationSettings.agent_definitions;\n }\n\n // Every saved secret rides as a LookupSecret the agent-server resolves back\n // from its own store at spawn time — ``request.secrets`` is the sole channel,\n // uniform for ACP and non-ACP (agent-canvas#1039). For ACP the resolution\n // runs off the event loop (software-agent-sdk#3510, >=1.25.0), so the loopback\n // fetch can't deadlock.\n if (options.customSecrets && options.customSecrets.length > 0) {\n const backend = getEffectiveLocalBackend();\n const headers = backend ? buildAuthHeaders(backend) : {};\n\n const secrets: Record<string, LookupSecret> = {};\n for (const secret of options.customSecrets) {\n const lookupSecret: LookupSecret = {\n kind: \"LookupSecret\",\n url: `/api/settings/secrets/${encodeURIComponent(secret.name)}`,\n description: secret.description,\n };\n\n if (Object.keys(headers).length > 0) {\n lookupSecret.headers = headers;\n }\n\n secrets[secret.name] = lookupSecret;\n }\n\n payload.secrets = secrets;\n }\n\n return payload;\n}\n\nexport const SUBSCRIPTION_LOGIN_REQUIRED_ERROR =\n \"Connect your ChatGPT subscription before starting a conversation with this LLM profile.\";\n\n/**\n * Throws if a ChatGPT subscription LLM profile is not connected.\n * Called before conversation creation and LLM profile switch only — not on\n * subsequent message sends or conversation resume. The agent-server must handle\n * mid-conversation token expiry gracefully.\n */\nexport async function assertSubscriptionAuthReady(\n agentSettings: Record<string, unknown>,\n): Promise<void> {\n const llm = toRecord(agentSettings.llm);\n if (!isSubscriptionLlmConfig(llm)) return;\n\n const status = await LLMSubscriptionService.getOpenAIStatus();\n if (!status.connected) {\n throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR);\n }\n}\n\nexport async function buildStartConversationRequestWithEncryptedSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n}): Promise<Record<string, unknown>> {\n const { SecretsService } = await import(\"./secrets-service\");\n\n const [settingsResult, customSecrets, runtimeServicesInfo] =\n await Promise.all([\n SettingsService.getSettingsForConversation(),\n SecretsService.getSecrets(),\n fetchBackendRuntimeServicesInfo(),\n ]);\n\n const { agentSettings, conversationSettings, secretsEncrypted } =\n settingsResult;\n\n // A profile launch resolves the LLM server-side, so the current-settings\n // subscription check doesn't apply (and can't see the profile's LLM).\n if (!options.agentProfileId) {\n await assertSubscriptionAuthReady(agentSettings);\n }\n\n return buildStartConversationRequest({\n ...options,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: conversationSettings,\n secretsEncrypted,\n customSecrets,\n runtimeServicesInfo,\n });\n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M,IAA6B;IACjC,MAAM;IACN,KAAK,yBAAyB,mBAAmB,EAAO,IAAI;IAC5D,aAAa,EAAO;GACtB;GAMA,AAJI,OAAO,KAAK,CAAO,EAAE,SAAS,MAChC,EAAa,UAAU,IAGzB,EAAQ,EAAO,QAAQ;EACzB;EAEA,EAAQ,UAAU;CACpB;CAEA,OAAO;AACT;AAEA,IAAa,KACX;AAQF,eAAsB,EACpB,GACe;CAEV,MADO,EAAS,EAAc,GACN,CAAG,KAG5B,EAAC,MADgB,EAAuB,gBAAgB,GAChD,WACV,MAAU,MAAM,EAAiC;AAErD;AAEA,eAAsB,GAAmD,GAWpC;CACnC,IAAM,EAAE,sBAAmB,MAAM,OAAO,yBAElC,CAAC,GAAgB,GAAe,KACpC,MAAM,QAAQ,IAAI;EAChB,EAAgB,2BAA2B;EAC3C,EAAe,WAAW;EAC1B,EAAgC;CAClC,CAAC,GAEG,EAAE,kBAAe,yBAAsB,wBAC3C;CAQF,OAJK,EAAQ,kBACX,MAAM,EAA4B,CAAa,GAG1C,GAA8B;EACnC,GAAG;EACH,wBAAwB;EACxB,+BAA+B;EAC/B;EACA;EACA;CACF,CAAC;AACH;AAEA,SAAgB,KAAuC;CACrD,OAAO,EAAE,OAAO,CAAC,EAAE;AACrB"}
@@ -1,2 +1,2 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/server-client.cjs"),t=require("../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const n=require("./agent-server-config.cjs"),r=require("./backend-registry/active-store.cjs"),i=require("./agent-server-client-options.cjs"),a=require("../config/defaults.cjs");var o=5e3,s=`unknown`,c=a.default.compatibility.minimumAgentServer,l=`AGENT_SERVER_UNSUPPORTED_VERSION`,u=`AGENT_SERVER_UNKNOWN_VERSION`,d=null,f=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,p=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}},m=e=>e instanceof p||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`,h=class extends p{code=l;actualVersion;requiredVersion=c;constructor(e){let t=`Agent Canvas requires agent-server ${c} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},g=class extends p{code=u;actualVersion;requiredVersion=c;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${c} 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}},_=e=>n.isAuthRequired()&&x(e,401);function v(){d=null}function y(e){let t=f(d);return Array.isArray(t)?t.includes(e):!0}function b(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function x(e,t){return b(e)&&e.status===t}function S(e){return typeof e==`string`&&e.trim()||null}function C(e){return S(e.sdk_version)}function w(e){return S(e.version)??C(e)}function T(e){let t=w(e);return!t||t.toLowerCase()===s?null:t}function E(e){let t=T(e);return!t||!k(t)?null:t}function D(e){return!d||e&&r.getEffectiveLocalBackend()?.host!==e?null:E(d)}function O(e,t){let n=k(e),r=k(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 k(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 A(e){let t=T(e);if(!t)throw v(),new g(w(e));let n=O(t,c);if(n===null)throw v(),new g(t);if(n<0)throw v(),new h(t)}async function j(){let a=r.getEffectiveLocalBackend();if(!a){if(v(),r.isNoBackend(r.getActiveBackend().backend))throw new p(`No backend configured`,{noBackendConfigured:!0});return null}let s=i.getAgentServerClientOptions({host:a.host,sessionApiKey:a.apiKey||null,timeout:o}),c;try{c=await new e.ServerClient(s).getServerInfo()}catch(e){throw v(),x(e,401)?e:new p(e instanceof Error?e.message:null)}if(A(c),n.isAuthRequired())try{await new t.SettingsClient(s).getSettings()}catch(e){if(x(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return d=c,c}exports.assertAgentServerVersionIsSupported=A,exports.clearCachedAgentServerInfo=v,exports.compareAgentServerVersions=O,exports.getCachedAgentServerVersion=D,exports.getDisplayAgentServerVersion=E,exports.isAgentServerAuthError=_,exports.isAgentServerToolAvailable=y,exports.isAgentServerUnavailableError=m,exports.isSdkHttpStatusError=x,exports.loadAgentServerInfo=j;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/server-client.cjs"),t=require("../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const n=require("./agent-server-config.cjs"),r=require("./backend-registry/active-store.cjs"),i=require("./agent-server-client-options.cjs"),a=require("../config/defaults.cjs");var o=5e3,s=`unknown`,c=a.default.compatibility.minimumAgentServer,l=`AGENT_SERVER_UNSUPPORTED_VERSION`,u=`AGENT_SERVER_UNKNOWN_VERSION`,d=null,f=null,p=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,m=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}},h=e=>e instanceof m||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`,g=class extends m{code=l;actualVersion;requiredVersion=c;constructor(e){let t=`Agent Canvas requires agent-server ${c} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},_=class extends m{code=u;actualVersion;requiredVersion=c;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${c} 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}},v=e=>n.isAuthRequired()&&C(e,401);function y(){d=null,f=null}function b(e){return e?.host&&e.host!==f?null:d}function x(e){let t=p(d);return Array.isArray(t)?t.includes(e):!0}function S(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function C(e,t){return S(e)&&e.status===t}function w(e){return typeof e==`string`&&e.trim()||null}function T(e){return w(e.sdk_version)}function E(e){return w(e.version)??T(e)}function D(e){let t=E(e);return!t||t.toLowerCase()===s?null:t}function O(e){let t=D(e);return!t||!j(t)?null:t}function k(e){return!d||e&&r.getEffectiveLocalBackend()?.host!==e?null:O(d)}function A(e,t){let n=j(e),r=j(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 j(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 M(e){let t=D(e);if(!t)throw y(),new _(E(e));let n=A(t,c);if(n===null)throw y(),new _(t);if(n<0)throw y(),new g(t)}async function N(){let a=r.getEffectiveLocalBackend();if(!a){if(y(),r.isNoBackend(r.getActiveBackend().backend))throw new m(`No backend configured`,{noBackendConfigured:!0});return null}let s=i.getAgentServerClientOptions({host:a.host,sessionApiKey:a.apiKey||null,timeout:o}),c;try{c=await new e.ServerClient(s).getServerInfo()}catch(e){throw y(),C(e,401)?e:new m(e instanceof Error?e.message:null)}if(M(c),n.isAuthRequired())try{await new t.SettingsClient(s).getSettings()}catch(e){if(C(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return d=c,f=s.host,c}exports.assertAgentServerVersionIsSupported=M,exports.clearCachedAgentServerInfo=y,exports.compareAgentServerVersions=A,exports.getCachedAgentServerInfo=b,exports.getCachedAgentServerVersion=k,exports.getDisplayAgentServerVersion=O,exports.isAgentServerAuthError=v,exports.isAgentServerToolAvailable=x,exports.isAgentServerUnavailableError=h,exports.isSdkHttpStatusError=C,exports.loadAgentServerInfo=N;
2
2
  //# sourceMappingURL=agent-server-compatibility.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-server-compatibility.cjs","names":[],"sources":["../../src/api/agent-server-compatibility.ts"],"sourcesContent":["import {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport type { ServerInfo as BaseServerInfo } from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { isAuthRequired } from \"#/api/agent-server-config\";\nimport {\n getActiveBackend,\n getEffectiveLocalBackend,\n isNoBackend,\n} from \"#/api/backend-registry/active-store\";\nimport defaults from \"../../config/defaults.json\";\n\nconst AGENT_SERVER_INFO_TIMEOUT_MS = 5000;\nconst UNKNOWN_AGENT_SERVER_VERSION = \"unknown\";\n\nexport const MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION =\n defaults.compatibility.minimumAgentServer;\nexport const AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE =\n \"AGENT_SERVER_UNSUPPORTED_VERSION\";\nexport const AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE =\n \"AGENT_SERVER_UNKNOWN_VERSION\";\n\nexport interface AgentServerInfo extends BaseServerInfo {\n sdk_version?: string;\n usable_tools?: string[] | null;\n}\n\nlet cachedAgentServerInfo: AgentServerInfo | null = null;\n\nconst getAdvertisedTools = (serverInfo: AgentServerInfo | null) => {\n if (Array.isArray(serverInfo?.usable_tools)) {\n return serverInfo.usable_tools;\n }\n return null;\n};\n\nexport class AgentServerUnavailableError extends Error {\n readonly details: string | null;\n readonly noBackendConfigured: boolean;\n\n constructor(\n details?: string | null,\n options?: { noBackendConfigured?: boolean },\n ) {\n const noBackendConfigured = options?.noBackendConfigured ?? false;\n super(\n noBackendConfigured\n ? \"No agent server backend is configured yet. Add a backend to get started.\"\n : \"Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.\",\n );\n this.name = \"AgentServerUnavailableError\";\n this.details = details ?? null;\n this.noBackendConfigured = noBackendConfigured;\n }\n}\n\nexport const isAgentServerUnavailableError = (\n error: unknown,\n): error is AgentServerUnavailableError =>\n error instanceof AgentServerUnavailableError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"name\" in error &&\n error.name === \"AgentServerUnavailableError\");\n\nexport class AgentServerUnsupportedVersionError extends AgentServerUnavailableError {\n readonly code = AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE;\n readonly actualVersion: string;\n readonly requiredVersion = MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION;\n\n constructor(actualVersion: string) {\n const message = `Agent Canvas requires agent-server ${MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION} or newer; this backend is running ${actualVersion}. Please upgrade the agent-server backend.`;\n super(message);\n this.name = \"AgentServerUnsupportedVersionError\";\n this.message = message;\n this.actualVersion = actualVersion;\n }\n}\n\nexport class AgentServerUnknownVersionError extends AgentServerUnavailableError {\n readonly code = AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE;\n readonly actualVersion: string | null;\n readonly requiredVersion = MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION;\n\n constructor(actualVersion: string | null) {\n const reported = actualVersion ? ` It reported \"${actualVersion}\".` : \"\";\n const message =\n `Could not determine this backend's agent-server version.${reported} ` +\n `Agent Canvas requires agent-server ${MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION} ` +\n \"or newer, but this backend did not return a valid version from \" +\n \"/server_info. Restart or rebuild the agent-server backend, then try again.\";\n super(message);\n this.name = \"AgentServerUnknownVersionError\";\n this.message = message;\n this.actualVersion = actualVersion;\n }\n}\n\nexport const isAgentServerUnsupportedVersionError = (\n error: unknown,\n): error is AgentServerUnsupportedVersionError =>\n error instanceof AgentServerUnsupportedVersionError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE);\n\nexport const isAgentServerUnknownVersionError = (\n error: unknown,\n): error is AgentServerUnknownVersionError =>\n error instanceof AgentServerUnknownVersionError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE);\n\n/**\n * Returns true when the agent-server probe failed with HTTP 401.\n * In public mode this means the stored key is stale (server restarted\n * with a different `LOCAL_BACKEND_API_KEY`). Only meaningful when\n * auth is required — a 401 in local mode is a misconfiguration, not a\n * key-rotation event. Uses {@link isAuthRequired} so both the build-time\n * `VITE_AUTH_REQUIRED` flag and the runtime `window.__AGENT_CANVAS_AUTH_REQUIRED__`\n * injection (used by pre-built static binaries) are honoured.\n */\nexport const isAgentServerAuthError = (error: unknown): boolean =>\n isAuthRequired() && isSdkHttpStatusError(error, 401);\n\nexport function clearCachedAgentServerInfo() {\n cachedAgentServerInfo = null;\n}\n\nexport function isAgentServerToolAvailable(toolName: string) {\n const availableTools = getAdvertisedTools(cachedAgentServerInfo);\n if (!Array.isArray(availableTools)) {\n return true;\n }\n return availableTools.includes(toolName);\n}\n\nexport function isSdkHttpError(error: unknown) {\n return (\n error instanceof Error &&\n error.name === \"HttpError\" &&\n \"status\" in error &&\n typeof error.status === \"number\"\n );\n}\n\n/**\n * Narrows an SDK HTTP error to a specific status code.\n * Use instead of manually casting `(err as { status: number }).status`.\n */\nexport function isSdkHttpStatusError(error: unknown, status: number): boolean {\n return (\n isSdkHttpError(error) && (error as { status: number }).status === status\n );\n}\n\nfunction normalizeAgentServerInfoVersion(version: unknown): string | null {\n if (typeof version !== \"string\") return null;\n const trimmed = version.trim();\n return trimmed || null;\n}\n\nfunction getRawAgentServerSdkVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n return normalizeAgentServerInfoVersion(serverInfo.sdk_version);\n}\n\nfunction getRawAgentServerVersion(serverInfo: AgentServerInfo): string | null {\n return (\n normalizeAgentServerInfoVersion(serverInfo.version) ??\n getRawAgentServerSdkVersion(serverInfo)\n );\n}\n\nfunction getComparableAgentServerVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version = getRawAgentServerVersion(serverInfo);\n if (!version || version.toLowerCase() === UNKNOWN_AGENT_SERVER_VERSION) {\n return null;\n }\n return version;\n}\n\nexport function getDisplayAgentServerVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version = getComparableAgentServerVersion(serverInfo);\n if (!version || !parseAgentServerVersion(version)) {\n return null;\n }\n return version;\n}\n\nexport function getDisplayAgentServerSdkVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version =\n getRawAgentServerSdkVersion(serverInfo) ??\n getComparableAgentServerVersion(serverInfo);\n if (!version || version.toLowerCase() === UNKNOWN_AGENT_SERVER_VERSION) {\n return null;\n }\n return version;\n}\n\nexport function getCachedAgentServerSdkVersion(\n host?: string | null,\n): string | null {\n if (!cachedAgentServerInfo) return null;\n if (host && getEffectiveLocalBackend()?.host !== host) return null;\n return getDisplayAgentServerSdkVersion(cachedAgentServerInfo);\n}\n\nexport function getCachedAgentServerVersion(\n host?: string | null,\n): string | null {\n if (!cachedAgentServerInfo) return null;\n if (host && getEffectiveLocalBackend()?.host !== host) return null;\n return getDisplayAgentServerVersion(cachedAgentServerInfo);\n}\n\nexport function compareAgentServerVersions(actual: string, required: string) {\n const parsedActual = parseAgentServerVersion(actual);\n const parsedRequired = parseAgentServerVersion(required);\n\n if (!parsedActual || !parsedRequired) {\n return null;\n }\n\n for (const key of [\"major\", \"minor\", \"patch\"] as const) {\n if (parsedActual[key] > parsedRequired[key]) {\n return 1;\n }\n if (parsedActual[key] < parsedRequired[key]) {\n return -1;\n }\n }\n\n if (parsedActual.prerelease && !parsedRequired.prerelease) {\n return -1;\n }\n if (!parsedActual.prerelease && parsedRequired.prerelease) {\n return 1;\n }\n if (parsedActual.prerelease && parsedRequired.prerelease) {\n return parsedActual.prerelease.localeCompare(parsedRequired.prerelease);\n }\n\n return 0;\n}\n\nfunction parseAgentServerVersion(version: string) {\n const trimmed = version.trim().replace(/^v/, \"\");\n const [withoutBuild] = trimmed.split(\"+\");\n const [core, prerelease] = withoutBuild.split(\"-\", 2);\n const parts = core.split(\".\");\n\n if (parts.length !== 3) {\n return null;\n }\n\n const [major, minor, patch] = parts.map((part) => Number(part));\n if (\n ![major, minor, patch].every((part) => Number.isInteger(part) && part >= 0)\n ) {\n return null;\n }\n\n return { major, minor, patch, prerelease };\n}\n\nexport function assertAgentServerVersionIsSupported(\n serverInfo: AgentServerInfo,\n) {\n const actualVersion = getComparableAgentServerVersion(serverInfo);\n if (!actualVersion) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnknownVersionError(\n getRawAgentServerVersion(serverInfo),\n );\n }\n\n const comparison = compareAgentServerVersions(\n actualVersion,\n MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION,\n );\n\n if (comparison === null) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnknownVersionError(actualVersion);\n }\n\n if (comparison < 0) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnsupportedVersionError(actualVersion);\n }\n}\n\nexport async function loadAgentServerInfo() {\n // The probe is a *local* agent-server concern — it verifies the runtime\n // hosting the GUI is reachable. It must NEVER run against the active\n // backend when that backend is cloud, because cloud hosts don't\n // expose /api/server_info and would fail with a CORS error besides.\n const local = getEffectiveLocalBackend();\n if (!local) {\n clearCachedAgentServerInfo();\n\n // Empty registry (NO_BACKEND sentinel) — the user has no backend\n // configured at all. Throw so root.tsx shows the manage-backends\n // modal instead of silently rendering a broken home page.\n if (isNoBackend(getActiveBackend().backend)) {\n throw new AgentServerUnavailableError(\"No backend configured\", {\n noBackendConfigured: true,\n });\n }\n\n // Active backend is cloud — no local probe needed.\n return null;\n }\n\n const clientOptions = getAgentServerClientOptions({\n host: local.host,\n sessionApiKey: local.apiKey || null,\n timeout: AGENT_SERVER_INFO_TIMEOUT_MS,\n });\n let serverInfo: AgentServerInfo;\n\n try {\n serverInfo = (await new ServerClient(\n clientOptions,\n ).getServerInfo()) as AgentServerInfo;\n } catch (error) {\n clearCachedAgentServerInfo();\n // Preserve 401 so root.tsx can show the auth screen (public mode).\n // All other HTTP errors (502, 503, etc.) mean the server is unreachable\n // or misconfigured — treat them as unavailable.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n const details = error instanceof Error ? error.message : null;\n throw new AgentServerUnavailableError(details);\n }\n\n assertAgentServerVersionIsSupported(serverInfo);\n\n // /server_info is unprotected, so a stale session key still gets 200.\n // In public mode, validate the key against a protected endpoint so a\n // server restart with a new LOCAL_BACKEND_API_KEY surfaces immediately\n // instead of letting the app load and fail on every subsequent call.\n if (isAuthRequired()) {\n try {\n await new SettingsClient(clientOptions).getSettings();\n } catch (error) {\n // Only rethrow 401 — that means the stored key is invalid /\n // rotated. Other HTTP errors (403, 5xx) and non-HTTP errors\n // (network, timeout) are swallowed: the server *is* up (we just\n // reached /server_info), so let the app proceed with an\n // unvalidated key rather than blocking the UI.\n // NOTE: If the connection drops between the /server_info and\n // getSettings() probes, the app loads with an unvalidated key and\n // subsequent 401s won't trigger the auth screen (they come from\n // React Query hooks, not this bootstrap path). Acceptable for now\n // since the window is narrow and a page refresh recovers.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n console.warn(\n \"[agent-server] getSettings() probe failed (non-401):\",\n error,\n );\n }\n }\n\n cachedAgentServerInfo = serverInfo;\n return serverInfo;\n}\n"],"mappings":"+dAcA,IAAM,EAA+B,IAC/B,EAA+B,UAExB,EACX,EAAA,QAAS,cAAc,mBACZ,EACX,mCACW,EACX,+BAOE,EAAgD,KAE9C,EAAsB,GACtB,MAAM,QAAQ,GAAY,YAAY,EACjC,EAAW,aAEb,KAGI,EAAb,cAAiD,KAAM,CACrD,QACA,oBAEA,YACE,EACA,EACA,CACA,IAAM,EAAsB,GAAS,qBAAuB,GAC5D,MACE,EACI,2EACA,gHACN,EACA,KAAK,KAAO,8BACZ,KAAK,QAAU,GAAW,KAC1B,KAAK,oBAAsB,CAC7B,CACF,EAEa,EACX,GAEA,aAAiB,GAChB,OAAO,GAAU,YAChB,GACA,SAAU,GACV,EAAM,OAAS,8BAEN,EAAb,cAAwD,CAA4B,CAClF,KAAgB,EAChB,cACA,gBAA2B,EAE3B,YAAY,EAAuB,CACjC,IAAM,EAAU,sCAAsC,EAAwC,qCAAqC,EAAc,4CACjJ,MAAM,CAAO,EACb,KAAK,KAAO,qCACZ,KAAK,QAAU,EACf,KAAK,cAAgB,CACvB,CACF,EAEa,EAAb,cAAoD,CAA4B,CAC9E,KAAgB,EAChB,cACA,gBAA2B,EAE3B,YAAY,EAA8B,CAExC,IAAM,EACJ,2DAFe,EAAgB,iBAAiB,EAAc,IAAM,GAEA,sCAC9B,EAAwC,4IAGhF,MAAM,CAAO,EACb,KAAK,KAAO,iCACZ,KAAK,QAAU,EACf,KAAK,cAAgB,CACvB,CACF,EA6Ba,EAA0B,GACrC,EAAA,eAAe,GAAK,EAAqB,EAAO,GAAG,EAErD,SAAgB,GAA6B,CAC3C,EAAwB,IAC1B,CAEA,SAAgB,EAA2B,EAAkB,CAC3D,IAAM,EAAiB,EAAmB,CAAqB,EAI/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I,EADM,aAAiB,MAAQ,EAAM,QAAU,IACZ,CAC/C,CAQA,GANA,EAAoC,CAAU,EAM1C,EAAA,eAAe,EACjB,GAAI,CACF,MAAM,IAAI,EAAA,eAAe,CAAa,EAAE,YAAY,CACtD,OAAS,EAAO,CAWd,GAAI,EAAqB,EAAO,GAAG,EACjC,MAAM,EAGR,QAAQ,KACN,uDACA,CACF,CACF,CAIF,MADA,GAAwB,EACjB,CACT"}
1
+ {"version":3,"file":"agent-server-compatibility.cjs","names":[],"sources":["../../src/api/agent-server-compatibility.ts"],"sourcesContent":["import {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport type { ServerInfo as BaseServerInfo } from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { isAuthRequired } from \"#/api/agent-server-config\";\nimport {\n getActiveBackend,\n getEffectiveLocalBackend,\n isNoBackend,\n} from \"#/api/backend-registry/active-store\";\nimport defaults from \"../../config/defaults.json\";\n\nconst AGENT_SERVER_INFO_TIMEOUT_MS = 5000;\nconst UNKNOWN_AGENT_SERVER_VERSION = \"unknown\";\n\nexport const MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION =\n defaults.compatibility.minimumAgentServer;\nexport const AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE =\n \"AGENT_SERVER_UNSUPPORTED_VERSION\";\nexport const AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE =\n \"AGENT_SERVER_UNKNOWN_VERSION\";\n\nexport interface AgentServerInfo extends BaseServerInfo {\n sdk_version?: string;\n usable_tools?: string[] | null;\n runtime_services?: unknown;\n}\n\nlet cachedAgentServerInfo: AgentServerInfo | null = null;\nlet cachedAgentServerInfoHost: string | null = null;\n\nconst getAdvertisedTools = (serverInfo: AgentServerInfo | null) => {\n if (Array.isArray(serverInfo?.usable_tools)) {\n return serverInfo.usable_tools;\n }\n return null;\n};\n\nexport class AgentServerUnavailableError extends Error {\n readonly details: string | null;\n readonly noBackendConfigured: boolean;\n\n constructor(\n details?: string | null,\n options?: { noBackendConfigured?: boolean },\n ) {\n const noBackendConfigured = options?.noBackendConfigured ?? false;\n super(\n noBackendConfigured\n ? \"No agent server backend is configured yet. Add a backend to get started.\"\n : \"Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.\",\n );\n this.name = \"AgentServerUnavailableError\";\n this.details = details ?? null;\n this.noBackendConfigured = noBackendConfigured;\n }\n}\n\nexport const isAgentServerUnavailableError = (\n error: unknown,\n): error is AgentServerUnavailableError =>\n error instanceof AgentServerUnavailableError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"name\" in error &&\n error.name === \"AgentServerUnavailableError\");\n\nexport class AgentServerUnsupportedVersionError extends AgentServerUnavailableError {\n readonly code = AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE;\n readonly actualVersion: string;\n readonly requiredVersion = MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION;\n\n constructor(actualVersion: string) {\n const message = `Agent Canvas requires agent-server ${MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION} or newer; this backend is running ${actualVersion}. Please upgrade the agent-server backend.`;\n super(message);\n this.name = \"AgentServerUnsupportedVersionError\";\n this.message = message;\n this.actualVersion = actualVersion;\n }\n}\n\nexport class AgentServerUnknownVersionError extends AgentServerUnavailableError {\n readonly code = AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE;\n readonly actualVersion: string | null;\n readonly requiredVersion = MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION;\n\n constructor(actualVersion: string | null) {\n const reported = actualVersion ? ` It reported \"${actualVersion}\".` : \"\";\n const message =\n `Could not determine this backend's agent-server version.${reported} ` +\n `Agent Canvas requires agent-server ${MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION} ` +\n \"or newer, but this backend did not return a valid version from \" +\n \"/server_info. Restart or rebuild the agent-server backend, then try again.\";\n super(message);\n this.name = \"AgentServerUnknownVersionError\";\n this.message = message;\n this.actualVersion = actualVersion;\n }\n}\n\nexport const isAgentServerUnsupportedVersionError = (\n error: unknown,\n): error is AgentServerUnsupportedVersionError =>\n error instanceof AgentServerUnsupportedVersionError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === AGENT_SERVER_UNSUPPORTED_VERSION_ERROR_CODE);\n\nexport const isAgentServerUnknownVersionError = (\n error: unknown,\n): error is AgentServerUnknownVersionError =>\n error instanceof AgentServerUnknownVersionError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE);\n\n/**\n * Returns true when the agent-server probe failed with HTTP 401.\n * In public mode this means the stored key is stale (server restarted\n * with a different `LOCAL_BACKEND_API_KEY`). Only meaningful when\n * auth is required — a 401 in local mode is a misconfiguration, not a\n * key-rotation event. Uses {@link isAuthRequired} so both the build-time\n * `VITE_AUTH_REQUIRED` flag and the runtime `window.__AGENT_CANVAS_AUTH_REQUIRED__`\n * injection (used by pre-built static binaries) are honoured.\n */\nexport const isAgentServerAuthError = (error: unknown): boolean =>\n isAuthRequired() && isSdkHttpStatusError(error, 401);\n\nexport function clearCachedAgentServerInfo() {\n cachedAgentServerInfo = null;\n cachedAgentServerInfoHost = null;\n}\n\nexport function getCachedAgentServerInfo(options?: {\n host?: string | null;\n}): AgentServerInfo | null {\n if (options?.host && options.host !== cachedAgentServerInfoHost) {\n return null;\n }\n return cachedAgentServerInfo;\n}\n\nexport function isAgentServerToolAvailable(toolName: string) {\n const availableTools = getAdvertisedTools(cachedAgentServerInfo);\n if (!Array.isArray(availableTools)) {\n return true;\n }\n return availableTools.includes(toolName);\n}\n\nexport function isSdkHttpError(error: unknown) {\n return (\n error instanceof Error &&\n error.name === \"HttpError\" &&\n \"status\" in error &&\n typeof error.status === \"number\"\n );\n}\n\n/**\n * Narrows an SDK HTTP error to a specific status code.\n * Use instead of manually casting `(err as { status: number }).status`.\n */\nexport function isSdkHttpStatusError(error: unknown, status: number): boolean {\n return (\n isSdkHttpError(error) && (error as { status: number }).status === status\n );\n}\n\nfunction normalizeAgentServerInfoVersion(version: unknown): string | null {\n if (typeof version !== \"string\") return null;\n const trimmed = version.trim();\n return trimmed || null;\n}\n\nfunction getRawAgentServerSdkVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n return normalizeAgentServerInfoVersion(serverInfo.sdk_version);\n}\n\nfunction getRawAgentServerVersion(serverInfo: AgentServerInfo): string | null {\n return (\n normalizeAgentServerInfoVersion(serverInfo.version) ??\n getRawAgentServerSdkVersion(serverInfo)\n );\n}\n\nfunction getComparableAgentServerVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version = getRawAgentServerVersion(serverInfo);\n if (!version || version.toLowerCase() === UNKNOWN_AGENT_SERVER_VERSION) {\n return null;\n }\n return version;\n}\n\nexport function getDisplayAgentServerVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version = getComparableAgentServerVersion(serverInfo);\n if (!version || !parseAgentServerVersion(version)) {\n return null;\n }\n return version;\n}\n\nexport function getDisplayAgentServerSdkVersion(\n serverInfo: AgentServerInfo,\n): string | null {\n const version =\n getRawAgentServerSdkVersion(serverInfo) ??\n getComparableAgentServerVersion(serverInfo);\n if (!version || version.toLowerCase() === UNKNOWN_AGENT_SERVER_VERSION) {\n return null;\n }\n return version;\n}\n\nexport function getCachedAgentServerSdkVersion(\n host?: string | null,\n): string | null {\n if (!cachedAgentServerInfo) return null;\n if (host && getEffectiveLocalBackend()?.host !== host) return null;\n return getDisplayAgentServerSdkVersion(cachedAgentServerInfo);\n}\n\nexport function getCachedAgentServerVersion(\n host?: string | null,\n): string | null {\n if (!cachedAgentServerInfo) return null;\n if (host && getEffectiveLocalBackend()?.host !== host) return null;\n return getDisplayAgentServerVersion(cachedAgentServerInfo);\n}\n\nexport function compareAgentServerVersions(actual: string, required: string) {\n const parsedActual = parseAgentServerVersion(actual);\n const parsedRequired = parseAgentServerVersion(required);\n\n if (!parsedActual || !parsedRequired) {\n return null;\n }\n\n for (const key of [\"major\", \"minor\", \"patch\"] as const) {\n if (parsedActual[key] > parsedRequired[key]) {\n return 1;\n }\n if (parsedActual[key] < parsedRequired[key]) {\n return -1;\n }\n }\n\n if (parsedActual.prerelease && !parsedRequired.prerelease) {\n return -1;\n }\n if (!parsedActual.prerelease && parsedRequired.prerelease) {\n return 1;\n }\n if (parsedActual.prerelease && parsedRequired.prerelease) {\n return parsedActual.prerelease.localeCompare(parsedRequired.prerelease);\n }\n\n return 0;\n}\n\nfunction parseAgentServerVersion(version: string) {\n const trimmed = version.trim().replace(/^v/, \"\");\n const [withoutBuild] = trimmed.split(\"+\");\n const [core, prerelease] = withoutBuild.split(\"-\", 2);\n const parts = core.split(\".\");\n\n if (parts.length !== 3) {\n return null;\n }\n\n const [major, minor, patch] = parts.map((part) => Number(part));\n if (\n ![major, minor, patch].every((part) => Number.isInteger(part) && part >= 0)\n ) {\n return null;\n }\n\n return { major, minor, patch, prerelease };\n}\n\nexport function assertAgentServerVersionIsSupported(\n serverInfo: AgentServerInfo,\n) {\n const actualVersion = getComparableAgentServerVersion(serverInfo);\n if (!actualVersion) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnknownVersionError(\n getRawAgentServerVersion(serverInfo),\n );\n }\n\n const comparison = compareAgentServerVersions(\n actualVersion,\n MINIMUM_COMPATIBLE_AGENT_SERVER_VERSION,\n );\n\n if (comparison === null) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnknownVersionError(actualVersion);\n }\n\n if (comparison < 0) {\n clearCachedAgentServerInfo();\n throw new AgentServerUnsupportedVersionError(actualVersion);\n }\n}\n\nexport async function loadAgentServerInfo() {\n // The probe is a *local* agent-server concern — it verifies the runtime\n // hosting the GUI is reachable. It must NEVER run against the active\n // backend when that backend is cloud, because cloud hosts don't\n // expose /api/server_info and would fail with a CORS error besides.\n const local = getEffectiveLocalBackend();\n if (!local) {\n clearCachedAgentServerInfo();\n\n // Empty registry (NO_BACKEND sentinel) — the user has no backend\n // configured at all. Throw so root.tsx shows the manage-backends\n // modal instead of silently rendering a broken home page.\n if (isNoBackend(getActiveBackend().backend)) {\n throw new AgentServerUnavailableError(\"No backend configured\", {\n noBackendConfigured: true,\n });\n }\n\n // Active backend is cloud — no local probe needed.\n return null;\n }\n\n const clientOptions = getAgentServerClientOptions({\n host: local.host,\n sessionApiKey: local.apiKey || null,\n timeout: AGENT_SERVER_INFO_TIMEOUT_MS,\n });\n let serverInfo: AgentServerInfo;\n\n try {\n serverInfo = (await new ServerClient(\n clientOptions,\n ).getServerInfo()) as AgentServerInfo;\n } catch (error) {\n clearCachedAgentServerInfo();\n // Preserve 401 so root.tsx can show the auth screen (public mode).\n // All other HTTP errors (502, 503, etc.) mean the server is unreachable\n // or misconfigured — treat them as unavailable.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n const details = error instanceof Error ? error.message : null;\n throw new AgentServerUnavailableError(details);\n }\n\n assertAgentServerVersionIsSupported(serverInfo);\n\n // /server_info is unprotected, so a stale session key still gets 200.\n // In public mode, validate the key against a protected endpoint so a\n // server restart with a new LOCAL_BACKEND_API_KEY surfaces immediately\n // instead of letting the app load and fail on every subsequent call.\n if (isAuthRequired()) {\n try {\n await new SettingsClient(clientOptions).getSettings();\n } catch (error) {\n // Only rethrow 401 — that means the stored key is invalid /\n // rotated. Other HTTP errors (403, 5xx) and non-HTTP errors\n // (network, timeout) are swallowed: the server *is* up (we just\n // reached /server_info), so let the app proceed with an\n // unvalidated key rather than blocking the UI.\n // NOTE: If the connection drops between the /server_info and\n // getSettings() probes, the app loads with an unvalidated key and\n // subsequent 401s won't trigger the auth screen (they come from\n // React Query hooks, not this bootstrap path). Acceptable for now\n // since the window is narrow and a page refresh recovers.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n console.warn(\n \"[agent-server] getSettings() probe failed (non-401):\",\n error,\n );\n }\n }\n\n cachedAgentServerInfo = serverInfo;\n cachedAgentServerInfoHost = clientOptions.host;\n return serverInfo;\n}\n"],"mappings":"+dA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AAU,EAM1C,EAAA,eAAe,EACjB,GAAI,CACF,MAAM,IAAI,EAAA,eAAe,CAAa,EAAE,YAAY,CACtD,OAAS,EAAO,CAWd,GAAI,EAAqB,EAAO,GAAG,EACjC,MAAM,EAGR,QAAQ,KACN,uDACA,CACF,CACF,CAKF,MAFA,GAAwB,EACxB,EAA4B,EAAc,KACnC,CACT"}
@@ -5,6 +5,7 @@ export declare const AGENT_SERVER_UNKNOWN_VERSION_ERROR_CODE = "AGENT_SERVER_UNK
5
5
  export interface AgentServerInfo extends BaseServerInfo {
6
6
  sdk_version?: string;
7
7
  usable_tools?: string[] | null;
8
+ runtime_services?: unknown;
8
9
  }
9
10
  export declare class AgentServerUnavailableError extends Error {
10
11
  readonly details: string | null;
@@ -39,6 +40,9 @@ export declare const isAgentServerUnknownVersionError: (error: unknown) => error
39
40
  */
40
41
  export declare const isAgentServerAuthError: (error: unknown) => boolean;
41
42
  export declare function clearCachedAgentServerInfo(): void;
43
+ export declare function getCachedAgentServerInfo(options?: {
44
+ host?: string | null;
45
+ }): AgentServerInfo | null;
42
46
  export declare function isAgentServerToolAvailable(toolName: string): boolean;
43
47
  export declare function isSdkHttpError(error: unknown): boolean;
44
48
  /**
@@ -6,14 +6,14 @@ import { getActiveBackend as r, getEffectiveLocalBackend as i, isNoBackend as a
6
6
  import { getAgentServerClientOptions as o } from "./agent-server-client-options.js";
7
7
  import s from "../config/defaults.js";
8
8
  //#region src/api/agent-server-compatibility.ts
9
- var c = 5e3, l = "unknown", u = s.compatibility.minimumAgentServer, d = "AGENT_SERVER_UNSUPPORTED_VERSION", f = "AGENT_SERVER_UNKNOWN_VERSION", p = null, m = (e) => Array.isArray(e?.usable_tools) ? e.usable_tools : null, h = class extends Error {
9
+ var c = 5e3, l = "unknown", u = s.compatibility.minimumAgentServer, d = "AGENT_SERVER_UNSUPPORTED_VERSION", f = "AGENT_SERVER_UNKNOWN_VERSION", p = null, m = null, h = (e) => Array.isArray(e?.usable_tools) ? e.usable_tools : null, g = class extends Error {
10
10
  details;
11
11
  noBackendConfigured;
12
12
  constructor(e, t) {
13
13
  let n = t?.noBackendConfigured ?? !1;
14
14
  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;
15
15
  }
16
- }, g = (e) => e instanceof h || typeof e == "object" && !!e && "name" in e && e.name === "AgentServerUnavailableError", _ = class extends h {
16
+ }, _ = (e) => e instanceof g || typeof e == "object" && !!e && "name" in e && e.name === "AgentServerUnavailableError", v = class extends g {
17
17
  code = d;
18
18
  actualVersion;
19
19
  requiredVersion = u;
@@ -21,7 +21,7 @@ var c = 5e3, l = "unknown", u = s.compatibility.minimumAgentServer, d = "AGENT_S
21
21
  let t = `Agent Canvas requires agent-server ${u} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;
22
22
  super(t), this.name = "AgentServerUnsupportedVersionError", this.message = t, this.actualVersion = e;
23
23
  }
24
- }, v = class extends h {
24
+ }, y = class extends g {
25
25
  code = f;
26
26
  actualVersion;
27
27
  requiredVersion = u;
@@ -29,42 +29,45 @@ var c = 5e3, l = "unknown", u = s.compatibility.minimumAgentServer, d = "AGENT_S
29
29
  let t = `Could not determine this backend's agent-server version.${e ? ` It reported "${e}".` : ""} Agent Canvas requires agent-server ${u} or newer, but this backend did not return a valid version from /server_info. Restart or rebuild the agent-server backend, then try again.`;
30
30
  super(t), this.name = "AgentServerUnknownVersionError", this.message = t, this.actualVersion = e;
31
31
  }
32
- }, y = (e) => n() && C(e, 401);
33
- function b() {
34
- p = null;
35
- }
36
- function x(e) {
37
- let t = m(p);
38
- return Array.isArray(t) ? t.includes(e) : !0;
32
+ }, b = (e) => n() && T(e, 401);
33
+ function x() {
34
+ p = null, m = null;
39
35
  }
40
36
  function S(e) {
41
- return e instanceof Error && e.name === "HttpError" && "status" in e && typeof e.status == "number";
37
+ return e?.host && e.host !== m ? null : p;
42
38
  }
43
- function C(e, t) {
44
- return S(e) && e.status === t;
39
+ function C(e) {
40
+ let t = h(p);
41
+ return Array.isArray(t) ? t.includes(e) : !0;
45
42
  }
46
43
  function w(e) {
47
- return typeof e == "string" && e.trim() || null;
44
+ return e instanceof Error && e.name === "HttpError" && "status" in e && typeof e.status == "number";
48
45
  }
49
- function T(e) {
50
- return w(e.sdk_version);
46
+ function T(e, t) {
47
+ return w(e) && e.status === t;
51
48
  }
52
49
  function E(e) {
53
- return w(e.version) ?? T(e);
50
+ return typeof e == "string" && e.trim() || null;
54
51
  }
55
52
  function D(e) {
56
- let t = E(e);
57
- return !t || t.toLowerCase() === l ? null : t;
53
+ return E(e.sdk_version);
58
54
  }
59
55
  function O(e) {
60
- let t = D(e);
61
- return !t || !j(t) ? null : t;
56
+ return E(e.version) ?? D(e);
62
57
  }
63
58
  function k(e) {
64
- return !p || e && i()?.host !== e ? null : O(p);
59
+ let t = O(e);
60
+ return !t || t.toLowerCase() === l ? null : t;
61
+ }
62
+ function A(e) {
63
+ let t = k(e);
64
+ return !t || !N(t) ? null : t;
65
65
  }
66
- function A(e, t) {
67
- let n = j(e), r = j(t);
66
+ function j(e) {
67
+ return !p || e && i()?.host !== e ? null : A(p);
68
+ }
69
+ function M(e, t) {
70
+ let n = N(e), r = N(t);
68
71
  if (!n || !r) return null;
69
72
  for (let e of [
70
73
  "major",
@@ -76,7 +79,7 @@ function A(e, t) {
76
79
  }
77
80
  return n.prerelease && !r.prerelease ? -1 : !n.prerelease && r.prerelease ? 1 : n.prerelease && r.prerelease ? n.prerelease.localeCompare(r.prerelease) : 0;
78
81
  }
79
- function j(e) {
82
+ function N(e) {
80
83
  let [t] = e.trim().replace(/^v/, "").split("+"), [n, r] = t.split("-", 2), i = n.split(".");
81
84
  if (i.length !== 3) return null;
82
85
  let [a, o, s] = i.map((e) => Number(e));
@@ -91,17 +94,17 @@ function j(e) {
91
94
  prerelease: r
92
95
  } : null;
93
96
  }
94
- function M(e) {
95
- let t = D(e);
96
- if (!t) throw b(), new v(E(e));
97
- let n = A(t, u);
98
- if (n === null) throw b(), new v(t);
99
- if (n < 0) throw b(), new _(t);
97
+ function P(e) {
98
+ let t = k(e);
99
+ if (!t) throw x(), new y(O(e));
100
+ let n = M(t, u);
101
+ if (n === null) throw x(), new y(t);
102
+ if (n < 0) throw x(), new v(t);
100
103
  }
101
- async function N() {
104
+ async function F() {
102
105
  let s = i();
103
106
  if (!s) {
104
- if (b(), a(r().backend)) throw new h("No backend configured", { noBackendConfigured: !0 });
107
+ if (x(), a(r().backend)) throw new g("No backend configured", { noBackendConfigured: !0 });
105
108
  return null;
106
109
  }
107
110
  let l = o({
@@ -112,17 +115,17 @@ async function N() {
112
115
  try {
113
116
  u = await new e(l).getServerInfo();
114
117
  } catch (e) {
115
- throw b(), C(e, 401) ? e : new h(e instanceof Error ? e.message : null);
118
+ throw x(), T(e, 401) ? e : new g(e instanceof Error ? e.message : null);
116
119
  }
117
- if (M(u), n()) try {
120
+ if (P(u), n()) try {
118
121
  await new t(l).getSettings();
119
122
  } catch (e) {
120
- if (C(e, 401)) throw e;
123
+ if (T(e, 401)) throw e;
121
124
  console.warn("[agent-server] getSettings() probe failed (non-401):", e);
122
125
  }
123
- return p = u, u;
126
+ return p = u, m = l.host, u;
124
127
  }
125
128
  //#endregion
126
- export { M as assertAgentServerVersionIsSupported, b as clearCachedAgentServerInfo, A as compareAgentServerVersions, k as getCachedAgentServerVersion, O as getDisplayAgentServerVersion, y as isAgentServerAuthError, x as isAgentServerToolAvailable, g as isAgentServerUnavailableError, C as isSdkHttpStatusError, N as loadAgentServerInfo };
129
+ export { P as assertAgentServerVersionIsSupported, x as clearCachedAgentServerInfo, M as compareAgentServerVersions, S as getCachedAgentServerInfo, j as getCachedAgentServerVersion, A as getDisplayAgentServerVersion, b as isAgentServerAuthError, C as isAgentServerToolAvailable, _ as isAgentServerUnavailableError, T as isSdkHttpStatusError, F as loadAgentServerInfo };
127
130
 
128
131
  //# sourceMappingURL=agent-server-compatibility.js.map