@openhands/agent-canvas 1.1.0 → 1.2.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 (1373) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/Trans-De9RwQhA.js +1 -0
  4. package/build/assets/__vite-browser-external-4xJsU2-u.js +1 -0
  5. package/build/assets/{acp-providers-B_ZxlEbx.js → acp-providers-D_D8VUpP.js} +1 -1
  6. package/build/assets/active-backend-context-DRFevVIj.js +1 -0
  7. package/build/assets/add-backend-modal-DzuB9zlG.js +1 -0
  8. package/build/assets/agent-profiles-settings-BfAwTshW.js +1 -0
  9. package/build/assets/{agent-server-client-options-CxnCYyIW.js → agent-server-client-options-DVLRd9sw.js} +1 -1
  10. package/build/assets/agent-server-conversation-service.api-DfH2k6Sx.js +5 -0
  11. package/build/assets/agent-settings-CMMms-0q.js +1 -0
  12. package/build/assets/agent-settings-DjVlKgaP.js +2 -0
  13. package/build/assets/alert-banner-BW0wRYw6.js +1 -0
  14. package/build/assets/api-key-entry-screen-O8gS-fnF.js +1 -0
  15. package/build/assets/app-settings-SlZvaXlk.js +1 -0
  16. package/build/assets/automation-detail-CwsNJ9AM.js +2 -0
  17. package/build/assets/automations-list-B9cPtugh.js +1 -0
  18. package/build/assets/back-nav-button-BYmxFxGt.js +1 -0
  19. package/build/assets/backend-form-modal-D2EDGVAc.js +1 -0
  20. package/build/assets/backend-synced-settings-badge-6OCwIuLY.js +1 -0
  21. package/build/assets/base-modal-CC5Pp8CF.js +1 -0
  22. package/build/assets/bot-D7eUAuSB.js +1 -0
  23. package/build/assets/brand-button-DKPMEKcW.js +1 -0
  24. package/build/assets/{browser-CCwPzPsD.js → browser-B39N74jU.js} +2 -2
  25. package/build/assets/browser-store-BI6uklCG.js +1 -0
  26. package/build/assets/browser-tab-aiDg7aEn.js +1 -0
  27. package/build/assets/chat-send-button-DxuZIoW8.js +1 -0
  28. package/build/assets/check-Bvi71siz.js +1 -0
  29. package/build/assets/checkmark-h7udgXMM.js +1 -0
  30. package/build/assets/{chevron-down-BxZEAIv4.js → chevron-down-CI8A6tet.js} +1 -1
  31. package/build/assets/circle-plus-check-toggle-T3eAIuPQ.js +1 -0
  32. package/build/assets/close-p3Op5lxI.js +1 -0
  33. package/build/assets/code-tag-DYlAhEQY.js +1 -0
  34. package/build/assets/{color-themes-CTNRQd1a.js → color-themes-Dd1sO5U6.js} +1 -1
  35. package/build/assets/combobox-caret-CLGvOs32.js +1 -0
  36. package/build/assets/command-menu-DKrLCRla.js +1 -0
  37. package/build/assets/{command-store-C-57Heey.js → command-store-D8J5LMW1.js} +1 -1
  38. package/build/assets/condenser-settings-BhxvlfoY.js +1 -0
  39. package/build/assets/confirmation-modal-BK1F0A68.js +1 -0
  40. package/build/assets/context-menu-list-item-DBFzplWW.js +1 -0
  41. package/build/assets/conversation-B8prFAZF.js +19 -0
  42. package/build/assets/conversation-DGVDwGn8.js +1 -0
  43. package/build/assets/conversation-local-storage-F6zVMM--.js +1 -0
  44. package/build/assets/conversation-panel-C7DC4Cxx.js +1 -0
  45. package/build/assets/conversation-service.api-Ch9kR9aE.js +1 -0
  46. package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
  47. package/build/assets/conversation-store-LptbOvKa.js +1 -0
  48. package/build/assets/conversation-tab-empty-state-m8IUkfMj.js +1 -0
  49. package/build/assets/copy-3JCw_XFB.js +1 -0
  50. package/build/assets/copy-BLmGeJcd.js +1 -0
  51. package/build/assets/copy-to-clipboard-button-Aj9wFmt2.js +1 -0
  52. package/build/assets/createLucideIcon-CVAsW2Yo.js +1 -0
  53. package/build/assets/declaration-B9kpCaYl.js +1 -0
  54. package/build/assets/device-verify-B5YCrvSu.js +1 -0
  55. package/build/assets/dist-CodhvuAP.js +1 -0
  56. package/build/assets/dropdown-classes-CgQ45JmQ.js +1 -0
  57. package/build/assets/edit-automation-modal-BoibW8cd.js +1 -0
  58. package/build/assets/ellipsis-button-1BV9Sga8.js +1 -0
  59. package/build/assets/entry.client-BgWj9jL_.js +2 -0
  60. package/build/assets/enum-filter-dropdown-DCITiYVi.js +1 -0
  61. package/build/assets/environment-switch-overlay-DUnKILNH.js +1 -0
  62. package/build/assets/extensions-hub-MtC8lK3A.js +1 -0
  63. package/build/assets/{extensions-navigation-DfLHdTUC.js → extensions-navigation-BtV14oQL.js} +1 -1
  64. package/build/assets/{external-link-D8njjDTk.js → external-link-D2zJjE9G.js} +1 -1
  65. package/build/assets/files-tab-DHqtsKLy.js +1 -0
  66. package/build/assets/files-tab-store-DJsPxYdg.js +1 -0
  67. package/build/assets/folder-mMWFvaw0.js +1 -0
  68. package/build/assets/form-control-classes-9rkU4usZ.js +1 -0
  69. package/build/assets/get-language-from-path-CPNnuVhI.js +1 -0
  70. package/build/assets/git-provider-icon-CGU7_KiU.js +1 -0
  71. package/build/assets/home-BgjWP_UN.js +1 -0
  72. package/build/assets/iconBase-DaTRRUjy.js +1 -0
  73. package/build/assets/index-redirect-CUUJiNki.js +1 -0
  74. package/build/assets/install-server-modal-J_eQ6lhG.js +1 -0
  75. package/build/assets/launch-DamfAY5L.js +1 -0
  76. package/build/assets/lesson-plan-HD886V64.js +4 -0
  77. package/build/assets/link-external-DfKQroKX.js +1 -0
  78. package/build/assets/{list-todo-B_Ts2JmZ.js → list-todo-BfH6yYUK.js} +1 -1
  79. package/build/assets/llm-not-configured-banner-DTrLsVr_.js +27 -0
  80. package/build/assets/llm-settings-BgSFkbHC.js +1 -0
  81. package/build/assets/llm-settings-Bkc8C5Bi.js +1 -0
  82. package/build/assets/{llm-subscription-service-BX_AtNlO.js → llm-subscription-service-CKyaV24y.js} +1 -1
  83. package/build/assets/loader-circle-BEykUKYG.js +1 -0
  84. package/build/assets/loading-spinner-DHAIPZkP.js +1 -0
  85. package/build/assets/manage-backends-modal-BUzj5_Lq.js +1 -0
  86. package/build/assets/manifest-4d6a1552.js +1 -0
  87. package/build/assets/{markdown-renderer-DWy7Np7u.js → markdown-renderer-D8mayGjI.js} +1 -1
  88. package/build/assets/mcp-DvqJYDbz.js +9 -0
  89. package/build/assets/messages-C4KEFkPk.js +40 -0
  90. package/build/assets/middleware-DYHYNAnP.js +6 -0
  91. package/build/assets/modal-backdrop-zVwfOJZr.js +1 -0
  92. package/build/assets/modal-body-Dcu5McCa.js +1 -0
  93. package/build/assets/{modal-classes-C4kS6ib_.js → modal-classes-DPqxSyuP.js} +1 -1
  94. package/build/assets/modal-close-button-CTCX4nCH.js +1 -0
  95. package/build/assets/model-selector-VDHBytb6.js +1 -0
  96. package/build/assets/{mouse-pointer-click-CXAx4FyM.js → mouse-pointer-click-PdEQPL6v.js} +1 -1
  97. package/build/assets/navigation-context-DPs2G0X8.js +1 -0
  98. package/build/assets/navigation-link-D8hfwvxI.js +1 -0
  99. package/build/assets/onboarding-gGIqoxvA.js +1 -0
  100. package/build/assets/onboarding-modal-CGHPoMp7.js +1 -0
  101. package/build/assets/openhands-logo-bcNw5bkY.js +1 -0
  102. package/build/assets/option-service.api-Dz7Eomnx.js +1 -0
  103. package/build/assets/organization-service.api-CnynNoT-.js +1 -0
  104. package/build/assets/path-utils-CBaRYg35.js +1 -0
  105. package/build/assets/{pencil-CsL0ns9y.js → pencil-Dj2XjKmI.js} +1 -1
  106. package/build/assets/plan-components-j9X4AxYM.js +1 -0
  107. package/build/assets/planner-tab-G4j36bJk.js +1 -0
  108. package/build/assets/plugins-management-service-BAp70KN7.js +1 -0
  109. package/build/assets/profiles-service.api-CeYEmSM3.js +1 -0
  110. package/build/assets/providers-CPoq0VXm.js +1 -0
  111. package/build/assets/{proxy-TeteRRW5.js → proxy-CHmFkV16.js} +1 -1
  112. package/build/assets/react-DPDgL6du.js +1 -0
  113. package/build/assets/recommended-automations-launcher-CXaEK1rW.js +50 -0
  114. package/build/assets/{refresh-cw-GkGYXsU-.js → refresh-cw-DM82EIyx.js} +1 -1
  115. package/build/assets/root-CxWZUXTQ.css +1 -0
  116. package/build/assets/root-S6CfVoNm.js +2 -0
  117. package/build/assets/root-layout-CvxdHJ6j.js +2 -0
  118. package/build/assets/runtime-waiting-state-DkzLgvMn.js +1 -0
  119. package/build/assets/schema-field-DwUzlw6b.js +1 -0
  120. package/build/assets/sdk-section-page-BUXONTx6.js +1 -0
  121. package/build/assets/sdk-settings-schema-BjBkMHzZ.js +1 -0
  122. package/build/assets/search-4DHskuhE.js +1 -0
  123. package/build/assets/search-BsjCEFNf.js +1 -0
  124. package/build/assets/secrets-service-CZYjNxFw.js +1 -0
  125. package/build/assets/secrets-settings-ZxyfRBgx.js +1 -0
  126. package/build/assets/segmented-toggle-Cen5AMUc.js +1 -0
  127. package/build/assets/settings-Bx6vn-g8.js +1 -0
  128. package/build/assets/settings-dropdown-input-xzoZwgUe.js +1 -0
  129. package/build/assets/settings-gear-MXCyZW0x.js +1 -0
  130. package/build/assets/settings-index-D4SM26d5.js +1 -0
  131. package/build/assets/settings-input-DYs7t3oK.js +1 -0
  132. package/build/assets/settings-list-classes-DvQr5jVS.js +1 -0
  133. package/build/assets/{settings-CN_HaPjH.js → settings-mQUckT0g.js} +1 -1
  134. package/build/assets/settings-modal-BoC8oMlg.js +1 -0
  135. package/build/assets/settings-section-header-context-COMOIaxV.js +1 -0
  136. package/build/assets/settings-service.api-DldkFI1x.js +1 -0
  137. package/build/assets/settings-switch-C2N2xqEb.js +1 -0
  138. package/build/assets/{settings-utils-9-_6iVIn.js → settings-utils-BMdG65By.js} +1 -1
  139. package/build/assets/shared-conversation-DMiaQFsj.js +1 -0
  140. package/build/assets/sidebar-layout-BtpUSN3j.js +1 -0
  141. package/build/assets/sidebar-mobile-menu-toggle-CaV3tQFF.js +1 -0
  142. package/build/assets/sidebar-nav-link-CIB3NBRW.js +1 -0
  143. package/build/assets/sidebar-store-CZuE8AH5.js +1 -0
  144. package/build/assets/skill-card-pill-row-D2bUe2kB.js +1 -0
  145. package/build/assets/skills-9cDZONKh.js +1 -0
  146. package/build/assets/skills-plugins-D2WkrXkr.js +1 -0
  147. package/build/assets/skills-settings-CZGVOp_t.js +2 -0
  148. package/build/assets/{square-chevron-right-Cfi-SUY0.js → square-chevron-right-Czw3FFWc.js} +1 -1
  149. package/build/assets/styled-tooltip-DsKsFjuq.js +1 -0
  150. package/build/assets/suspense-X5dBsJzn.js +1 -0
  151. package/build/assets/switch-skeleton-DqQwalyu.js +1 -0
  152. package/build/assets/task-list-tab-BAThr9Ex.js +1 -0
  153. package/build/assets/{terminal-HakoMrQX.js → terminal-B0aL_iDZ.js} +2 -2
  154. package/build/assets/terminal-BuLtIrb9.js +1 -0
  155. package/build/assets/toggle-switch-DBlOOzBr.js +1 -0
  156. package/build/assets/{trash-2-Bq4hqiRH.js → trash-2-Be_7y3Mn.js} +1 -1
  157. package/build/assets/typography-YGPBGzOG.js +1 -0
  158. package/build/assets/u-check-circle-BqoIxNz_.js +1 -0
  159. package/build/assets/u-check-circle-half-LiwZkuFe.js +1 -0
  160. package/build/assets/u-edit-DJ90xc8Z.js +1 -0
  161. package/build/assets/use-acp-credential-form-rzaqkJ1n.js +1 -0
  162. package/build/assets/use-activate-agent-profile-DY0txItX.js +1 -0
  163. package/build/assets/use-active-agent-profile-Cp5AFONR.js +1 -0
  164. package/build/assets/use-active-conversation-DvcFBqFe.js +1 -0
  165. package/build/assets/use-agent-profiles-DnH16_Vm.js +1 -0
  166. package/build/assets/use-agent-state-BvRcEzY4.js +1 -0
  167. package/build/assets/use-backends-health-e-Ull4wz.js +1 -0
  168. package/build/assets/use-breakpoint-B-O0lQ84.js +1 -0
  169. package/build/assets/use-can-manage-org-profiles-OIhplvQ0.js +1 -0
  170. package/build/assets/use-click-outside-element-Bf4Omzot.js +1 -0
  171. package/build/assets/use-cloud-current-user-id-ekU7UXDT.js +1 -0
  172. package/build/assets/use-config-Dwf5gla-.js +1 -0
  173. package/build/assets/use-create-conversation-CvAXfA3T.js +1 -0
  174. package/build/assets/use-create-secret-BKeXCo__.js +1 -0
  175. package/build/assets/use-event-store-YSOxy9FC.js +4 -0
  176. package/build/assets/use-handle-plan-click-cAXS-Hft.js +1 -0
  177. package/build/assets/use-is-authed-_dhQ2Xuj.js +1 -0
  178. package/build/assets/use-launch-skill-in-chat-BnoDgvAy.js +1 -0
  179. package/build/assets/use-llm-profiles-BcLibtGb.js +1 -0
  180. package/build/assets/use-onboarding-completion-C_Swglzp.js +1 -0
  181. package/build/assets/use-plugins-marketplace-BGb-KgfD.js +1 -0
  182. package/build/assets/use-runtime-is-ready-CBFe69Ew.js +1 -0
  183. package/build/assets/use-save-agent-profile-DFjxHhNx.js +1 -0
  184. package/build/assets/{use-save-settings-DErJDIDL.js → use-save-settings-5xPYpSQM.js} +1 -1
  185. package/build/assets/use-settings-B07msZ2Z.js +1 -0
  186. package/build/assets/use-settings-nav-items-CswsOEyw.js +16 -0
  187. package/build/assets/use-skills-Aoaoq_ei.js +1 -0
  188. package/build/assets/use-task-list-CmWGElgb.js +1 -0
  189. package/build/assets/use-tracking-CqODdfO4.js +1 -0
  190. package/build/assets/use-user-conversation-BPHQ-dm-.js +1 -0
  191. package/build/assets/useMutation-DCE9RcgK.js +1 -0
  192. package/build/assets/useMutationState-BUab8Kxr.js +1 -0
  193. package/build/assets/useQueries-CRzaAqzH.js +1 -0
  194. package/build/assets/useQuery-CpjHYtZc.js +1 -0
  195. package/build/assets/useTranslation-Cgy4JA_g.js +1 -0
  196. package/build/assets/utils-CE0lDWtb.js +1 -0
  197. package/build/assets/vendor-styling-CI0PQ3ab.js +22 -0
  198. package/build/assets/{vendor~browser-BQU4C3CQ.js → vendor~browser-Cvg7jXCP.js} +1 -1
  199. package/build/assets/{vendor~browser-tab-Cim6xN2k.js → vendor~browser-tab-Di0kh5Zw.js} +1 -1
  200. package/build/assets/vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js +1 -0
  201. package/build/assets/vendor~entry.client-9tWQ_Ugw.js +1 -0
  202. package/build/assets/{vendor~entry.client-lAMyAlBD.js → vendor~entry.client-D6BtSOtn.js} +1 -1
  203. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~d1e18dtv-5Q6lQJdE.js +177 -0
  204. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js +1 -0
  205. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js +10 -0
  206. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~t35o0b0f-Bss49YXv.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~k6tszsdc-Bb-xMtbv.js} +1 -1
  207. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~nn5zty47-Zl0G1QCy.js +1 -0
  208. package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~fpbtwbmk-DDSPtjxR.js → vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js} +1 -1
  209. package/build/assets/{vendor~files-tab-BvQLon-P.js → vendor~files-tab-B02k3xvx.js} +1 -1
  210. package/build/assets/{vendor~home~conversation-panel~conversation-DBPRU26Z.js → vendor~home~conversation-panel~conversation-CYMF9JYB.js} +1 -1
  211. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnEBAp2W.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js} +1 -1
  212. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CzI-A-Gz.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js} +1 -1
  213. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-ByET2Quf.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js} +1 -1
  214. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DCYBrned.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js} +1 -1
  215. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnctfFZL.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js} +1 -1
  216. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-pSG7lnvH.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js} +1 -1
  217. package/build/assets/{vendor~launch-DqoOsAhA.js → vendor~launch-CHXA9cJu.js} +1 -1
  218. package/build/assets/vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js +1 -0
  219. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BJl81v7J.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js} +1 -1
  220. package/build/assets/vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js +1 -0
  221. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js +48 -0
  222. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DRld6s9c.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DJHl5b-B.js} +236 -17
  223. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-9d2kA26V.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js} +1 -1
  224. package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-L2sdihTY.js +1 -0
  225. package/build/assets/verification-settings-DZQ-JvKH.js +1 -0
  226. package/build/assets/x-Cb0WAtak.js +1 -0
  227. package/build/assets/x-mark-Batp6gXa.js +1 -0
  228. package/build/index.html +4 -4
  229. package/build/locales/ar/openhands.json +138 -1
  230. package/build/locales/ca/openhands.json +138 -1
  231. package/build/locales/de/openhands.json +138 -1
  232. package/build/locales/en/openhands.json +138 -1
  233. package/build/locales/es/openhands.json +138 -1
  234. package/build/locales/fr/openhands.json +138 -1
  235. package/build/locales/it/openhands.json +138 -1
  236. package/build/locales/ja/openhands.json +138 -1
  237. package/build/locales/ko-KR/openhands.json +138 -1
  238. package/build/locales/no/openhands.json +138 -1
  239. package/build/locales/pt/openhands.json +138 -1
  240. package/build/locales/tr/openhands.json +138 -1
  241. package/build/locales/uk/openhands.json +138 -1
  242. package/build/locales/zh-CN/openhands.json +138 -1
  243. package/build/locales/zh-TW/openhands.json +138 -1
  244. package/config/defaults.json +7 -9
  245. package/dist/_virtual/__vite-browser-external.cjs +2 -0
  246. package/dist/_virtual/__vite-browser-external.cjs.map +1 -0
  247. package/dist/_virtual/__vite-browser-external.js +9 -0
  248. package/dist/_virtual/__vite-browser-external.js.map +1 -0
  249. package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs +2 -0
  250. package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs.map +1 -0
  251. package/dist/api/agent-profiles-service/agent-profiles-service.api.d.ts +22 -0
  252. package/dist/api/agent-profiles-service/agent-profiles-service.api.js +35 -0
  253. package/dist/api/agent-profiles-service/agent-profiles-service.api.js.map +1 -0
  254. package/dist/api/agent-server-adapter.cjs +2 -2
  255. package/dist/api/agent-server-adapter.cjs.map +1 -1
  256. package/dist/api/agent-server-adapter.d.ts +11 -1
  257. package/dist/api/agent-server-adapter.js +60 -60
  258. package/dist/api/agent-server-adapter.js.map +1 -1
  259. package/dist/api/agent-server-compatibility.cjs +1 -1
  260. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  261. package/dist/api/agent-server-compatibility.js +1 -0
  262. package/dist/api/agent-server-compatibility.js.map +1 -1
  263. package/dist/api/agent-server-home.cjs +1 -1
  264. package/dist/api/agent-server-home.cjs.map +1 -1
  265. package/dist/api/agent-server-home.js +1 -0
  266. package/dist/api/agent-server-home.js.map +1 -1
  267. package/dist/api/cloud/agent-profiles-service.api.cjs +2 -0
  268. package/dist/api/cloud/agent-profiles-service.api.cjs.map +1 -0
  269. package/dist/api/cloud/agent-profiles-service.api.d.ts +7 -0
  270. package/dist/api/cloud/agent-profiles-service.api.js +58 -0
  271. package/dist/api/cloud/agent-profiles-service.api.js.map +1 -0
  272. package/dist/api/cloud/organization-service.api.cjs +1 -1
  273. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  274. package/dist/api/cloud/organization-service.api.d.ts +8 -0
  275. package/dist/api/cloud/organization-service.api.js +3 -1
  276. package/dist/api/cloud/organization-service.api.js.map +1 -1
  277. package/dist/api/cloud/profiles-service.api.cjs +2 -0
  278. package/dist/api/cloud/profiles-service.api.cjs.map +1 -0
  279. package/dist/api/cloud/profiles-service.api.d.ts +7 -0
  280. package/dist/api/cloud/profiles-service.api.js +75 -0
  281. package/dist/api/cloud/profiles-service.api.js.map +1 -0
  282. package/dist/api/cloud/settings-service.api.cjs +1 -1
  283. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  284. package/dist/api/cloud/settings-service.api.js +1 -1
  285. package/dist/api/cloud/settings-service.api.js.map +1 -1
  286. package/dist/api/config-service/config-service.api.cjs +1 -1
  287. package/dist/api/config-service/config-service.api.cjs.map +1 -1
  288. package/dist/api/config-service/config-service.api.js +1 -0
  289. package/dist/api/config-service/config-service.api.js.map +1 -1
  290. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  291. package/dist/api/conversation-metadata-store.d.ts +11 -0
  292. package/dist/api/conversation-metadata-store.js.map +1 -1
  293. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  294. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  295. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -1
  296. package/dist/api/conversation-service/agent-server-conversation-service.api.js +134 -105
  297. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  298. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +2 -0
  299. package/dist/api/conversation-service/conversation-service.api.cjs +1 -1
  300. package/dist/api/conversation-service/conversation-service.api.cjs.map +1 -1
  301. package/dist/api/conversation-service/conversation-service.api.d.ts +1 -0
  302. package/dist/api/conversation-service/conversation-service.api.js +4 -0
  303. package/dist/api/conversation-service/conversation-service.api.js.map +1 -1
  304. package/dist/api/device-flow-client.cjs +1 -1
  305. package/dist/api/device-flow-client.cjs.map +1 -1
  306. package/dist/api/device-flow-client.js +33 -25
  307. package/dist/api/device-flow-client.js.map +1 -1
  308. package/dist/api/event-service/event-service.api.cjs +1 -1
  309. package/dist/api/event-service/event-service.api.cjs.map +1 -1
  310. package/dist/api/event-service/event-service.api.js +1 -0
  311. package/dist/api/event-service/event-service.api.js.map +1 -1
  312. package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
  313. package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
  314. package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -3
  315. package/dist/api/mcp-service/mcp-redacted-credentials.js +29 -30
  316. package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
  317. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  318. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  319. package/dist/api/mcp-service/mcp-service.api.d.ts +8 -1
  320. package/dist/api/mcp-service/mcp-service.api.js +129 -23
  321. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  322. package/dist/api/option-service/option-service.api.cjs +1 -1
  323. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  324. package/dist/api/option-service/option-service.api.js +1 -0
  325. package/dist/api/option-service/option-service.api.js.map +1 -1
  326. package/dist/api/plugins-management-service.cjs +2 -0
  327. package/dist/api/plugins-management-service.cjs.map +1 -0
  328. package/dist/api/plugins-management-service.d.ts +50 -0
  329. package/dist/api/plugins-management-service.js +41 -0
  330. package/dist/api/plugins-management-service.js.map +1 -0
  331. package/dist/api/plugins-service.d.ts +49 -0
  332. package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
  333. package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
  334. package/dist/api/profiles-service/profiles-service.api.js +21 -14
  335. package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
  336. package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
  337. package/dist/api/runtime-service/agent-server-runtime-service.cjs.map +1 -1
  338. package/dist/api/runtime-service/agent-server-runtime-service.js +1 -0
  339. package/dist/api/runtime-service/agent-server-runtime-service.js.map +1 -1
  340. package/dist/api/secrets-service.cjs +1 -1
  341. package/dist/api/secrets-service.cjs.map +1 -1
  342. package/dist/api/secrets-service.js +1 -0
  343. package/dist/api/secrets-service.js.map +1 -1
  344. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  345. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  346. package/dist/api/settings-service/settings-service.api.js +92 -50
  347. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  348. package/dist/api/skills-service.cjs +1 -1
  349. package/dist/api/skills-service.cjs.map +1 -1
  350. package/dist/api/skills-service.js +1 -0
  351. package/dist/api/skills-service.js.map +1 -1
  352. package/dist/api/workspaces-service/workspaces-service.api.cjs +1 -1
  353. package/dist/api/workspaces-service/workspaces-service.api.cjs.map +1 -1
  354. package/dist/api/workspaces-service/workspaces-service.api.js +1 -0
  355. package/dist/api/workspaces-service/workspaces-service.api.js.map +1 -1
  356. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  357. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  358. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +57 -38
  359. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  360. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +2 -1
  361. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
  362. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +13 -9
  363. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
  364. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  365. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  366. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +65 -26
  367. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  368. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  369. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  370. package/dist/components/conversation-events/chat/event-message.js +78 -76
  371. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  372. package/dist/components/features/analytics/telemetry-consent-banner.cjs +1 -1
  373. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +1 -1
  374. package/dist/components/features/analytics/telemetry-consent-banner.js +1 -0
  375. package/dist/components/features/analytics/telemetry-consent-banner.js.map +1 -1
  376. package/dist/components/features/automations/detail/activity-log-item.d.ts +3 -2
  377. package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -2
  378. package/dist/components/features/automations/detail/debug-automation-button.d.ts +17 -0
  379. package/dist/components/features/automations/detail/run-logs-modal.d.ts +6 -1
  380. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  381. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  382. package/dist/components/features/backends/backend-form-modal.d.ts +6 -2
  383. package/dist/components/features/backends/backend-form-modal.js +198 -161
  384. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  385. package/dist/components/features/backends/backend-row.cjs +1 -1
  386. package/dist/components/features/backends/backend-row.cjs.map +1 -1
  387. package/dist/components/features/backends/backend-row.d.ts +2 -1
  388. package/dist/components/features/backends/backend-row.js +60 -54
  389. package/dist/components/features/backends/backend-row.js.map +1 -1
  390. package/dist/components/features/backends/backend-selector.cjs +1 -1
  391. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  392. package/dist/components/features/backends/backend-selector.js +4 -4
  393. package/dist/components/features/backends/backend-version.cjs +1 -1
  394. package/dist/components/features/backends/backend-version.cjs.map +1 -1
  395. package/dist/components/features/backends/backend-version.js +1 -0
  396. package/dist/components/features/backends/backend-version.js.map +1 -1
  397. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  398. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  399. package/dist/components/features/backends/manage-backends-modal.js +72 -61
  400. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  401. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  402. package/dist/components/features/chat/change-agent-button.js +9 -9
  403. package/dist/components/features/chat/chat-add-file-button.cjs +1 -1
  404. package/dist/components/features/chat/chat-add-file-button.cjs.map +1 -1
  405. package/dist/components/features/chat/chat-add-file-button.js +38 -34
  406. package/dist/components/features/chat/chat-add-file-button.js.map +1 -1
  407. package/dist/components/features/chat/chat-interface.cjs +2 -2
  408. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  409. package/dist/components/features/chat/chat-interface.js +136 -129
  410. package/dist/components/features/chat/chat-interface.js.map +1 -1
  411. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  412. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  413. package/dist/components/features/chat/components/chat-input-actions.js +100 -87
  414. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  415. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +2 -0
  416. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -0
  417. package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +15 -0
  418. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +118 -0
  419. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -0
  420. package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
  421. package/dist/components/features/chat/components/chat-input-model.js +17 -17
  422. package/dist/components/features/chat/components/chat-input-profile-picker.cjs +2 -0
  423. package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -0
  424. package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +9 -0
  425. package/dist/components/features/chat/components/chat-input-profile-picker.js +112 -0
  426. package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -0
  427. package/dist/components/features/chat/components/resolve-picker-kind.cjs +2 -0
  428. package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -0
  429. package/dist/components/features/chat/components/resolve-picker-kind.d.ts +29 -0
  430. package/dist/components/features/chat/components/resolve-picker-kind.js +8 -0
  431. package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -0
  432. package/dist/components/features/chat/goal-status-banner.cjs +2 -0
  433. package/dist/components/features/chat/goal-status-banner.cjs.map +1 -0
  434. package/dist/components/features/chat/goal-status-banner.d.ts +11 -0
  435. package/dist/components/features/chat/goal-status-banner.js +12 -0
  436. package/dist/components/features/chat/goal-status-banner.js.map +1 -0
  437. package/dist/components/features/chat/goal-status-content.cjs +2 -0
  438. package/dist/components/features/chat/goal-status-content.cjs.map +1 -0
  439. package/dist/components/features/chat/goal-status-content.d.ts +21 -0
  440. package/dist/components/features/chat/goal-status-content.js +98 -0
  441. package/dist/components/features/chat/goal-status-content.js.map +1 -0
  442. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  443. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  444. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  445. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  446. package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs +1 -1
  447. package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs.map +1 -1
  448. package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +10 -3
  449. package/dist/components/features/chat/tool-visualizers/primitives/code-block.js +29 -16
  450. package/dist/components/features/chat/tool-visualizers/primitives/code-block.js.map +1 -1
  451. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs +1 -1
  452. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs.map +1 -1
  453. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -2
  454. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js +16 -16
  455. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js.map +1 -1
  456. package/dist/components/features/chat/user-message-body.cjs +1 -1
  457. package/dist/components/features/chat/user-message-body.cjs.map +1 -1
  458. package/dist/components/features/chat/user-message-body.js +20 -20
  459. package/dist/components/features/chat/user-message-body.js.map +1 -1
  460. package/dist/components/features/command-menu/command-menu-items.d.ts +32 -0
  461. package/dist/components/features/command-menu/command-menu-trigger.cjs +2 -0
  462. package/dist/components/features/command-menu/command-menu-trigger.cjs.map +1 -0
  463. package/dist/components/features/command-menu/command-menu-trigger.d.ts +5 -0
  464. package/dist/components/features/command-menu/command-menu-trigger.js +53 -0
  465. package/dist/components/features/command-menu/command-menu-trigger.js.map +1 -0
  466. package/dist/components/features/command-menu/command-menu.d.ts +2 -0
  467. package/dist/components/features/command-menu/index.d.ts +2 -0
  468. package/dist/components/features/controls/tools-context-menu.cjs +1 -1
  469. package/dist/components/features/controls/tools-context-menu.cjs.map +1 -1
  470. package/dist/components/features/controls/tools-context-menu.d.ts +3 -1
  471. package/dist/components/features/controls/tools-context-menu.js +94 -77
  472. package/dist/components/features/controls/tools-context-menu.js.map +1 -1
  473. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs +1 -1
  474. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs.map +1 -1
  475. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js +8 -5
  476. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js.map +1 -1
  477. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  478. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
  479. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  480. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  481. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  482. package/dist/components/features/conversation-panel/conversation-panel.js +2 -1
  483. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  484. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
  485. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
  486. package/dist/components/features/conversation-panel/local-new-conversation-menu.js +4 -1
  487. package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
  488. package/dist/components/features/conversation-panel/plugins-modal.cjs +2 -0
  489. package/dist/components/features/conversation-panel/plugins-modal.cjs.map +1 -0
  490. package/dist/components/features/conversation-panel/plugins-modal.d.ts +12 -0
  491. package/dist/components/features/conversation-panel/plugins-modal.js +62 -0
  492. package/dist/components/features/conversation-panel/plugins-modal.js.map +1 -0
  493. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs +1 -1
  494. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs.map +1 -1
  495. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.js +4 -4
  496. package/dist/components/features/mcp-logo-badge.cjs +1 -1
  497. package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
  498. package/dist/components/features/mcp-logo-badge.js +17 -15
  499. package/dist/components/features/mcp-logo-badge.js.map +1 -1
  500. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  501. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  502. package/dist/components/features/mcp-page/custom-server-editor.js +102 -59
  503. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  504. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  505. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  506. package/dist/components/features/mcp-page/install-server-modal.js +284 -169
  507. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  508. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  509. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  510. package/dist/components/features/mcp-page/installed-server-card.js +16 -18
  511. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  512. package/dist/components/features/onboarding/onboarding-host.d.ts +3 -13
  513. package/dist/components/features/plugins/add-plugin-modal.d.ts +6 -0
  514. package/dist/components/features/plugins/build-plugins-view-model.d.ts +39 -0
  515. package/dist/components/features/plugins/plugin-card.d.ts +13 -0
  516. package/dist/components/features/plugins/plugin-detail-modal.d.ts +13 -0
  517. package/dist/components/features/plugins/plugin-picker-card.d.ts +10 -0
  518. package/dist/components/features/plugins/plugin-picker-modal.d.ts +9 -0
  519. package/dist/components/features/plugins/plugin-picker-trigger.d.ts +9 -0
  520. package/dist/components/features/plugins/plugin-picker.d.ts +18 -0
  521. package/dist/components/features/plugins/plugin-spec-identity.d.ts +28 -0
  522. package/dist/components/features/plugins/plugins-toolbar.d.ts +9 -0
  523. package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +16 -0
  524. package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +13 -0
  525. package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +15 -0
  526. package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +7 -0
  527. package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +7 -0
  528. package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +7 -0
  529. package/dist/components/features/settings/agent-profiles/index.d.ts +6 -0
  530. package/dist/components/features/settings/agent-profiles/merge-agent-profile-save-input.d.ts +18 -0
  531. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.cjs +1 -1
  532. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.js +1 -0
  533. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  534. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  535. package/dist/components/features/settings/llm-profiles/profile-row.d.ts +3 -1
  536. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +3 -1
  537. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs +1 -1
  538. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs.map +1 -1
  539. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js +3 -2
  540. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js.map +1 -1
  541. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +7 -7
  542. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  543. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +279 -130
  544. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  545. package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -12
  546. package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -11
  547. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  548. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  549. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  550. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  551. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -2
  552. package/dist/components/features/sidebar/sidebar-rail-body.js +81 -82
  553. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  554. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  555. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  556. package/dist/components/features/sidebar/sidebar.js +45 -46
  557. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  558. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  559. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  560. package/dist/components/features/skills/extensions-navigation.js +1 -2
  561. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  562. package/dist/components/shared/modals/modal-backdrop.cjs +1 -1
  563. package/dist/components/shared/modals/modal-backdrop.cjs.map +1 -1
  564. package/dist/components/shared/modals/modal-backdrop.d.ts +5 -1
  565. package/dist/components/shared/modals/modal-backdrop.js +3 -3
  566. package/dist/components/shared/modals/modal-backdrop.js.map +1 -1
  567. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  568. package/dist/components/shared/modals/settings/model-selector.js +16 -16
  569. package/dist/config/defaults.cjs +1 -1
  570. package/dist/config/defaults.cjs.map +1 -1
  571. package/dist/config/defaults.js +7 -3
  572. package/dist/config/defaults.js.map +1 -1
  573. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  574. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  575. package/dist/contexts/conversation-websocket-context.js +200 -197
  576. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  577. package/dist/hooks/chat/use-goal-interceptor.cjs +2 -0
  578. package/dist/hooks/chat/use-goal-interceptor.cjs.map +1 -0
  579. package/dist/hooks/chat/use-goal-interceptor.d.ts +8 -0
  580. package/dist/hooks/chat/use-goal-interceptor.js +37 -0
  581. package/dist/hooks/chat/use-goal-interceptor.js.map +1 -0
  582. package/dist/hooks/chat/use-grip-resize.cjs +1 -1
  583. package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
  584. package/dist/hooks/chat/use-grip-resize.js +17 -16
  585. package/dist/hooks/chat/use-grip-resize.js.map +1 -1
  586. package/dist/hooks/chat/use-model-interceptor.cjs +1 -1
  587. package/dist/hooks/chat/use-model-interceptor.cjs.map +1 -1
  588. package/dist/hooks/chat/use-model-interceptor.d.ts +3 -3
  589. package/dist/hooks/chat/use-model-interceptor.js +8 -9
  590. package/dist/hooks/chat/use-model-interceptor.js.map +1 -1
  591. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  592. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  593. package/dist/hooks/chat/use-slash-command.js +4 -4
  594. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  595. package/dist/hooks/mutation/conversation-mutation-utils.cjs +1 -1
  596. package/dist/hooks/mutation/conversation-mutation-utils.cjs.map +1 -1
  597. package/dist/hooks/mutation/conversation-mutation-utils.d.ts +17 -0
  598. package/dist/hooks/mutation/conversation-mutation-utils.js +23 -4
  599. package/dist/hooks/mutation/conversation-mutation-utils.js.map +1 -1
  600. package/dist/hooks/mutation/use-activate-agent-profile.cjs +2 -0
  601. package/dist/hooks/mutation/use-activate-agent-profile.cjs.map +1 -0
  602. package/dist/hooks/mutation/use-activate-agent-profile.d.ts +23 -0
  603. package/dist/hooks/mutation/use-activate-agent-profile.js +34 -0
  604. package/dist/hooks/mutation/use-activate-agent-profile.js.map +1 -0
  605. package/dist/hooks/mutation/use-activate-llm-profile.cjs +1 -1
  606. package/dist/hooks/mutation/use-activate-llm-profile.js +1 -1
  607. package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
  608. package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
  609. package/dist/hooks/mutation/use-add-mcp-server.d.ts +1 -12
  610. package/dist/hooks/mutation/use-add-mcp-server.js +10 -34
  611. package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
  612. package/dist/hooks/mutation/use-apply-onboarding-agent-profile.d.ts +20 -0
  613. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  614. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  615. package/dist/hooks/mutation/use-create-conversation.d.ts +2 -0
  616. package/dist/hooks/mutation/use-create-conversation.js +94 -25
  617. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  618. package/dist/hooks/mutation/use-delete-agent-profile.d.ts +1 -0
  619. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  620. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -1
  621. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  622. package/dist/hooks/mutation/use-delete-mcp-server.js +4 -4
  623. package/dist/hooks/mutation/use-fork-conversation.cjs +2 -0
  624. package/dist/hooks/mutation/use-fork-conversation.cjs.map +1 -0
  625. package/dist/hooks/mutation/use-fork-conversation.d.ts +24 -0
  626. package/dist/hooks/mutation/use-fork-conversation.js +29 -0
  627. package/dist/hooks/mutation/use-fork-conversation.js.map +1 -0
  628. package/dist/hooks/mutation/use-install-plugin.d.ts +7 -0
  629. package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
  630. package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
  631. package/dist/hooks/mutation/use-new-conversation-command.d.ts +1 -0
  632. package/dist/hooks/mutation/use-new-conversation-command.js +20 -10
  633. package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
  634. package/dist/hooks/mutation/use-rename-agent-profile.d.ts +6 -0
  635. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  636. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -1
  637. package/dist/hooks/mutation/use-save-agent-profile.d.ts +5 -0
  638. package/dist/hooks/mutation/use-save-llm-profile.cjs +1 -1
  639. package/dist/hooks/mutation/use-save-llm-profile.js +1 -1
  640. package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
  641. package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
  642. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
  643. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
  644. package/dist/hooks/mutation/use-switch-llm-profile-and-log.d.ts +3 -4
  645. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +10 -35
  646. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
  647. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  648. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  649. package/dist/hooks/mutation/use-switch-llm-profile.d.ts +20 -5
  650. package/dist/hooks/mutation/use-switch-llm-profile.js +38 -14
  651. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  652. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  653. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  654. package/dist/hooks/mutation/use-update-mcp-server.js +11 -37
  655. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  656. package/dist/hooks/query/query-keys.cjs +1 -1
  657. package/dist/hooks/query/query-keys.cjs.map +1 -1
  658. package/dist/hooks/query/query-keys.d.ts +21 -0
  659. package/dist/hooks/query/query-keys.js +7 -3
  660. package/dist/hooks/query/query-keys.js.map +1 -1
  661. package/dist/hooks/query/use-active-conversation.cjs +1 -1
  662. package/dist/hooks/query/use-active-conversation.cjs.map +1 -1
  663. package/dist/hooks/query/use-active-conversation.js +17 -16
  664. package/dist/hooks/query/use-active-conversation.js.map +1 -1
  665. package/dist/hooks/query/use-agent-profiles.cjs +2 -0
  666. package/dist/hooks/query/use-agent-profiles.cjs.map +1 -0
  667. package/dist/hooks/query/use-agent-profiles.d.ts +13 -0
  668. package/dist/hooks/query/use-agent-profiles.js +24 -0
  669. package/dist/hooks/query/use-agent-profiles.js.map +1 -0
  670. package/dist/hooks/query/use-backends-health.cjs +1 -1
  671. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  672. package/dist/hooks/query/use-backends-health.js +18 -3
  673. package/dist/hooks/query/use-backends-health.js.map +1 -1
  674. package/dist/hooks/query/use-conversation-history.cjs +1 -1
  675. package/dist/hooks/query/use-conversation-history.cjs.map +1 -1
  676. package/dist/hooks/query/use-conversation-history.js +4 -2
  677. package/dist/hooks/query/use-conversation-history.js.map +1 -1
  678. package/dist/hooks/query/use-local-workspaces.cjs +1 -1
  679. package/dist/hooks/query/use-local-workspaces.cjs.map +1 -1
  680. package/dist/hooks/query/use-local-workspaces.js +1 -0
  681. package/dist/hooks/query/use-local-workspaces.js.map +1 -1
  682. package/dist/hooks/query/use-plugins-marketplace.d.ts +7 -0
  683. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  684. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  685. package/dist/hooks/query/use-resolved-workspaces.js +7 -6
  686. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  687. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  688. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  689. package/dist/hooks/query/use-search-subdirs.js +1 -0
  690. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  691. package/dist/hooks/query/use-settings.cjs +1 -1
  692. package/dist/hooks/query/use-settings.cjs.map +1 -1
  693. package/dist/hooks/query/use-settings.js +11 -11
  694. package/dist/hooks/query/use-settings.js.map +1 -1
  695. package/dist/hooks/query/use-verified-models.cjs +1 -1
  696. package/dist/hooks/query/use-verified-models.cjs.map +1 -1
  697. package/dist/hooks/query/use-verified-models.js +1 -0
  698. package/dist/hooks/query/use-verified-models.js.map +1 -1
  699. package/dist/hooks/use-acp-model-context.cjs +1 -1
  700. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  701. package/dist/hooks/use-acp-model-context.d.ts +1 -1
  702. package/dist/hooks/use-acp-model-context.js +9 -8
  703. package/dist/hooks/use-acp-model-context.js.map +1 -1
  704. package/dist/hooks/use-active-agent-profile.cjs +2 -0
  705. package/dist/hooks/use-active-agent-profile.cjs.map +1 -0
  706. package/dist/hooks/use-active-agent-profile.d.ts +20 -0
  707. package/dist/hooks/use-active-agent-profile.js +17 -0
  708. package/dist/hooks/use-active-agent-profile.js.map +1 -0
  709. package/dist/hooks/use-auto-resize.cjs +1 -1
  710. package/dist/hooks/use-auto-resize.cjs.map +1 -1
  711. package/dist/hooks/use-auto-resize.d.ts +2 -0
  712. package/dist/hooks/use-auto-resize.js +49 -45
  713. package/dist/hooks/use-auto-resize.js.map +1 -1
  714. package/dist/hooks/use-can-manage-org-profiles.cjs +1 -0
  715. package/dist/hooks/use-can-manage-org-profiles.d.ts +18 -0
  716. package/dist/hooks/use-can-manage-org-profiles.js +2 -0
  717. package/dist/hooks/use-chat-input-llm-profile-state.cjs +2 -0
  718. package/dist/hooks/use-chat-input-llm-profile-state.cjs.map +1 -0
  719. package/dist/hooks/use-chat-input-llm-profile-state.d.ts +23 -0
  720. package/dist/hooks/use-chat-input-llm-profile-state.js +30 -0
  721. package/dist/hooks/use-chat-input-llm-profile-state.js.map +1 -0
  722. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
  723. package/dist/hooks/use-chat-input-model-state.d.ts +1 -1
  724. package/dist/hooks/use-chat-input-model-state.js.map +1 -1
  725. package/dist/hooks/use-chat-input-profile-state.cjs +2 -0
  726. package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -0
  727. package/dist/hooks/use-chat-input-profile-state.d.ts +20 -0
  728. package/dist/hooks/use-chat-input-profile-state.js +22 -0
  729. package/dist/hooks/use-chat-input-profile-state.js.map +1 -0
  730. package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
  731. package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
  732. package/dist/hooks/use-conversation-name-context-menu.d.ts +4 -0
  733. package/dist/hooks/use-conversation-name-context-menu.js +44 -37
  734. package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
  735. package/dist/hooks/use-conversation-plugins.cjs +2 -0
  736. package/dist/hooks/use-conversation-plugins.cjs.map +1 -0
  737. package/dist/hooks/use-conversation-plugins.d.ts +9 -0
  738. package/dist/hooks/use-conversation-plugins.js +12 -0
  739. package/dist/hooks/use-conversation-plugins.js.map +1 -0
  740. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  741. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  742. package/dist/hooks/use-handle-plan-click.js +2 -1
  743. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  744. package/dist/hooks/use-llm-configured.cjs +1 -1
  745. package/dist/hooks/use-llm-configured.cjs.map +1 -1
  746. package/dist/hooks/use-llm-configured.js +17 -16
  747. package/dist/hooks/use-llm-configured.js.map +1 -1
  748. package/dist/hooks/use-tracking.cjs +1 -1
  749. package/dist/hooks/use-tracking.cjs.map +1 -1
  750. package/dist/hooks/use-tracking.d.ts +51 -1
  751. package/dist/hooks/use-tracking.js +61 -2
  752. package/dist/hooks/use-tracking.js.map +1 -1
  753. package/dist/i18n/declaration.cjs +1 -1
  754. package/dist/i18n/declaration.cjs.map +1 -1
  755. package/dist/i18n/declaration.d.ts +138 -1
  756. package/dist/i18n/declaration.js +1 -1
  757. package/dist/i18n/declaration.js.map +1 -1
  758. package/dist/i18n/translation.cjs +18 -3
  759. package/dist/i18n/translation.cjs.map +1 -1
  760. package/dist/i18n/translation.js +2329 -0
  761. package/dist/i18n/translation.js.map +1 -1
  762. package/dist/icons/slack.cjs +2 -0
  763. package/dist/icons/slack.cjs.map +1 -0
  764. package/dist/icons/slack.js +19 -0
  765. package/dist/icons/slack.js.map +1 -0
  766. package/dist/icons/u-puzzle-piece.cjs +2 -0
  767. package/dist/icons/u-puzzle-piece.cjs.map +1 -0
  768. package/dist/icons/u-puzzle-piece.js +19 -0
  769. package/dist/icons/u-puzzle-piece.js.map +1 -0
  770. package/dist/icons/x-circle-solid.cjs +2 -0
  771. package/dist/icons/x-circle-solid.cjs.map +1 -0
  772. package/dist/icons/x-circle-solid.js +13 -0
  773. package/dist/icons/x-circle-solid.js.map +1 -0
  774. package/dist/locales/ar/openhands.json +138 -1
  775. package/dist/locales/ca/openhands.json +138 -1
  776. package/dist/locales/de/openhands.json +138 -1
  777. package/dist/locales/en/openhands.json +138 -1
  778. package/dist/locales/es/openhands.json +138 -1
  779. package/dist/locales/fr/openhands.json +138 -1
  780. package/dist/locales/it/openhands.json +138 -1
  781. package/dist/locales/ja/openhands.json +138 -1
  782. package/dist/locales/ko-KR/openhands.json +138 -1
  783. package/dist/locales/no/openhands.json +138 -1
  784. package/dist/locales/pt/openhands.json +138 -1
  785. package/dist/locales/tr/openhands.json +138 -1
  786. package/dist/locales/uk/openhands.json +138 -1
  787. package/dist/locales/zh-CN/openhands.json +138 -1
  788. package/dist/locales/zh-TW/openhands.json +138 -1
  789. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs +1 -1
  790. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs.map +1 -1
  791. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js +0 -20
  792. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js.map +1 -1
  793. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs +1 -1
  794. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs.map +1 -1
  795. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js +1 -6
  796. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js.map +1 -1
  797. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs +1 -1
  798. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs.map +1 -1
  799. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js +1 -6
  800. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js.map +1 -1
  801. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs +1 -1
  802. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs.map +1 -1
  803. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js +1 -6
  804. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js.map +1 -1
  805. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs +1 -1
  806. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs.map +1 -1
  807. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js +3 -7
  808. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js.map +1 -1
  809. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs +1 -1
  810. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs.map +1 -1
  811. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js +1 -6
  812. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js.map +1 -1
  813. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs +1 -1
  814. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs.map +1 -1
  815. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js +1 -6
  816. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js.map +1 -1
  817. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs +1 -1
  818. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs.map +1 -1
  819. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js +20 -26
  820. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js.map +1 -1
  821. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  822. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  823. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +0 -9
  824. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  825. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs +1 -1
  826. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs.map +1 -1
  827. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js +1 -6
  828. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js.map +1 -1
  829. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs +1 -1
  830. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs.map +1 -1
  831. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js +1 -6
  832. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js.map +1 -1
  833. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs +1 -1
  834. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs.map +1 -1
  835. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js +1 -6
  836. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js.map +1 -1
  837. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs +1 -1
  838. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs.map +1 -1
  839. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js +1 -6
  840. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js.map +1 -1
  841. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs +1 -1
  842. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs.map +1 -1
  843. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js +1 -6
  844. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js.map +1 -1
  845. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs +1 -1
  846. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs.map +1 -1
  847. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js +1 -6
  848. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js.map +1 -1
  849. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs +1 -1
  850. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs.map +1 -1
  851. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js +1 -6
  852. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js.map +1 -1
  853. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  854. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  855. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +13 -13
  856. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  857. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  858. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  859. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +1 -6
  860. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  861. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  862. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  863. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +1 -6
  864. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  865. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs +1 -1
  866. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs.map +1 -1
  867. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js +14 -10
  868. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js.map +1 -1
  869. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs +1 -1
  870. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs.map +1 -1
  871. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js +13 -10
  872. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js.map +1 -1
  873. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs +1 -1
  874. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs.map +1 -1
  875. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js +1 -6
  876. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js.map +1 -1
  877. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  878. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  879. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -8
  880. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  881. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs +1 -1
  882. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs.map +1 -1
  883. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js +1 -6
  884. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js.map +1 -1
  885. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  886. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  887. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +1 -6
  888. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  889. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs +1 -1
  890. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs.map +1 -1
  891. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js +20 -18
  892. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js.map +1 -1
  893. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs +1 -1
  894. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs.map +1 -1
  895. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js +66 -21
  896. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js.map +1 -1
  897. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs +1 -1
  898. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs.map +1 -1
  899. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js +17 -11
  900. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js.map +1 -1
  901. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs +1 -1
  902. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs.map +1 -1
  903. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js +12 -17
  904. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js.map +1 -1
  905. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  906. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  907. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +1 -6
  908. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  909. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  910. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  911. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +1 -1
  912. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  913. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs +1 -1
  914. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs.map +1 -1
  915. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js +14 -19
  916. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js.map +1 -1
  917. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs +1 -1
  918. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs.map +1 -1
  919. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js +15 -20
  920. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js.map +1 -1
  921. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs +1 -1
  922. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs.map +1 -1
  923. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js +10 -8
  924. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js.map +1 -1
  925. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs +1 -1
  926. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs.map +1 -1
  927. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js +1 -6
  928. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js.map +1 -1
  929. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs +1 -1
  930. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs.map +1 -1
  931. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js +1 -6
  932. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js.map +1 -1
  933. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs +1 -1
  934. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs.map +1 -1
  935. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js +1 -6
  936. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js.map +1 -1
  937. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  938. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  939. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +67 -87
  940. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  941. package/dist/node_modules/@openhands/extensions/integrations/index.cjs +1 -1
  942. package/dist/node_modules/@openhands/extensions/integrations/index.cjs.map +1 -1
  943. package/dist/node_modules/@openhands/extensions/integrations/index.js +4 -4
  944. package/dist/node_modules/@openhands/extensions/integrations/index.js.map +1 -1
  945. package/dist/node_modules/@openhands/extensions/skills/index.cjs +236 -17
  946. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  947. package/dist/node_modules/@openhands/extensions/skills/index.js +24 -5
  948. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  949. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs +2 -0
  950. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs.map +1 -0
  951. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js +40 -0
  952. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js.map +1 -0
  953. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
  954. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
  955. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +4 -4
  956. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
  957. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
  958. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
  959. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +3 -0
  960. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
  961. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
  962. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
  963. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +3 -0
  964. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
  965. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -0
  966. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +1 -0
  967. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +1 -0
  968. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +1 -0
  969. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs +1 -1
  970. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs.map +1 -1
  971. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js +84 -27
  972. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js.map +1 -1
  973. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs +1 -1
  974. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs.map +1 -1
  975. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js +9 -0
  976. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js.map +1 -1
  977. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +1 -0
  978. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +1 -0
  979. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs +2 -0
  980. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs.map +1 -0
  981. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js +42 -0
  982. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js.map +1 -0
  983. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +1 -0
  984. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +1 -0
  985. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs +1 -1
  986. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs.map +1 -1
  987. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js +1 -1
  988. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js.map +1 -1
  989. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +1 -0
  990. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +1 -0
  991. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +1 -0
  992. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +1 -0
  993. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -0
  994. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +20 -0
  995. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.cjs +1 -1
  996. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.js +18 -0
  997. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.cjs +1 -1
  998. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.js +1 -0
  999. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
  1000. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +2 -0
  1001. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
  1002. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
  1003. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +15 -17
  1004. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
  1005. package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
  1006. package/dist/node_modules/@openhands/typescript-client/dist/index.js +3 -0
  1007. package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.cjs +1 -0
  1008. package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.js +1 -0
  1009. package/dist/package.cjs +1 -1
  1010. package/dist/package.cjs.map +1 -1
  1011. package/dist/package.js +7 -4
  1012. package/dist/package.js.map +1 -1
  1013. package/dist/routes/agent-settings.d.ts +106 -0
  1014. package/dist/routes/files-tab.cjs +1 -1
  1015. package/dist/routes/files-tab.js +23 -23
  1016. package/dist/routes/llm-settings.cjs +1 -1
  1017. package/dist/routes/llm-settings.cjs.map +1 -1
  1018. package/dist/routes/llm-settings.d.ts +6 -4
  1019. package/dist/routes/llm-settings.js +0 -1
  1020. package/dist/routes/llm-settings.js.map +1 -1
  1021. package/dist/routes/mcp.cjs.map +1 -1
  1022. package/dist/routes/mcp.js.map +1 -1
  1023. package/dist/services/settings.cjs +1 -1
  1024. package/dist/services/settings.cjs.map +1 -1
  1025. package/dist/services/settings.js +2 -6
  1026. package/dist/services/settings.js.map +1 -1
  1027. package/dist/stores/command-menu-store.cjs +2 -0
  1028. package/dist/stores/command-menu-store.cjs.map +1 -0
  1029. package/dist/stores/command-menu-store.d.ts +8 -0
  1030. package/dist/stores/command-menu-store.js +12 -0
  1031. package/dist/stores/command-menu-store.js.map +1 -0
  1032. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  1033. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  1034. package/dist/stores/conversation-panel-preferences-store.js +1 -1
  1035. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  1036. package/dist/stores/conversation-store.cjs +1 -1
  1037. package/dist/stores/conversation-store.cjs.map +1 -1
  1038. package/dist/stores/conversation-store.d.ts +1 -0
  1039. package/dist/stores/conversation-store.js +1 -0
  1040. package/dist/stores/conversation-store.js.map +1 -1
  1041. package/dist/stores/goal-store.cjs +2 -0
  1042. package/dist/stores/goal-store.cjs.map +1 -0
  1043. package/dist/stores/goal-store.d.ts +28 -0
  1044. package/dist/stores/goal-store.js +14 -0
  1045. package/dist/stores/goal-store.js.map +1 -0
  1046. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +39 -3
  1047. package/dist/types/agent-server/type-guards.cjs +1 -1
  1048. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  1049. package/dist/types/agent-server/type-guards.d.ts +2 -1
  1050. package/dist/types/agent-server/type-guards.js +3 -3
  1051. package/dist/types/agent-server/type-guards.js.map +1 -1
  1052. package/dist/types/mcp-auth.cjs +2 -0
  1053. package/dist/types/mcp-auth.cjs.map +1 -0
  1054. package/dist/types/mcp-auth.d.ts +43 -0
  1055. package/dist/types/mcp-auth.js +13 -0
  1056. package/dist/types/mcp-auth.js.map +1 -0
  1057. package/dist/types/mcp-server.d.ts +22 -1
  1058. package/dist/types/settings.d.ts +6 -4
  1059. package/dist/ui/context-menu.d.ts +1 -1
  1060. package/dist/utils/acp-command.d.ts +64 -0
  1061. package/dist/utils/automation-debug-prompt.d.ts +18 -0
  1062. package/dist/utils/constants.cjs +1 -1
  1063. package/dist/utils/constants.cjs.map +1 -1
  1064. package/dist/utils/constants.d.ts +2 -0
  1065. package/dist/utils/constants.js +12 -3
  1066. package/dist/utils/constants.js.map +1 -1
  1067. package/dist/utils/dropdown-classes.cjs +1 -1
  1068. package/dist/utils/dropdown-classes.cjs.map +1 -1
  1069. package/dist/utils/dropdown-classes.js +4 -2
  1070. package/dist/utils/dropdown-classes.js.map +1 -1
  1071. package/dist/utils/form-control-classes.cjs +1 -1
  1072. package/dist/utils/form-control-classes.js +1 -1
  1073. package/dist/utils/handle-event-for-ui.cjs +1 -1
  1074. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  1075. package/dist/utils/handle-event-for-ui.js +72 -37
  1076. package/dist/utils/handle-event-for-ui.js.map +1 -1
  1077. package/dist/utils/mcp-config.cjs +1 -1
  1078. package/dist/utils/mcp-config.cjs.map +1 -1
  1079. package/dist/utils/mcp-config.d.ts +15 -9
  1080. package/dist/utils/mcp-config.js +124 -53
  1081. package/dist/utils/mcp-config.js.map +1 -1
  1082. package/dist/utils/mcp-installed-server-display.cjs +2 -0
  1083. package/dist/utils/mcp-installed-server-display.cjs.map +1 -0
  1084. package/dist/utils/mcp-installed-server-display.d.ts +8 -0
  1085. package/dist/utils/mcp-installed-server-display.js +12 -0
  1086. package/dist/utils/mcp-installed-server-display.js.map +1 -0
  1087. package/dist/utils/mcp-installed-servers.cjs +1 -1
  1088. package/dist/utils/mcp-installed-servers.cjs.map +1 -1
  1089. package/dist/utils/mcp-installed-servers.js +4 -4
  1090. package/dist/utils/mcp-installed-servers.js.map +1 -1
  1091. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  1092. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  1093. package/dist/utils/mcp-marketplace-utils.d.ts +2 -0
  1094. package/dist/utils/mcp-marketplace-utils.js +31 -16
  1095. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  1096. package/dist/utils/mcp-server-name.cjs +2 -0
  1097. package/dist/utils/mcp-server-name.cjs.map +1 -0
  1098. package/dist/utils/mcp-server-name.d.ts +3 -0
  1099. package/dist/utils/mcp-server-name.js +12 -0
  1100. package/dist/utils/mcp-server-name.js.map +1 -0
  1101. package/dist/utils/plugin-display.cjs +2 -0
  1102. package/dist/utils/plugin-display.cjs.map +1 -0
  1103. package/dist/utils/plugin-display.d.ts +20 -0
  1104. package/dist/utils/plugin-display.js +29 -0
  1105. package/dist/utils/plugin-display.js.map +1 -0
  1106. package/dist/utils/settings-utils.cjs.map +1 -1
  1107. package/dist/utils/settings-utils.js.map +1 -1
  1108. package/dist/utils/workspaces-compatibility.cjs +1 -1
  1109. package/dist/utils/workspaces-compatibility.cjs.map +1 -1
  1110. package/dist/utils/workspaces-compatibility.js +1 -0
  1111. package/dist/utils/workspaces-compatibility.js.map +1 -1
  1112. package/package.json +7 -4
  1113. package/scripts/check-sdk-version-sync.mjs +6 -6
  1114. package/scripts/check-translation-completeness.cjs +6 -0
  1115. package/scripts/dev-safe.mjs +14 -3
  1116. package/scripts/dev-with-automation.mjs +4 -0
  1117. package/scripts/gen-acp-docker-env.mjs +107 -0
  1118. package/scripts/ingress.mjs +66 -226
  1119. package/scripts/proxy-utils.mjs +171 -0
  1120. package/scripts/static-server.mjs +127 -283
  1121. package/build/assets/Trans-CiZR6eVI.js +0 -1
  1122. package/build/assets/active-backend-context-CEuva6ZJ.js +0 -1
  1123. package/build/assets/add-backend-modal-b_eiVk3A.js +0 -1
  1124. package/build/assets/agent-server-conversation-service.api-D_uJ7BKc.js +0 -5
  1125. package/build/assets/agent-settings-DyfziYyM.js +0 -2
  1126. package/build/assets/alert-banner-BFayS5vM.js +0 -1
  1127. package/build/assets/analytics-consent-form-modal-CQ22qlFF.js +0 -1
  1128. package/build/assets/api-key-entry-screen-KnIwP0vN.js +0 -1
  1129. package/build/assets/app-settings-CBaHJ5vJ.js +0 -1
  1130. package/build/assets/automation-detail-DgQswnXg.js +0 -1
  1131. package/build/assets/automations-list-D99p6CoQ.js +0 -1
  1132. package/build/assets/back-nav-button-Cp9z-wsG.js +0 -1
  1133. package/build/assets/backend-form-modal-BABAz-zH.js +0 -1
  1134. package/build/assets/backend-synced-settings-badge-DzwWQC4T.js +0 -1
  1135. package/build/assets/base-modal-1bHiB5Wf.js +0 -1
  1136. package/build/assets/brand-button-FHWgEb4Q.js +0 -1
  1137. package/build/assets/browser-store-B9h0eW79.js +0 -1
  1138. package/build/assets/browser-tab-JiCXo0Nc.js +0 -1
  1139. package/build/assets/chat-send-button-QtyofqFt.js +0 -1
  1140. package/build/assets/check-6ieIiPhW.js +0 -1
  1141. package/build/assets/checkmark-BfgRVMHK.js +0 -1
  1142. package/build/assets/circle-plus-check-toggle-CmINKfZj.js +0 -1
  1143. package/build/assets/close-DhH0uMa7.js +0 -1
  1144. package/build/assets/code-tag-CnORXDJj.js +0 -1
  1145. package/build/assets/combobox-caret-BB15S7zY.js +0 -1
  1146. package/build/assets/condenser-settings-BOKNShD9.js +0 -1
  1147. package/build/assets/confirmation-modal-CofmThy4.js +0 -1
  1148. package/build/assets/context-menu-list-item-DO12IEaK.js +0 -1
  1149. package/build/assets/conversation-DIzv-jq8.js +0 -1
  1150. package/build/assets/conversation-DV3odvMe.js +0 -19
  1151. package/build/assets/conversation-local-storage-DK7yJr5N.js +0 -1
  1152. package/build/assets/conversation-panel-CgCarTAn.js +0 -1
  1153. package/build/assets/conversation-service.api-RV_bOKNz.js +0 -1
  1154. package/build/assets/conversation-state-store-4obo4ZMf.js +0 -1
  1155. package/build/assets/conversation-store-CXrL0v-X.js +0 -6
  1156. package/build/assets/conversation-tab-empty-state-CqT5ur_H.js +0 -1
  1157. package/build/assets/copy-C5tBqfWu.js +0 -1
  1158. package/build/assets/copy-to-clipboard-button-BVFYcsg_.js +0 -1
  1159. package/build/assets/createLucideIcon-D3nkdIAN.js +0 -1
  1160. package/build/assets/declaration-B0yY_dkQ.js +0 -1
  1161. package/build/assets/device-verify-DRupI_hz.js +0 -1
  1162. package/build/assets/dist-D5d5zm8o.js +0 -1
  1163. package/build/assets/dist-fV7trlfb.js +0 -1
  1164. package/build/assets/dropdown-classes-5IsMjYYw.js +0 -1
  1165. package/build/assets/edit-automation-modal-BG-gd82b.js +0 -1
  1166. package/build/assets/ellipsis-button-DWvVZO_r.js +0 -1
  1167. package/build/assets/entry.client-uhbVfCtd.js +0 -2
  1168. package/build/assets/enum-filter-dropdown-CB2fqz_e.js +0 -1
  1169. package/build/assets/environment-switch-overlay-Oeal5TVq.js +0 -1
  1170. package/build/assets/extensions-hub-DxiE0AZR.js +0 -1
  1171. package/build/assets/files-tab-1F2OlNeH.js +0 -1
  1172. package/build/assets/files-tab-store-C1q5Rbx3.js +0 -1
  1173. package/build/assets/folder-C5tr7xyN.js +0 -1
  1174. package/build/assets/get-language-from-path-E1JKsbeE.js +0 -1
  1175. package/build/assets/git-provider-icon-CKs-22Ts.js +0 -1
  1176. package/build/assets/home-B3E0le0g.js +0 -1
  1177. package/build/assets/iconBase-DMoh3FEg.js +0 -1
  1178. package/build/assets/index-redirect-DhuK5mhS.js +0 -1
  1179. package/build/assets/install-server-modal-DjintV14.js +0 -1
  1180. package/build/assets/is-backend-llm-ready-Bj44pekN.js +0 -1
  1181. package/build/assets/launch-DCU3S84p.js +0 -1
  1182. package/build/assets/lesson-plan-BUUPKVsa.js +0 -3
  1183. package/build/assets/link-external-CF4KHxx-.js +0 -1
  1184. package/build/assets/llm-client-BakM_czF.js +0 -1
  1185. package/build/assets/llm-not-configured-banner-BV-NIjfR.js +0 -27
  1186. package/build/assets/llm-settings-B5d7PHzz.js +0 -1
  1187. package/build/assets/llm-settings-C5whb-0p.js +0 -1
  1188. package/build/assets/loader-circle-DyX8DmLg.js +0 -1
  1189. package/build/assets/loading-spinner-BvOAco8a.js +0 -1
  1190. package/build/assets/manage-backends-modal-D9ClxVpM.js +0 -1
  1191. package/build/assets/manifest-38a873aa.js +0 -1
  1192. package/build/assets/mcp-7rk44GRS.js +0 -9
  1193. package/build/assets/mcp-client-DxHXYNOw.js +0 -1
  1194. package/build/assets/messages-DgBEaXil.js +0 -43
  1195. package/build/assets/modal-backdrop-DjAC2zOZ.js +0 -1
  1196. package/build/assets/modal-body-OJdIUJ68.js +0 -1
  1197. package/build/assets/modal-close-button-BNjGesHc.js +0 -1
  1198. package/build/assets/model-selector-w2uGPM5y.js +0 -1
  1199. package/build/assets/navigation-context-CUJ60pLI.js +0 -1
  1200. package/build/assets/navigation-link-BiPKTOHF.js +0 -1
  1201. package/build/assets/onboarding-Cit87z8g.js +0 -1
  1202. package/build/assets/onboarding-modal-JPrzvr8W.js +0 -1
  1203. package/build/assets/openhands-logo-uNs9g6LY.js +0 -1
  1204. package/build/assets/option-service.api-BLYUhnCF.js +0 -1
  1205. package/build/assets/organization-service.api-DpSSwlZu.js +0 -1
  1206. package/build/assets/path-utils-B4WAVqvK.js +0 -1
  1207. package/build/assets/plan-components-DSOTFW2D.js +0 -1
  1208. package/build/assets/planner-tab-LmoxgKKe.js +0 -1
  1209. package/build/assets/preload-helper-D_sPnjeL.js +0 -1
  1210. package/build/assets/profiles-client-B4SJ4ZAf.js +0 -1
  1211. package/build/assets/providers-BGUAB8kf.js +0 -1
  1212. package/build/assets/react-Dn-iWFF5.js +0 -1
  1213. package/build/assets/react-dom-BBXlXOZX.js +0 -1
  1214. package/build/assets/react-uQK8du1l.js +0 -1
  1215. package/build/assets/recommended-automations-launcher-Df9MXUpX.js +0 -50
  1216. package/build/assets/root-BShAdYGY.css +0 -1
  1217. package/build/assets/root-C99reK-P.js +0 -2
  1218. package/build/assets/root-layout-BtH64XeC.js +0 -2
  1219. package/build/assets/runtime-waiting-state-C7MjXDeW.js +0 -1
  1220. package/build/assets/schema-field-BCDuEMrl.js +0 -1
  1221. package/build/assets/sdk-section-page-XJN9mGju.js +0 -1
  1222. package/build/assets/sdk-settings-schema-B15AE1GH.js +0 -1
  1223. package/build/assets/search-rob4u9f8.js +0 -1
  1224. package/build/assets/secrets-service-CrPyCR8u.js +0 -1
  1225. package/build/assets/secrets-settings-UJn15N7E.js +0 -1
  1226. package/build/assets/settings-C5aUD_sQ.js +0 -1
  1227. package/build/assets/settings-dropdown-input-DQRt2_RA.js +0 -1
  1228. package/build/assets/settings-gear-B7bZDo_8.js +0 -1
  1229. package/build/assets/settings-index-zP_rYIW1.js +0 -1
  1230. package/build/assets/settings-input-n8FzVso3.js +0 -1
  1231. package/build/assets/settings-list-classes-DquY3fwm.js +0 -1
  1232. package/build/assets/settings-modal-szlQ6LpE.js +0 -1
  1233. package/build/assets/settings-section-header-context-DrXgyNC-.js +0 -1
  1234. package/build/assets/settings-service.api-B4G8NzCM.js +0 -1
  1235. package/build/assets/settings-switch-DsbEm3ie.js +0 -1
  1236. package/build/assets/shared-conversation-BrAvqeaI.js +0 -1
  1237. package/build/assets/sidebar-mobile-menu-toggle-BRZGCe-l.js +0 -1
  1238. package/build/assets/sidebar-nav-link-B_EygIce.js +0 -1
  1239. package/build/assets/skill-card-pill-row-Bq9Imkdh.js +0 -1
  1240. package/build/assets/skills-Wg6i0kbu.js +0 -1
  1241. package/build/assets/skills-client-DNd444Bm.js +0 -1
  1242. package/build/assets/skills-plugins-DaGkVI7-.js +0 -1
  1243. package/build/assets/skills-settings-Dlp0WFaT.js +0 -2
  1244. package/build/assets/styled-tooltip-ulgpZDga.js +0 -1
  1245. package/build/assets/suspense-BqBQEuKs.js +0 -1
  1246. package/build/assets/switch-skeleton-C49gVWOQ.js +0 -1
  1247. package/build/assets/task-list-tab-Bz-UlCm2.js +0 -1
  1248. package/build/assets/telemetry-DD3HKMgf.js +0 -2
  1249. package/build/assets/terminal-BwLvVzyJ.js +0 -1
  1250. package/build/assets/toggle-switch-CxW8-lBI.js +0 -1
  1251. package/build/assets/typography-BLf_mRKH.js +0 -1
  1252. package/build/assets/u-check-circle-CxTAJuY9.js +0 -1
  1253. package/build/assets/u-check-circle-half-Bj73jfUG.js +0 -1
  1254. package/build/assets/u-circuit-C-6V9H9C.js +0 -1
  1255. package/build/assets/u-edit-C7OnK2sa.js +0 -1
  1256. package/build/assets/use-acp-credential-form-oehc057O.js +0 -1
  1257. package/build/assets/use-active-conversation-CFXVX2on.js +0 -1
  1258. package/build/assets/use-agent-state-D6xfZA4-.js +0 -1
  1259. package/build/assets/use-backends-health-93yRIOWs.js +0 -1
  1260. package/build/assets/use-breakpoint-Xdy_aZHE.js +0 -1
  1261. package/build/assets/use-click-outside-element-CADb_gCP.js +0 -1
  1262. package/build/assets/use-cloud-current-user-id-CzOXsy04.js +0 -1
  1263. package/build/assets/use-config-oXjEWyb6.js +0 -1
  1264. package/build/assets/use-create-conversation-D-YkgrxS.js +0 -1
  1265. package/build/assets/use-create-secret-CX7Ij7W4.js +0 -1
  1266. package/build/assets/use-event-store-DMRAQQi8.js +0 -1
  1267. package/build/assets/use-handle-plan-click-CwW2Ijc2.js +0 -1
  1268. package/build/assets/use-is-authed-CNbX1KMm.js +0 -1
  1269. package/build/assets/use-launch-skill-in-chat-xI9byRUw.js +0 -1
  1270. package/build/assets/use-llm-profiles-BXRZ2rBh.js +0 -1
  1271. package/build/assets/use-runtime-is-ready-Dwzs9_vp.js +0 -1
  1272. package/build/assets/use-settings-_usWr_qn.js +0 -1
  1273. package/build/assets/use-settings-nav-items-DoB5iH-7.js +0 -16
  1274. package/build/assets/use-skills-BtorhoCN.js +0 -1
  1275. package/build/assets/use-task-list-u46BhYBC.js +0 -1
  1276. package/build/assets/use-tracking-Ca7p71hH.js +0 -1
  1277. package/build/assets/use-user-conversation-U-16WF6G.js +0 -1
  1278. package/build/assets/useMutation-CseCrRRO.js +0 -1
  1279. package/build/assets/useQuery-bowvACed.js +0 -1
  1280. package/build/assets/useTranslation-KhTtKmnv.js +0 -1
  1281. package/build/assets/utils-cRyMoFbz.js +0 -1
  1282. package/build/assets/vendor~conversation-panel~conversation~alert-banner-CjfR7T3x.js +0 -1
  1283. package/build/assets/vendor~entry.client-_zl82x5T.js +0 -1
  1284. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dj9x5fm9-CgCGB-3J.js +0 -177
  1285. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfvr34cq-BJdsUTJG.js +0 -1
  1286. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~m3df9r20-BynFAJ_S.js +0 -1
  1287. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nk00xiud-MfCRtPrK.js +0 -9
  1288. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ghtfhmuy-BHDILMe2.js +0 -1
  1289. package/build/assets/vendor~root-layout~conversation-panel~conversation-BFZmbXpq.js +0 -1
  1290. package/build/assets/vendor~root-layout~conversation-panel~conversation~index-BPY-kNjK.js +0 -1
  1291. package/build/assets/vendor~root-layout~home~conversation-panel~conversation-BhWqQNmF.js +0 -1
  1292. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~cfyi58ut-CnnEa0dP.js +0 -1
  1293. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~clac83qc-DMX6XUwI.js +0 -2
  1294. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-Cqp6k3RG.js +0 -1
  1295. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-DS4GWhCz.js +0 -9
  1296. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~ji28rqgb-DVffa9Ks.js +0 -48
  1297. package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-BzR6ypP3.js +0 -1
  1298. package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-BcvHZmEZ.js +0 -2
  1299. package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-Cuvp6wqR.js +0 -14
  1300. package/build/assets/verification-settings-DKZnUHD6.js +0 -1
  1301. package/build/assets/x-DpnGZyVW.js +0 -1
  1302. package/build/assets/x-mark-x3tvCZzc.js +0 -1
  1303. package/dist/components/features/analytics/analytics-consent-form-modal.d.ts +0 -5
  1304. package/dist/components/features/chat/switch-profile-button.cjs +0 -2
  1305. package/dist/components/features/chat/switch-profile-button.cjs.map +0 -1
  1306. package/dist/components/features/chat/switch-profile-button.d.ts +0 -1
  1307. package/dist/components/features/chat/switch-profile-button.js +0 -48
  1308. package/dist/components/features/chat/switch-profile-button.js.map +0 -1
  1309. package/dist/components/features/chat/switch-profile-context-menu.cjs +0 -2
  1310. package/dist/components/features/chat/switch-profile-context-menu.cjs.map +0 -1
  1311. package/dist/components/features/chat/switch-profile-context-menu.d.ts +0 -9
  1312. package/dist/components/features/chat/switch-profile-context-menu.js +0 -106
  1313. package/dist/components/features/chat/switch-profile-context-menu.js.map +0 -1
  1314. package/dist/components/features/onboarding/is-backend-llm-ready.d.ts +0 -30
  1315. package/dist/icons/u-circuit.cjs +0 -2
  1316. package/dist/icons/u-circuit.cjs.map +0 -1
  1317. package/dist/icons/u-circuit.js +0 -19
  1318. package/dist/icons/u-circuit.js.map +0 -1
  1319. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs +0 -2
  1320. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs.map +0 -1
  1321. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js +0 -35
  1322. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js.map +0 -1
  1323. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs +0 -2
  1324. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs.map +0 -1
  1325. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js +0 -35
  1326. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js.map +0 -1
  1327. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs +0 -2
  1328. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs.map +0 -1
  1329. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js +0 -35
  1330. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js.map +0 -1
  1331. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +0 -2
  1332. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +0 -1
  1333. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +0 -35
  1334. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +0 -1
  1335. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs +0 -2
  1336. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs.map +0 -1
  1337. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js +0 -35
  1338. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js.map +0 -1
  1339. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs +0 -2
  1340. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs.map +0 -1
  1341. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js +0 -35
  1342. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js.map +0 -1
  1343. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs +0 -2
  1344. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs.map +0 -1
  1345. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js +0 -28
  1346. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js.map +0 -1
  1347. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs +0 -2
  1348. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs.map +0 -1
  1349. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js +0 -35
  1350. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js.map +0 -1
  1351. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs +0 -2
  1352. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs.map +0 -1
  1353. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js +0 -35
  1354. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js.map +0 -1
  1355. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs +0 -2
  1356. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs.map +0 -1
  1357. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js +0 -35
  1358. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js.map +0 -1
  1359. /package/build/assets/{agent-server-ui-style-scope-CIDFDeQb.js → agent-server-ui-style-scope-COnDHTm5.js} +0 -0
  1360. /package/build/assets/{automation-DNgDxqtq.js → automation-BU8zu-FP.js} +0 -0
  1361. /package/build/assets/{common-KeiA2Rod.js → common-Dh7OqABE.js} +0 -0
  1362. /package/build/assets/{environment-switch-store-BpKxp6Xq.js → environment-switch-store-DkjlKWzN.js} +0 -0
  1363. /package/build/assets/{extension-module-card-classes-DvvyImGv.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
  1364. /package/build/assets/{git-status-mapper-B3_HbzUT.js → git-status-mapper-BI8FyUVp.js} +0 -0
  1365. /package/build/assets/{handle-capture-consent-BChvj6mt.js → handle-capture-consent-CPMXU29K.js} +0 -0
  1366. /package/build/assets/{llm-subscription-C1xDoa3K.js → llm-subscription-DtsX5Lhg.js} +0 -0
  1367. /package/build/assets/{map-provider-MonJL5SS.js → map-provider-BM2SJarp.js} +0 -0
  1368. /package/build/assets/{objectWithoutPropertiesLoose-BRYudkUn.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
  1369. /package/build/assets/{rolldown-runtime-wFmyQBCi.js → rolldown-runtime-BFRubm34.js} +0 -0
  1370. /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-DENKlZpD.js} +0 -0
  1371. /package/build/assets/{v4-BMWDcIWQ.js → v4-DbCkTSoU.js} +0 -0
  1372. /package/build/assets/{vendor~browser-yZEspfT9.js → vendor~browser-Dqd33JyP.js} +0 -0
  1373. /package/build/assets/{vendor~terminal-CcUoOdAH.js → vendor~terminal-aeP3PnKf.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.js","names":[],"sources":["../../../src/hooks/query/query-keys.ts"],"sourcesContent":["/**\n * Centralized query keys and cache configuration for TanStack Query.\n * Using constants ensures type safety and prevents typos.\n */\n\nimport { SettingsScope } from \"#/types/settings\";\n\nexport const QUERY_KEYS = {\n /** Web client configuration from the server */\n WEB_CLIENT_CONFIG: [\"web-client-config\"] as const,\n} as const;\n\nexport const SETTINGS_QUERY_KEYS = {\n all: [\"settings\"] as const,\n byScope: (scope: SettingsScope) => [\"settings\", scope] as const,\n personal: () => [\"settings\", \"personal\"] as const,\n} as const;\n\nexport const LLM_PROFILES_QUERY_KEYS = {\n all: [\"llm-profiles\"] as const,\n} as const;\n\nexport const LLM_SUBSCRIPTION_QUERY_KEYS = {\n all: [\"llm-subscription\"] as const,\n openaiStatus: [\"llm-subscription\", \"openai\", \"status\"] as const,\n openaiModels: [\"llm-subscription\", \"openai\", \"models\"] as const,\n} as const;\n\nexport const LOCAL_WORKSPACES_QUERY_KEYS = {\n all: [\"local-workspaces\"] as const,\n} as const;\n\n/** Cache configuration shared across all config-related queries */\nexport const CONFIG_CACHE_OPTIONS = {\n staleTime: 1000 * 60 * 5, // 5 minutes\n gcTime: 1000 * 60 * 15, // 15 minutes\n} as const;\n\nexport type QueryKeys = (typeof QUERY_KEYS)[keyof typeof QUERY_KEYS];\n"],"mappings":";AAOA,IAAa,IAAa,EAExB,mBAAmB,CAAC,oBAAoB,EACzC,EAEY,IAAsB;CACjC,KAAK,CAAC,WAAW;CACjB,UAAU,MAAyB,CAAC,YAAY,EAAM;CACtD,gBAAgB,CAAC,YAAY,WAAW;CACzC,EAEY,IAA0B,EACrC,KAAK,CAAC,eAAe,EACtB,EAEY,IAA8B;CACzC,KAAK,CAAC,mBAAmB;CACzB,cAAc;EAAC;EAAoB;EAAU;EAAS;CACtD,cAAc;EAAC;EAAoB;EAAU;EAAS;CACvD,EAEY,IAA8B,EACzC,KAAK,CAAC,mBAAmB,EAC1B,EAGY,IAAuB;CAClC,WAAW,MAAO,KAAK;CACvB,QAAQ,MAAO,KAAK;CACrB"}
1
+ {"version":3,"file":"query-keys.js","names":[],"sources":["../../../src/hooks/query/query-keys.ts"],"sourcesContent":["/**\n * Centralized query keys and cache configuration for TanStack Query.\n * Using constants ensures type safety and prevents typos.\n */\n\nimport { SettingsScope } from \"#/types/settings\";\n\nexport const QUERY_KEYS = {\n /** Web client configuration from the server */\n WEB_CLIENT_CONFIG: [\"web-client-config\"] as const,\n} as const;\n\nexport const SETTINGS_QUERY_KEYS = {\n all: [\"settings\"] as const,\n byScope: (scope: SettingsScope) => [\"settings\", scope] as const,\n personal: () => [\"settings\", \"personal\"] as const,\n} as const;\n\nexport const LLM_PROFILES_QUERY_KEYS = {\n all: [\"llm-profiles\"] as const,\n} as const;\n\nexport const AGENT_PROFILES_QUERY_KEYS = {\n all: [\"agent-profiles\"] as const,\n} as const;\n\n/**\n * Shared retry policy for every `/api/agent-profiles` fetch (the launch path\n * in `useCreateConversation`, `redirectIfAcpActive`'s route guard, and\n * `useAgentProfiles`). An older backend without the surface fails every one\n * of these on every call — `retry: false` degrades immediately instead of\n * sitting through the default exponential backoff each time (#1571 review).\n */\nexport const AGENT_PROFILES_RETRY_OPTIONS = {\n retry: false,\n} as const;\n\nexport const LLM_SUBSCRIPTION_QUERY_KEYS = {\n all: [\"llm-subscription\"] as const,\n openaiStatus: [\"llm-subscription\", \"openai\", \"status\"] as const,\n openaiModels: [\"llm-subscription\", \"openai\", \"models\"] as const,\n} as const;\n\nexport const LOCAL_WORKSPACES_QUERY_KEYS = {\n all: [\"local-workspaces\"] as const,\n} as const;\n\nexport const PLUGINS_QUERY_KEYS = {\n /** Dynamic marketplace catalog (used by `use-plugins-marketplace`). */\n marketplace: [\"plugins-marketplace\"] as const,\n /** Installed plugins from the local agent-server. */\n installed: [\"plugins-installed\"] as const,\n /** Locally-discovered ambient plugins (used by `use-local-plugins`). */\n local: [\"plugins-local\"] as const,\n} as const;\n\n/** Cache configuration shared across all config-related queries */\nexport const CONFIG_CACHE_OPTIONS = {\n staleTime: 1000 * 60 * 5, // 5 minutes\n gcTime: 1000 * 60 * 15, // 15 minutes\n} as const;\n\nexport type QueryKeys = (typeof QUERY_KEYS)[keyof typeof QUERY_KEYS];\n"],"mappings":";AAOA,IAAa,IAAa,EAExB,mBAAmB,CAAC,oBAAoB,EACzC,EAEY,IAAsB;CACjC,KAAK,CAAC,WAAW;CACjB,UAAU,MAAyB,CAAC,YAAY,EAAM;CACtD,gBAAgB,CAAC,YAAY,WAAW;CACzC,EAEY,IAA0B,EACrC,KAAK,CAAC,eAAe,EACtB,EAEY,IAA4B,EACvC,KAAK,CAAC,iBAAiB,EACxB,EASY,IAA+B,EAC1C,OAAO,IACR,EAEY,IAA8B;CACzC,KAAK,CAAC,mBAAmB;CACzB,cAAc;EAAC;EAAoB;EAAU;EAAS;CACtD,cAAc;EAAC;EAAoB;EAAU;EAAS;CACvD,EAEY,IAA8B,EACzC,KAAK,CAAC,mBAAmB,EAC1B,EAEY,IAAqB;CAEhC,aAAa,CAAC,sBAAsB;CAEpC,WAAW,CAAC,oBAAoB;CAEhC,OAAO,CAAC,gBAAgB;CACzB,EAGY,IAAuB;CAClC,WAAW,MAAO,KAAK;CACvB,QAAQ,MAAO,KAAK;CACrB"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../use-conversation-id.cjs`),t=require(`./use-user-conversation.cjs`),n=require(`../../api/conversation-service/conversation-service.api.cjs`);let r=require(`react`);var i=()=>{let{conversationId:i}=e.useOptionalConversationId(),a=!!i&&i.startsWith(`task-`),o=t.useUserConversation(!i||a?null:i,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`)?3e3:3e4});return(0,r.useEffect)(()=>{let e=o.data;n.default.setCurrentConversation(e||null)},[i,o.isFetched,o?.data?.execution_status]),o};exports.useActiveConversation=i;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../utils/status.cjs`),t=require(`../use-conversation-id.cjs`),n=require(`./use-user-conversation.cjs`),r=require(`../../api/conversation-service/conversation-service.api.cjs`);let i=require(`react`);var a=()=>{let{conversationId:a}=t.useOptionalConversationId(),o=!!a&&a.startsWith(`task-`),s=n.useUserConversation(!a||o?null:a,t=>{let n=t.state.data;return n&&(!n.conversation_url||n.sandbox_status===`PAUSED`||!n.title&&e.isExecutionActive(n.execution_status))?3e3:3e4});return(0,i.useEffect)(()=>{let e=s.data;r.default.setCurrentConversation(e||null)},[a,s.isFetched,s?.data?.execution_status]),s};exports.useActiveConversation=a;
2
2
  //# sourceMappingURL=use-active-conversation.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-active-conversation.cjs","names":[],"sources":["../../../src/hooks/query/use-active-conversation.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserConversation } from \"./use-user-conversation\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\n\nexport const useActiveConversation = () => {\n // Optional: the chat input renders on the home page too (no conversation\n // route yet). The user-conversation query is gated on a real id below.\n const { conversationId } = useOptionalConversationId();\n\n // Task polling is handled by useTaskPolling hook\n const isTaskId = !!conversationId && conversationId.startsWith(\"task-\");\n const actualConversationId =\n !conversationId || isTaskId ? null : conversationId;\n\n const userConversation = useUserConversation(\n actualConversationId,\n // Poll at 3 s while the sandbox URL is absent OR while the sandbox is\n // PAUSED. A paused sandbox still carries the old conversation_url (it isn't\n // cleared), so checking only for a missing URL would leave us on the slow\n // 30 s interval while the sandbox is waking up after a resume call.\n (query) => {\n const data = query.state.data;\n if (\n data &&\n (!data.conversation_url || data.sandbox_status === \"PAUSED\")\n ) {\n return 3000;\n }\n return 30000;\n },\n );\n\n useEffect(() => {\n const conversation = userConversation.data;\n ConversationService.setCurrentConversation(conversation || null);\n }, [\n conversationId,\n userConversation.isFetched,\n userConversation?.data?.execution_status,\n ]);\n return userConversation;\n};\n"],"mappings":"uOAKA,IAAa,MAA8B,CAGzC,GAAM,CAAE,kBAAmB,EAAA,2BAA2B,CAGhD,EAAW,CAAC,CAAC,GAAkB,EAAe,WAAW,QAAQ,CAIjE,EAAmB,EAAA,oBAFvB,CAAC,GAAkB,EAAW,KAAO,EAQpC,GAAU,CACT,IAAM,EAAO,EAAM,MAAM,KAOzB,OALE,IACC,CAAC,EAAK,kBAAoB,EAAK,iBAAmB,UAE5C,IAEF,KAEV,CAUD,OARA,EAAA,EAAA,eAAgB,CACd,IAAM,EAAe,EAAiB,KACtC,EAAA,QAAoB,uBAAuB,GAAgB,KAAK,EAC/D,CACD,EACA,EAAiB,UACjB,GAAkB,MAAM,iBACzB,CAAC,CACK"}
1
+ {"version":3,"file":"use-active-conversation.cjs","names":[],"sources":["../../../src/hooks/query/use-active-conversation.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserConversation } from \"./use-user-conversation\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport { isExecutionActive } from \"#/utils/status\";\n\nexport const useActiveConversation = () => {\n // Optional: the chat input renders on the home page too (no conversation\n // route yet). The user-conversation query is gated on a real id below.\n const { conversationId } = useOptionalConversationId();\n\n // Task polling is handled by useTaskPolling hook\n const isTaskId = !!conversationId && conversationId.startsWith(\"task-\");\n const actualConversationId =\n !conversationId || isTaskId ? null : conversationId;\n\n const userConversation = useUserConversation(\n actualConversationId,\n // Fast-poll (3 s) while: the sandbox URL is absent; the sandbox is PAUSED\n // (it keeps the stale conversation_url, so a missing-URL check alone misses\n // the wake-up); or the agent is executing but has no title yet (the title\n // lands asynchronously after conversation_url is already set).\n (query) => {\n const data = query.state.data;\n if (\n data &&\n (!data.conversation_url ||\n data.sandbox_status === \"PAUSED\" ||\n (!data.title && isExecutionActive(data.execution_status)))\n ) {\n return 3000;\n }\n return 30000;\n },\n );\n\n useEffect(() => {\n const conversation = userConversation.data;\n ConversationService.setCurrentConversation(conversation || null);\n }, [\n conversationId,\n userConversation.isFetched,\n userConversation?.data?.execution_status,\n ]);\n return userConversation;\n};\n"],"mappings":"2QAMA,IAAa,MAA8B,CAGzC,GAAM,CAAE,kBAAmB,EAAA,2BAA2B,CAGhD,EAAW,CAAC,CAAC,GAAkB,EAAe,WAAW,QAAQ,CAIjE,EAAmB,EAAA,oBAFvB,CAAC,GAAkB,EAAW,KAAO,EAQpC,GAAU,CACT,IAAM,EAAO,EAAM,MAAM,KASzB,OAPE,IACC,CAAC,EAAK,kBACL,EAAK,iBAAmB,UACvB,CAAC,EAAK,OAAS,EAAA,kBAAkB,EAAK,iBAAiB,EAEnD,IAEF,KAEV,CAUD,OARA,EAAA,EAAA,eAAgB,CACd,IAAM,EAAe,EAAiB,KACtC,EAAA,QAAoB,uBAAuB,GAAgB,KAAK,EAC/D,CACD,EACA,EAAiB,UACjB,GAAkB,MAAM,iBACzB,CAAC,CACK"}
@@ -1,23 +1,24 @@
1
- import { useOptionalConversationId as e } from "../use-conversation-id.js";
2
- import { useUserConversation as t } from "./use-user-conversation.js";
3
- import n from "../../api/conversation-service/conversation-service.api.js";
4
- import { useEffect as r } from "react";
1
+ import { isExecutionActive as e } from "../../utils/status.js";
2
+ import { useOptionalConversationId as t } from "../use-conversation-id.js";
3
+ import { useUserConversation as n } from "./use-user-conversation.js";
4
+ import r from "../../api/conversation-service/conversation-service.api.js";
5
+ import { useEffect as i } from "react";
5
6
  //#region src/hooks/query/use-active-conversation.ts
6
- var i = () => {
7
- let { conversationId: i } = e(), a = !!i && i.startsWith("task-"), o = t(!i || a ? null : i, (e) => {
8
- let t = e.state.data;
9
- return t && (!t.conversation_url || t.sandbox_status === "PAUSED") ? 3e3 : 3e4;
7
+ var a = () => {
8
+ let { conversationId: a } = t(), o = !!a && a.startsWith("task-"), s = n(!a || o ? null : a, (t) => {
9
+ let n = t.state.data;
10
+ return n && (!n.conversation_url || n.sandbox_status === "PAUSED" || !n.title && e(n.execution_status)) ? 3e3 : 3e4;
10
11
  });
11
- return r(() => {
12
- let e = o.data;
13
- n.setCurrentConversation(e || null);
12
+ return i(() => {
13
+ let e = s.data;
14
+ r.setCurrentConversation(e || null);
14
15
  }, [
15
- i,
16
- o.isFetched,
17
- o?.data?.execution_status
18
- ]), o;
16
+ a,
17
+ s.isFetched,
18
+ s?.data?.execution_status
19
+ ]), s;
19
20
  };
20
21
  //#endregion
21
- export { i as useActiveConversation };
22
+ export { a as useActiveConversation };
22
23
 
23
24
  //# sourceMappingURL=use-active-conversation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-active-conversation.js","names":[],"sources":["../../../src/hooks/query/use-active-conversation.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserConversation } from \"./use-user-conversation\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\n\nexport const useActiveConversation = () => {\n // Optional: the chat input renders on the home page too (no conversation\n // route yet). The user-conversation query is gated on a real id below.\n const { conversationId } = useOptionalConversationId();\n\n // Task polling is handled by useTaskPolling hook\n const isTaskId = !!conversationId && conversationId.startsWith(\"task-\");\n const actualConversationId =\n !conversationId || isTaskId ? null : conversationId;\n\n const userConversation = useUserConversation(\n actualConversationId,\n // Poll at 3 s while the sandbox URL is absent OR while the sandbox is\n // PAUSED. A paused sandbox still carries the old conversation_url (it isn't\n // cleared), so checking only for a missing URL would leave us on the slow\n // 30 s interval while the sandbox is waking up after a resume call.\n (query) => {\n const data = query.state.data;\n if (\n data &&\n (!data.conversation_url || data.sandbox_status === \"PAUSED\")\n ) {\n return 3000;\n }\n return 30000;\n },\n );\n\n useEffect(() => {\n const conversation = userConversation.data;\n ConversationService.setCurrentConversation(conversation || null);\n }, [\n conversationId,\n userConversation.isFetched,\n userConversation?.data?.execution_status,\n ]);\n return userConversation;\n};\n"],"mappings":";;;;;AAKA,IAAa,UAA8B;CAGzC,IAAM,EAAE,sBAAmB,GAA2B,EAGhD,IAAW,CAAC,CAAC,KAAkB,EAAe,WAAW,QAAQ,EAIjE,IAAmB,EAFvB,CAAC,KAAkB,IAAW,OAAO,IAQpC,MAAU;EACT,IAAM,IAAO,EAAM,MAAM;AAOzB,SALE,MACC,CAAC,EAAK,oBAAoB,EAAK,mBAAmB,YAE5C,MAEF;GAEV;AAUD,QARA,QAAgB;EACd,IAAM,IAAe,EAAiB;AACtC,IAAoB,uBAAuB,KAAgB,KAAK;IAC/D;EACD;EACA,EAAiB;EACjB,GAAkB,MAAM;EACzB,CAAC,EACK"}
1
+ {"version":3,"file":"use-active-conversation.js","names":[],"sources":["../../../src/hooks/query/use-active-conversation.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useUserConversation } from \"./use-user-conversation\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport { isExecutionActive } from \"#/utils/status\";\n\nexport const useActiveConversation = () => {\n // Optional: the chat input renders on the home page too (no conversation\n // route yet). The user-conversation query is gated on a real id below.\n const { conversationId } = useOptionalConversationId();\n\n // Task polling is handled by useTaskPolling hook\n const isTaskId = !!conversationId && conversationId.startsWith(\"task-\");\n const actualConversationId =\n !conversationId || isTaskId ? null : conversationId;\n\n const userConversation = useUserConversation(\n actualConversationId,\n // Fast-poll (3 s) while: the sandbox URL is absent; the sandbox is PAUSED\n // (it keeps the stale conversation_url, so a missing-URL check alone misses\n // the wake-up); or the agent is executing but has no title yet (the title\n // lands asynchronously after conversation_url is already set).\n (query) => {\n const data = query.state.data;\n if (\n data &&\n (!data.conversation_url ||\n data.sandbox_status === \"PAUSED\" ||\n (!data.title && isExecutionActive(data.execution_status)))\n ) {\n return 3000;\n }\n return 30000;\n },\n );\n\n useEffect(() => {\n const conversation = userConversation.data;\n ConversationService.setCurrentConversation(conversation || null);\n }, [\n conversationId,\n userConversation.isFetched,\n userConversation?.data?.execution_status,\n ]);\n return userConversation;\n};\n"],"mappings":";;;;;;AAMA,IAAa,UAA8B;CAGzC,IAAM,EAAE,sBAAmB,GAA2B,EAGhD,IAAW,CAAC,CAAC,KAAkB,EAAe,WAAW,QAAQ,EAIjE,IAAmB,EAFvB,CAAC,KAAkB,IAAW,OAAO,IAQpC,MAAU;EACT,IAAM,IAAO,EAAM,MAAM;AASzB,SAPE,MACC,CAAC,EAAK,oBACL,EAAK,mBAAmB,YACvB,CAAC,EAAK,SAAS,EAAkB,EAAK,iBAAiB,IAEnD,MAEF;GAEV;AAUD,QARA,QAAgB;EACd,IAAM,IAAe,EAAiB;AACtC,IAAoB,uBAAuB,KAAgB,KAAK;IAC/D;EACD;EACA,EAAiB;EACjB,GAAkB,MAAM;EACzB,CAAC,EACK"}
@@ -0,0 +1,2 @@
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./query-keys.cjs`),t=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),n=require(`../../contexts/active-backend-context.cjs`),r=require(`../../api/agent-profiles-service/agent-profiles-service.api.cjs`);function i(i={}){let{backend:a,orgId:o}=n.useActiveBackend();return t.useQuery({queryKey:[...e.AGENT_PROFILES_QUERY_KEYS.all,a.id,o],queryFn:r.default.listProfiles,...e.CONFIG_CACHE_OPTIONS,...e.AGENT_PROFILES_RETRY_OPTIONS,enabled:i.enabled??!0,meta:{disableToast:!0}})}exports.useAgentProfiles=i;
2
+ //# sourceMappingURL=use-agent-profiles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-agent-profiles.cjs","names":[],"sources":["../../../src/hooks/query/use-agent-profiles.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentProfilesService from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n CONFIG_CACHE_OPTIONS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"./query-keys\";\n\nexport { AGENT_PROFILES_QUERY_KEYS };\n\ninterface UseAgentProfilesOptions {\n enabled?: boolean;\n}\n\n/**\n * List the user's AgentProfiles (Settings → Agent profiles library). On first\n * GET of an empty store the backend lazily seeds one default profile mirroring\n * the user's prior config (#3719), so the list is never empty for an upgrading\n * user. Works on both local and cloud backends — `AgentProfilesService` routes\n * cloud calls through the cloud proxy (OpenHands #15060).\n */\nexport function useAgentProfiles(options: UseAgentProfilesOptions = {}) {\n const { backend, orgId } = useActiveBackend();\n\n return useQuery({\n // Backend identity isolates the cache across backend/org switches.\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...CONFIG_CACHE_OPTIONS,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n enabled: options.enabled ?? true,\n meta: { disableToast: true },\n });\n}\n"],"mappings":"wSAsBA,SAAgB,EAAiB,EAAmC,EAAE,CAAE,CACtE,GAAM,CAAE,UAAS,SAAU,EAAA,kBAAkB,CAE7C,OAAO,EAAA,SAAS,CAEd,SAAU,CAAC,GAAG,EAAA,0BAA0B,IAAK,EAAQ,GAAI,EAAM,CAC/D,QAAS,EAAA,QAAqB,aAC9B,GAAG,EAAA,qBACH,GAAG,EAAA,6BACH,QAAS,EAAQ,SAAW,GAC5B,KAAM,CAAE,aAAc,GAAM,CAC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { AGENT_PROFILES_QUERY_KEYS } from "./query-keys";
2
+ export { AGENT_PROFILES_QUERY_KEYS };
3
+ interface UseAgentProfilesOptions {
4
+ enabled?: boolean;
5
+ }
6
+ /**
7
+ * List the user's AgentProfiles (Settings → Agent profiles library). On first
8
+ * GET of an empty store the backend lazily seeds one default profile mirroring
9
+ * the user's prior config (#3719), so the list is never empty for an upgrading
10
+ * user. Works on both local and cloud backends — `AgentProfilesService` routes
11
+ * cloud calls through the cloud proxy (OpenHands #15060).
12
+ */
13
+ export declare function useAgentProfiles(options?: UseAgentProfilesOptions): import("@tanstack/react-query").UseQueryResult<import("@openhands/typescript-client").AgentProfileListResponse, import("axios").AxiosError<unknown, any>>;
@@ -0,0 +1,24 @@
1
+ import { AGENT_PROFILES_QUERY_KEYS as e, AGENT_PROFILES_RETRY_OPTIONS as t, CONFIG_CACHE_OPTIONS as n } from "./query-keys.js";
2
+ import { useQuery as r } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
3
+ import { useActiveBackend as i } from "../../contexts/active-backend-context.js";
4
+ import a from "../../api/agent-profiles-service/agent-profiles-service.api.js";
5
+ //#region src/hooks/query/use-agent-profiles.ts
6
+ function o(o = {}) {
7
+ let { backend: s, orgId: c } = i();
8
+ return r({
9
+ queryKey: [
10
+ ...e.all,
11
+ s.id,
12
+ c
13
+ ],
14
+ queryFn: a.listProfiles,
15
+ ...n,
16
+ ...t,
17
+ enabled: o.enabled ?? !0,
18
+ meta: { disableToast: !0 }
19
+ });
20
+ }
21
+ //#endregion
22
+ export { o as useAgentProfiles };
23
+
24
+ //# sourceMappingURL=use-agent-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-agent-profiles.js","names":[],"sources":["../../../src/hooks/query/use-agent-profiles.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentProfilesService from \"#/api/agent-profiles-service/agent-profiles-service.api\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n CONFIG_CACHE_OPTIONS,\n AGENT_PROFILES_QUERY_KEYS,\n AGENT_PROFILES_RETRY_OPTIONS,\n} from \"./query-keys\";\n\nexport { AGENT_PROFILES_QUERY_KEYS };\n\ninterface UseAgentProfilesOptions {\n enabled?: boolean;\n}\n\n/**\n * List the user's AgentProfiles (Settings → Agent profiles library). On first\n * GET of an empty store the backend lazily seeds one default profile mirroring\n * the user's prior config (#3719), so the list is never empty for an upgrading\n * user. Works on both local and cloud backends — `AgentProfilesService` routes\n * cloud calls through the cloud proxy (OpenHands #15060).\n */\nexport function useAgentProfiles(options: UseAgentProfilesOptions = {}) {\n const { backend, orgId } = useActiveBackend();\n\n return useQuery({\n // Backend identity isolates the cache across backend/org switches.\n queryKey: [...AGENT_PROFILES_QUERY_KEYS.all, backend.id, orgId],\n queryFn: AgentProfilesService.listProfiles,\n ...CONFIG_CACHE_OPTIONS,\n ...AGENT_PROFILES_RETRY_OPTIONS,\n enabled: options.enabled ?? true,\n meta: { disableToast: true },\n });\n}\n"],"mappings":";;;;;AAsBA,SAAgB,EAAiB,IAAmC,EAAE,EAAE;CACtE,IAAM,EAAE,YAAS,aAAU,GAAkB;AAE7C,QAAO,EAAS;EAEd,UAAU;GAAC,GAAG,EAA0B;GAAK,EAAQ;GAAI;GAAM;EAC/D,SAAS,EAAqB;EAC9B,GAAG;EACH,GAAG;EACH,SAAS,EAAQ,WAAW;EAC5B,MAAM,EAAE,cAAc,IAAM;EAC7B,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../node_modules/@openhands/typescript-client/dist/client/server-client.cjs`),n=require(`../../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs`),r=require(`../../api/agent-server-client-options.cjs`),i=require(`../../api/agent-server-compatibility.cjs`),a=require(`../../utils/user-facing-error.cjs`),o=require(`../../api/backend-registry/health-store.cjs`),s=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),c=require(`../../node_modules/axios/lib/axios.cjs`),l=require(`../../api/cloud/organization-service.api.cjs`);let u=require(`react`);u=e.__toESM(u,1);var d=1e4,f=4e3,p=`Invalid API key`,m=`API key required`,h=`Cloud API key or network issue`,g=`Logged out`;function _(e){return e===p}function v(e){return e===m}function y(e){return e===h}function b(e){return e.kind===`cloud`&&!e.apiKey.trim()}function x(e){return e===g}async function S(e){if(e.kind===`cloud`){if(!e.apiKey?.trim())throw Error(m);try{await l.getCurrentCloudApiKey(e)}catch(e){throw c.default.isAxiosError(e)&&e.response?.status===401?Error(g):a.isCorsOrNetworkError(e)?Error(h):e}return!0}try{let a=r.getAgentServerClientOptions({host:e.host,sessionApiKey:e.apiKey||null,timeout:f});await new n.SettingsClient(a).getSettings(),i.assertAgentServerVersionIsSupported(await new t.ServerClient(a).getServerInfo())}catch(e){throw i.isSdkHttpStatusError(e,401)?Error(p):e}return!0}function C(e,t={}){let{probeDisabledOnce:n=!1}=t,r=u.default.useSyncExternalStore(o.subscribeBackendHealth,o.getHealthSnapshot,o.getHealthSnapshot),i=s.useQueries({queries:e.map(e=>{let t=r[e.id],i=b(e),s=t?.disabled===!0,c=s&&e.kind===`cloud`&&a.isCorsOrNetworkErrorMessage(t?.lastError),l=!i&&(!s||n||c);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await S(e);return o.recordBackendSuccess(e.id),t}catch(t){throw o.recordBackendFailure(e.id,t),t}},enabled:l,refetchInterval:s||i?!1:d,refetchIntervalInBackground:!1,refetchOnMount:s&&n?`always`:!0,refetchOnReconnect:!s&&!i,refetchOnWindowFocus:!s&&!i,retry:!1,staleTime:s?0:d,meta:{disableToast:!0}}})}),c={};return e.forEach((e,t)=>{let n=i[t],a=r[e.id],o=b(e),s=o?!1:a?.disabled===!0,l=o?0:a?.consecutiveFailures??0,u=o?m:a?.lastError??null,d;d=o||s?!1:n.isSuccess?!0:n.isError?!1:null,c[e.id]={isConnected:d,consecutiveFailures:l,lastError:u,disabled:s}}),c}exports.isCloudBackendApiKeyOrNetworkHealthError=y,exports.isCloudBackendLoggedOutHealthError=x,exports.isInvalidBackendApiKeyHealthError=_,exports.isMissingBackendApiKeyHealthError=v,exports.useBackendsHealth=C;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../node_modules/@openhands/typescript-client/dist/client/server-client.cjs`),n=require(`../../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const r=require(`../../api/agent-server-client-options.cjs`),i=require(`../../api/agent-server-compatibility.cjs`),a=require(`../../utils/user-facing-error.cjs`),o=require(`../../api/backend-registry/health-store.cjs`),s=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),c=require(`../../node_modules/axios/lib/axios.cjs`),l=require(`../../api/cloud/organization-service.api.cjs`);let u=require(`react`);u=e.__toESM(u,1);var d=1e4,f=4e3,p=`Invalid API key`,m=`API key required`,h=`Cloud API key or network issue`,g=`Logged out`;function _(e){return e===p}function v(e){return e===m}function y(e){return e===h}function b(e){return e.kind===`cloud`&&!e.apiKey.trim()}function x(e){return e===g}async function S(e){if(e.kind===`cloud`){if(!e.apiKey?.trim())throw Error(m);try{await l.getCurrentCloudApiKey(e)}catch(e){throw c.default.isAxiosError(e)&&e.response?.status===401?Error(g):a.isCorsOrNetworkError(e)?Error(h):e}return!0}try{let a=r.getAgentServerClientOptions({host:e.host,sessionApiKey:e.apiKey||null,timeout:f});await new n.SettingsClient(a).getSettings(),i.assertAgentServerVersionIsSupported(await new t.ServerClient(a).getServerInfo())}catch(e){throw i.isSdkHttpStatusError(e,401)?Error(p):e}return!0}var C=2,w=300;function T(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function E(e){for(let t=0;;t+=1)try{return await S(e)}catch(e){if(t>=C||!T(e))throw e;await new Promise(e=>{setTimeout(e,w)})}}function D(e,t={}){let{probeDisabledOnce:n=!1}=t,r=u.default.useSyncExternalStore(o.subscribeBackendHealth,o.getHealthSnapshot,o.getHealthSnapshot),i=s.useQueries({queries:e.map(e=>{let t=r[e.id],i=b(e),s=t?.disabled===!0,c=s&&e.kind===`cloud`&&a.isCorsOrNetworkErrorMessage(t?.lastError),l=!i&&(!s||n||c);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await E(e);return o.recordBackendSuccess(e.id),t}catch(t){throw o.recordBackendFailure(e.id,t),t}},enabled:l,refetchInterval:s||i?!1:d,refetchIntervalInBackground:!1,refetchOnMount:s&&n?`always`:!0,refetchOnReconnect:!s&&!i,refetchOnWindowFocus:!s&&!i,retry:!1,staleTime:s?0:d,meta:{disableToast:!0}}})}),c={};return e.forEach((e,t)=>{let n=i[t],a=r[e.id],o=b(e),s=o?!1:a?.disabled===!0,l=o?0:a?.consecutiveFailures??0,u=o?m:a?.lastError??null,d;d=o||s?!1:n.isSuccess?!0:n.isError?!1:null,c[e.id]={isConnected:d,consecutiveFailures:l,lastError:u,disabled:s}}),c}exports.isCloudBackendApiKeyOrNetworkHealthError=y,exports.isCloudBackendLoggedOutHealthError=x,exports.isInvalidBackendApiKeyHealthError=_,exports.isMissingBackendApiKeyHealthError=v,exports.useBackendsHealth=D;
2
2
  //# sourceMappingURL=use-backends-health.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-backends-health.cjs","names":[],"sources":["../../../src/hooks/query/use-backends-health.ts"],"sourcesContent":["import React from \"react\";\nimport axios from \"axios\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport { getCurrentCloudApiKey } from \"#/api/cloud/organization-service.api\";\nimport {\n assertAgentServerVersionIsSupported,\n isSdkHttpStatusError,\n} from \"#/api/agent-server-compatibility\";\nimport type { Backend } from \"#/api/backend-registry/types\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport {\n isCorsOrNetworkError,\n isCorsOrNetworkErrorMessage,\n} from \"#/utils/user-facing-error\";\nimport {\n getHealthSnapshot,\n recordBackendFailure,\n recordBackendSuccess,\n subscribeBackendHealth,\n} from \"#/api/backend-registry/health-store\";\nimport { MAX_CONSECUTIVE_FAILURES } from \"#/api/backend-registry/health-storage\";\n\nconst REFRESH_INTERVAL_MS = 10000;\nconst PROBE_TIMEOUT_MS = 4000;\nexport const INVALID_BACKEND_API_KEY_ERROR = \"Invalid API key\";\nexport const MISSING_BACKEND_API_KEY_ERROR = \"API key required\";\nexport const CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR =\n \"Cloud API key or network issue\";\nexport const CLOUD_BACKEND_LOGGED_OUT_ERROR = \"Logged out\";\n\nexport function isInvalidBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === INVALID_BACKEND_API_KEY_ERROR;\n}\n\nexport function isMissingBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === MISSING_BACKEND_API_KEY_ERROR;\n}\n\nexport function isCloudBackendApiKeyOrNetworkHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR;\n}\n\nfunction hasMissingBackendApiKey(backend: Backend): boolean {\n return backend.kind === \"cloud\" && !backend.apiKey.trim();\n}\n\nexport function isCloudBackendLoggedOutHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_LOGGED_OUT_ERROR;\n}\n\n/**\n * Probe a single backend for connectivity. The probe path differs by\n * backend kind:\n *\n * - Local agent-server: GET `/api/settings`, then `/server_info` via the\n * typescript-client. The settings call validates the configured session\n * API key; the server info call validates the version compatibility floor.\n * - Cloud: GET `/api/keys/current` directly against the cloud host. That\n * endpoint is lightweight, requires auth, and `getCurrentCloudApiKey`\n * already absorbs the legacy-key 400 fallback so we treat that as\n * \"connected\" too. Missing / rejected keys are reported explicitly instead\n * of falling through to the browser's opaque CORS/network error shape.\n *\n * Throws on failure so React Query marks the query as errored — the\n * dropdown reads `isSuccess` to flip the indicator green.\n */\nasync function probeBackend(backend: Backend): Promise<true> {\n if (backend.kind === \"cloud\") {\n if (!backend.apiKey?.trim()) {\n throw new Error(MISSING_BACKEND_API_KEY_ERROR);\n }\n\n try {\n await getCurrentCloudApiKey(backend);\n } catch (error) {\n if (axios.isAxiosError(error) && error.response?.status === 401) {\n throw new Error(CLOUD_BACKEND_LOGGED_OUT_ERROR);\n }\n if (isCorsOrNetworkError(error)) {\n throw new Error(CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR);\n }\n throw error;\n }\n return true;\n }\n\n try {\n const clientOptions = getAgentServerClientOptions({\n host: backend.host,\n sessionApiKey: backend.apiKey || null,\n timeout: PROBE_TIMEOUT_MS,\n });\n\n await new SettingsClient(clientOptions).getSettings();\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n assertAgentServerVersionIsSupported(serverInfo);\n } catch (error) {\n if (isSdkHttpStatusError(error, 401)) {\n throw new Error(INVALID_BACKEND_API_KEY_ERROR);\n }\n throw error;\n }\n return true;\n}\n\nexport interface BackendHealth {\n /** `null` while the first probe is in flight; then `true` / `false`. */\n isConnected: boolean | null;\n /** Number of consecutive failed probes since the last success. */\n consecutiveFailures: number;\n /** Last error message captured from a failed probe, if any. */\n lastError: string | null;\n /**\n * `true` once `consecutiveFailures` reaches the cap. While disabled,\n * ordinary background polling stops and survives a page refresh in\n * that state.\n */\n disabled: boolean;\n}\n\nexport interface UseBackendsHealthOptions {\n /**\n * Re-probe disabled backends once when the hook mounts. Used by the\n * Manage Backends modal so a recovered backend can clear its stale\n * persisted error state without forcing the user to edit the config.\n */\n probeDisabledOnce?: boolean;\n}\n\n/**\n * Poll every backend in `backends` once every 10s and report a simple\n * connected / disconnected verdict per backend id.\n *\n * The query key includes `host` and `apiKey` so editing a backend's\n * connection details re-keys the query and triggers an immediate\n * refetch instead of waiting for the next tick.\n *\n * After `MAX_CONSECUTIVE_FAILURES` failures in a row, ordinary polling\n * stops for that backend until the user updates its host / apiKey.\n * Callers can still opt into a one-shot recheck for disabled backends\n * (for example when the user explicitly opens Manage Backends). The\n * failure count and last error live in localStorage so a page refresh\n * does not silently re-arm polling against a backend that's known to\n * be unreachable.\n */\nexport function useBackendsHealth(\n backends: Backend[],\n options: UseBackendsHealthOptions = {},\n): Record<string, BackendHealth> {\n const { probeDisabledOnce = false } = options;\n const healthMap = React.useSyncExternalStore(\n subscribeBackendHealth,\n getHealthSnapshot,\n getHealthSnapshot,\n );\n\n const results = useQueries({\n queries: backends.map((b) => {\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const isDisabled = entry?.disabled === true;\n const shouldReprobeStaleCloudNetworkError =\n isDisabled &&\n b.kind === \"cloud\" &&\n isCorsOrNetworkErrorMessage(entry?.lastError);\n const shouldProbe =\n !hasMissingCloudApiKey &&\n (!isDisabled ||\n probeDisabledOnce ||\n shouldReprobeStaleCloudNetworkError);\n return {\n queryKey: [\n \"backend-health\",\n b.id,\n b.kind,\n b.host,\n b.apiKey ?? \"\",\n ] as const,\n queryFn: async () => {\n try {\n const result = await probeBackend(b);\n recordBackendSuccess(b.id);\n return result;\n } catch (err) {\n recordBackendFailure(b.id, err);\n throw err;\n }\n },\n enabled: shouldProbe,\n refetchInterval:\n isDisabled || hasMissingCloudApiKey\n ? (false as const)\n : REFRESH_INTERVAL_MS,\n refetchIntervalInBackground: false,\n refetchOnMount: isDisabled && probeDisabledOnce ? \"always\" : true,\n refetchOnReconnect: !isDisabled && !hasMissingCloudApiKey,\n refetchOnWindowFocus: !isDisabled && !hasMissingCloudApiKey,\n retry: false,\n // Keep the previous verdict visible while the next probe is in\n // flight so the indicator doesn't flicker on routine polling.\n staleTime: isDisabled ? 0 : REFRESH_INTERVAL_MS,\n meta: { disableToast: true },\n };\n }),\n });\n\n const out: Record<string, BackendHealth> = {};\n backends.forEach((b, i) => {\n const r = results[i];\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const disabled = hasMissingCloudApiKey ? false : entry?.disabled === true;\n const consecutiveFailures = hasMissingCloudApiKey\n ? 0\n : (entry?.consecutiveFailures ?? 0);\n const lastError = hasMissingCloudApiKey\n ? MISSING_BACKEND_API_KEY_ERROR\n : (entry?.lastError ?? null);\n\n let isConnected: boolean | null;\n if (hasMissingCloudApiKey) {\n isConnected = false;\n } else if (disabled) {\n // Polling stopped after hitting the cap — treat as disconnected\n // so existing consumers (dot, badge) render red without needing\n // to know about the new fields.\n isConnected = false;\n } else if (r.isSuccess) isConnected = true;\n else if (r.isError) isConnected = false;\n else isConnected = null;\n\n out[b.id] = { isConnected, consecutiveFailures, lastError, disabled };\n });\n return out;\n}\n\nexport { MAX_CONSECUTIVE_FAILURES };\n"],"mappings":"6qBA0BA,IAAM,EAAsB,IACtB,EAAmB,IACZ,EAAgC,kBAChC,EAAgC,mBAChC,EACX,iCACW,EAAiC,aAE9C,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAS,EAAwB,EAA2B,CAC1D,OAAO,EAAQ,OAAS,SAAW,CAAC,EAAQ,OAAO,MAAM,CAG3D,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAmBnB,eAAe,EAAa,EAAiC,CAC3D,GAAI,EAAQ,OAAS,QAAS,CAC5B,GAAI,CAAC,EAAQ,QAAQ,MAAM,CACzB,MAAU,MAAM,EAA8B,CAGhD,GAAI,CACF,MAAM,EAAA,sBAAsB,EAAQ,OAC7B,EAAO,CAOd,MANI,EAAA,QAAM,aAAa,EAAM,EAAI,EAAM,UAAU,SAAW,IAChD,MAAM,EAA+B,CAE7C,EAAA,qBAAqB,EAAM,CACnB,MAAM,EAAuC,CAEnD,EAER,MAAO,GAGT,GAAI,CACF,IAAM,EAAgB,EAAA,4BAA4B,CAChD,KAAM,EAAQ,KACd,cAAe,EAAQ,QAAU,KACjC,QAAS,EACV,CAAC,CAEF,MAAM,IAAI,EAAA,eAAe,EAAc,CAAC,aAAa,CAErD,EAAA,oCAAoC,MADX,IAAI,EAAA,aAAa,EAAc,CAAC,eAAe,CACzB,OACxC,EAAO,CAId,MAHI,EAAA,qBAAqB,EAAO,IAAI,CACxB,MAAM,EAA8B,CAE1C,EAER,MAAO,GA2CT,SAAgB,EACd,EACA,EAAoC,EAAE,CACP,CAC/B,GAAM,CAAE,oBAAoB,IAAU,EAChC,EAAY,EAAA,QAAM,qBACtB,EAAA,uBACA,EAAA,kBACA,EAAA,kBACD,CAEK,EAAU,EAAA,WAAW,CACzB,QAAS,EAAS,IAAK,GAAM,CAC3B,IAAM,EAAQ,EAAU,EAAE,IACpB,EAAwB,EAAwB,EAAE,CAClD,EAAa,GAAO,WAAa,GACjC,EACJ,GACA,EAAE,OAAS,SACX,EAAA,4BAA4B,GAAO,UAAU,CACzC,EACJ,CAAC,IACA,CAAC,GACA,GACA,GACJ,MAAO,CACL,SAAU,CACR,iBACA,EAAE,GACF,EAAE,KACF,EAAE,KACF,EAAE,QAAU,GACb,CACD,QAAS,SAAY,CACnB,GAAI,CACF,IAAM,EAAS,MAAM,EAAa,EAAE,CAEpC,OADA,EAAA,qBAAqB,EAAE,GAAG,CACnB,QACA,EAAK,CAEZ,MADA,EAAA,qBAAqB,EAAE,GAAI,EAAI,CACzB,IAGV,QAAS,EACT,gBACE,GAAc,EACT,GACD,EACN,4BAA6B,GAC7B,eAAgB,GAAc,EAAoB,SAAW,GAC7D,mBAAoB,CAAC,GAAc,CAAC,EACpC,qBAAsB,CAAC,GAAc,CAAC,EACtC,MAAO,GAGP,UAAW,EAAa,EAAI,EAC5B,KAAM,CAAE,aAAc,GAAM,CAC7B,EACD,CACH,CAAC,CAEI,EAAqC,EAAE,CA2B7C,OA1BA,EAAS,SAAS,EAAG,IAAM,CACzB,IAAM,EAAI,EAAQ,GACZ,EAAQ,EAAU,EAAE,IACpB,EAAwB,EAAwB,EAAE,CAClD,EAAW,EAAwB,GAAQ,GAAO,WAAa,GAC/D,EAAsB,EACxB,EACC,GAAO,qBAAuB,EAC7B,EAAY,EACd,EACC,GAAO,WAAa,KAErB,EACJ,AASK,EATD,GAEO,EADK,GAML,EAAE,UAAyB,GAC7B,EAAE,QAAuB,GACf,KAEnB,EAAI,EAAE,IAAM,CAAE,cAAa,sBAAqB,YAAW,WAAU,EACrE,CACK"}
1
+ {"version":3,"file":"use-backends-health.cjs","names":[],"sources":["../../../src/hooks/query/use-backends-health.ts"],"sourcesContent":["import React from \"react\";\nimport axios from \"axios\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport { getCurrentCloudApiKey } from \"#/api/cloud/organization-service.api\";\nimport {\n assertAgentServerVersionIsSupported,\n isSdkHttpStatusError,\n} from \"#/api/agent-server-compatibility\";\nimport type { Backend } from \"#/api/backend-registry/types\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport {\n isCorsOrNetworkError,\n isCorsOrNetworkErrorMessage,\n} from \"#/utils/user-facing-error\";\nimport {\n getHealthSnapshot,\n recordBackendFailure,\n recordBackendSuccess,\n subscribeBackendHealth,\n} from \"#/api/backend-registry/health-store\";\nimport { MAX_CONSECUTIVE_FAILURES } from \"#/api/backend-registry/health-storage\";\n\nconst REFRESH_INTERVAL_MS = 10000;\nconst PROBE_TIMEOUT_MS = 4000;\nexport const INVALID_BACKEND_API_KEY_ERROR = \"Invalid API key\";\nexport const MISSING_BACKEND_API_KEY_ERROR = \"API key required\";\nexport const CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR =\n \"Cloud API key or network issue\";\nexport const CLOUD_BACKEND_LOGGED_OUT_ERROR = \"Logged out\";\n\nexport function isInvalidBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === INVALID_BACKEND_API_KEY_ERROR;\n}\n\nexport function isMissingBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === MISSING_BACKEND_API_KEY_ERROR;\n}\n\nexport function isCloudBackendApiKeyOrNetworkHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR;\n}\n\nfunction hasMissingBackendApiKey(backend: Backend): boolean {\n return backend.kind === \"cloud\" && !backend.apiKey.trim();\n}\n\nexport function isCloudBackendLoggedOutHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_LOGGED_OUT_ERROR;\n}\n\n/**\n * Probe a single backend for connectivity. The probe path differs by\n * backend kind:\n *\n * - Local agent-server: GET `/api/settings`, then `/server_info` via the\n * typescript-client. The settings call validates the configured session\n * API key; the server info call validates the version compatibility floor.\n * - Cloud: GET `/api/keys/current` directly against the cloud host. That\n * endpoint is lightweight, requires auth, and `getCurrentCloudApiKey`\n * already absorbs the legacy-key 400 fallback so we treat that as\n * \"connected\" too. Missing / rejected keys are reported explicitly instead\n * of falling through to the browser's opaque CORS/network error shape.\n *\n * Throws on failure so React Query marks the query as errored — the\n * dropdown reads `isSuccess` to flip the indicator green.\n */\nasync function probeBackend(backend: Backend): Promise<true> {\n if (backend.kind === \"cloud\") {\n if (!backend.apiKey?.trim()) {\n throw new Error(MISSING_BACKEND_API_KEY_ERROR);\n }\n\n try {\n await getCurrentCloudApiKey(backend);\n } catch (error) {\n if (axios.isAxiosError(error) && error.response?.status === 401) {\n throw new Error(CLOUD_BACKEND_LOGGED_OUT_ERROR);\n }\n if (isCorsOrNetworkError(error)) {\n throw new Error(CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR);\n }\n throw error;\n }\n return true;\n }\n\n try {\n const clientOptions = getAgentServerClientOptions({\n host: backend.host,\n sessionApiKey: backend.apiKey || null,\n timeout: PROBE_TIMEOUT_MS,\n });\n\n await new SettingsClient(clientOptions).getSettings();\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n assertAgentServerVersionIsSupported(serverInfo);\n } catch (error) {\n if (isSdkHttpStatusError(error, 401)) {\n throw new Error(INVALID_BACKEND_API_KEY_ERROR);\n }\n throw error;\n }\n return true;\n}\n\n/**\n * How many extra times to re-run a failed probe before giving up, and how\n * long to wait between attempts.\n */\nconst PROBE_RETRY_ATTEMPTS = 2;\nconst PROBE_RETRY_DELAY_MS = 300;\n\n/**\n * Probe a backend, retrying a couple of times on failure before giving up.\n *\n * The connectivity indicator (and the onboarding \"backend connected\" banner)\n * only flips green once a probe succeeds. With `retry: false` at the query\n * level and a REFRESH_INTERVAL_MS (10s) poll, a single transient first-probe\n * miss — the agent-server still warming up right after navigation, a momentary\n * proxy 5xx, a dropped connection — would otherwise leave the banner stuck for\n * a full 10s until the next scheduled refetch. That is the root cause of the\n * flaky onboarding e2e \"backend health probe should report connected\" timeout.\n *\n * Retrying here, inside the query function rather than via React Query's\n * `retry`, is deliberate: the success/failure recording below runs once per\n * settled query, so a single logical probe still records exactly one outcome.\n * Retrying at the query level instead would call `recordBackendFailure` on\n * every internal attempt and reach the disabled cap several times too fast.\n *\n * Definitive auth failures (logged out, invalid/missing key) are NOT retried:\n * they are a decided server response, not a transient miss, so retrying only\n * delays surfacing the correct \"disconnected\" state (and the recovery UI).\n */\nfunction isRetryableProbeError(error: unknown): boolean {\n if (!(error instanceof Error)) return true;\n return (\n error.message !== INVALID_BACKEND_API_KEY_ERROR &&\n error.message !== MISSING_BACKEND_API_KEY_ERROR &&\n error.message !== CLOUD_BACKEND_LOGGED_OUT_ERROR\n );\n}\n\nasync function probeBackendWithQuickRetry(backend: Backend): Promise<true> {\n for (let attempt = 0; ; attempt += 1) {\n try {\n return await probeBackend(backend);\n } catch (error) {\n if (attempt >= PROBE_RETRY_ATTEMPTS || !isRetryableProbeError(error)) {\n throw error;\n }\n await new Promise((resolve) => {\n setTimeout(resolve, PROBE_RETRY_DELAY_MS);\n });\n }\n }\n}\n\nexport interface BackendHealth {\n /** `null` while the first probe is in flight; then `true` / `false`. */\n isConnected: boolean | null;\n /** Number of consecutive failed probes since the last success. */\n consecutiveFailures: number;\n /** Last error message captured from a failed probe, if any. */\n lastError: string | null;\n /**\n * `true` once `consecutiveFailures` reaches the cap. While disabled,\n * ordinary background polling stops and survives a page refresh in\n * that state.\n */\n disabled: boolean;\n}\n\nexport interface UseBackendsHealthOptions {\n /**\n * Re-probe disabled backends once when the hook mounts. Used by the\n * Manage Backends modal so a recovered backend can clear its stale\n * persisted error state without forcing the user to edit the config.\n */\n probeDisabledOnce?: boolean;\n}\n\n/**\n * Poll every backend in `backends` once every 10s and report a simple\n * connected / disconnected verdict per backend id.\n *\n * The query key includes `host` and `apiKey` so editing a backend's\n * connection details re-keys the query and triggers an immediate\n * refetch instead of waiting for the next tick.\n *\n * After `MAX_CONSECUTIVE_FAILURES` failures in a row, ordinary polling\n * stops for that backend until the user updates its host / apiKey.\n * Callers can still opt into a one-shot recheck for disabled backends\n * (for example when the user explicitly opens Manage Backends). The\n * failure count and last error live in localStorage so a page refresh\n * does not silently re-arm polling against a backend that's known to\n * be unreachable.\n */\nexport function useBackendsHealth(\n backends: Backend[],\n options: UseBackendsHealthOptions = {},\n): Record<string, BackendHealth> {\n const { probeDisabledOnce = false } = options;\n const healthMap = React.useSyncExternalStore(\n subscribeBackendHealth,\n getHealthSnapshot,\n getHealthSnapshot,\n );\n\n const results = useQueries({\n queries: backends.map((b) => {\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const isDisabled = entry?.disabled === true;\n const shouldReprobeStaleCloudNetworkError =\n isDisabled &&\n b.kind === \"cloud\" &&\n isCorsOrNetworkErrorMessage(entry?.lastError);\n const shouldProbe =\n !hasMissingCloudApiKey &&\n (!isDisabled ||\n probeDisabledOnce ||\n shouldReprobeStaleCloudNetworkError);\n return {\n queryKey: [\n \"backend-health\",\n b.id,\n b.kind,\n b.host,\n b.apiKey ?? \"\",\n ] as const,\n queryFn: async () => {\n try {\n const result = await probeBackendWithQuickRetry(b);\n recordBackendSuccess(b.id);\n return result;\n } catch (err) {\n recordBackendFailure(b.id, err);\n throw err;\n }\n },\n enabled: shouldProbe,\n refetchInterval:\n isDisabled || hasMissingCloudApiKey\n ? (false as const)\n : REFRESH_INTERVAL_MS,\n refetchIntervalInBackground: false,\n refetchOnMount: isDisabled && probeDisabledOnce ? \"always\" : true,\n refetchOnReconnect: !isDisabled && !hasMissingCloudApiKey,\n refetchOnWindowFocus: !isDisabled && !hasMissingCloudApiKey,\n retry: false,\n // Keep the previous verdict visible while the next probe is in\n // flight so the indicator doesn't flicker on routine polling.\n staleTime: isDisabled ? 0 : REFRESH_INTERVAL_MS,\n meta: { disableToast: true },\n };\n }),\n });\n\n const out: Record<string, BackendHealth> = {};\n backends.forEach((b, i) => {\n const r = results[i];\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const disabled = hasMissingCloudApiKey ? false : entry?.disabled === true;\n const consecutiveFailures = hasMissingCloudApiKey\n ? 0\n : (entry?.consecutiveFailures ?? 0);\n const lastError = hasMissingCloudApiKey\n ? MISSING_BACKEND_API_KEY_ERROR\n : (entry?.lastError ?? null);\n\n let isConnected: boolean | null;\n if (hasMissingCloudApiKey) {\n isConnected = false;\n } else if (disabled) {\n // Polling stopped after hitting the cap — treat as disconnected\n // so existing consumers (dot, badge) render red without needing\n // to know about the new fields.\n isConnected = false;\n } else if (r.isSuccess) isConnected = true;\n else if (r.isError) isConnected = false;\n else isConnected = null;\n\n out[b.id] = { isConnected, consecutiveFailures, lastError, disabled };\n });\n return out;\n}\n\nexport { MAX_CONSECUTIVE_FAILURES };\n"],"mappings":"+vBA0BA,IAAM,EAAsB,IACtB,EAAmB,IACZ,EAAgC,kBAChC,EAAgC,mBAChC,EACX,iCACW,EAAiC,aAE9C,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAGnB,SAAS,EAAwB,EAA2B,CAC1D,OAAO,EAAQ,OAAS,SAAW,CAAC,EAAQ,OAAO,MAAM,CAG3D,SAAgB,EACd,EACS,CACT,OAAO,IAAU,EAmBnB,eAAe,EAAa,EAAiC,CAC3D,GAAI,EAAQ,OAAS,QAAS,CAC5B,GAAI,CAAC,EAAQ,QAAQ,MAAM,CACzB,MAAU,MAAM,EAA8B,CAGhD,GAAI,CACF,MAAM,EAAA,sBAAsB,EAAQ,OAC7B,EAAO,CAOd,MANI,EAAA,QAAM,aAAa,EAAM,EAAI,EAAM,UAAU,SAAW,IAChD,MAAM,EAA+B,CAE7C,EAAA,qBAAqB,EAAM,CACnB,MAAM,EAAuC,CAEnD,EAER,MAAO,GAGT,GAAI,CACF,IAAM,EAAgB,EAAA,4BAA4B,CAChD,KAAM,EAAQ,KACd,cAAe,EAAQ,QAAU,KACjC,QAAS,EACV,CAAC,CAEF,MAAM,IAAI,EAAA,eAAe,EAAc,CAAC,aAAa,CAErD,EAAA,oCAAoC,MADX,IAAI,EAAA,aAAa,EAAc,CAAC,eAAe,CACzB,OACxC,EAAO,CAId,MAHI,EAAA,qBAAqB,EAAO,IAAI,CACxB,MAAM,EAA8B,CAE1C,EAER,MAAO,GAOT,IAAM,EAAuB,EACvB,EAAuB,IAuB7B,SAAS,EAAsB,EAAyB,CAEtD,OADM,aAAiB,MAErB,EAAM,UAAA,mBACN,EAAM,UAAA,oBACN,EAAM,UAAA,aAJ8B,GAQxC,eAAe,EAA2B,EAAiC,CACzE,IAAK,IAAI,EAAU,GAAK,GAAW,EACjC,GAAI,CACF,OAAO,MAAM,EAAa,EAAQ,OAC3B,EAAO,CACd,GAAI,GAAW,GAAwB,CAAC,EAAsB,EAAM,CAClE,MAAM,EAER,MAAM,IAAI,QAAS,GAAY,CAC7B,WAAW,EAAS,EAAqB,EACzC,EA6CR,SAAgB,EACd,EACA,EAAoC,EAAE,CACP,CAC/B,GAAM,CAAE,oBAAoB,IAAU,EAChC,EAAY,EAAA,QAAM,qBACtB,EAAA,uBACA,EAAA,kBACA,EAAA,kBACD,CAEK,EAAU,EAAA,WAAW,CACzB,QAAS,EAAS,IAAK,GAAM,CAC3B,IAAM,EAAQ,EAAU,EAAE,IACpB,EAAwB,EAAwB,EAAE,CAClD,EAAa,GAAO,WAAa,GACjC,EACJ,GACA,EAAE,OAAS,SACX,EAAA,4BAA4B,GAAO,UAAU,CACzC,EACJ,CAAC,IACA,CAAC,GACA,GACA,GACJ,MAAO,CACL,SAAU,CACR,iBACA,EAAE,GACF,EAAE,KACF,EAAE,KACF,EAAE,QAAU,GACb,CACD,QAAS,SAAY,CACnB,GAAI,CACF,IAAM,EAAS,MAAM,EAA2B,EAAE,CAElD,OADA,EAAA,qBAAqB,EAAE,GAAG,CACnB,QACA,EAAK,CAEZ,MADA,EAAA,qBAAqB,EAAE,GAAI,EAAI,CACzB,IAGV,QAAS,EACT,gBACE,GAAc,EACT,GACD,EACN,4BAA6B,GAC7B,eAAgB,GAAc,EAAoB,SAAW,GAC7D,mBAAoB,CAAC,GAAc,CAAC,EACpC,qBAAsB,CAAC,GAAc,CAAC,EACtC,MAAO,GAGP,UAAW,EAAa,EAAI,EAC5B,KAAM,CAAE,aAAc,GAAM,CAC7B,EACD,CACH,CAAC,CAEI,EAAqC,EAAE,CA2B7C,OA1BA,EAAS,SAAS,EAAG,IAAM,CACzB,IAAM,EAAI,EAAQ,GACZ,EAAQ,EAAU,EAAE,IACpB,EAAwB,EAAwB,EAAE,CAClD,EAAW,EAAwB,GAAQ,GAAO,WAAa,GAC/D,EAAsB,EACxB,EACC,GAAO,qBAAuB,EAC7B,EAAY,EACd,EACC,GAAO,WAAa,KAErB,EACJ,AASK,EATD,GAEO,EADK,GAML,EAAE,UAAyB,GAC7B,EAAE,QAAuB,GACf,KAEnB,EAAI,EAAE,IAAM,CAAE,cAAa,sBAAqB,YAAW,WAAU,EACrE,CACK"}
@@ -1,5 +1,6 @@
1
1
  import { ServerClient as e } from "../../node_modules/@openhands/typescript-client/dist/client/server-client.js";
2
2
  import { SettingsClient as t } from "../../node_modules/@openhands/typescript-client/dist/client/settings-client.js";
3
+ import "../../node_modules/@openhands/typescript-client/dist/clients.js";
3
4
  import { getAgentServerClientOptions as n } from "../../api/agent-server-client-options.js";
4
5
  import { assertAgentServerVersionIsSupported as r, isSdkHttpStatusError as i } from "../../api/agent-server-compatibility.js";
5
6
  import { isCorsOrNetworkError as a, isCorsOrNetworkErrorMessage as o } from "../../utils/user-facing-error.js";
@@ -47,7 +48,21 @@ async function E(o) {
47
48
  }
48
49
  return !0;
49
50
  }
50
- function D(e, t = {}) {
51
+ var D = 2, O = 300;
52
+ function k(e) {
53
+ return e instanceof Error ? e.message !== "Invalid API key" && e.message !== "API key required" && e.message !== "Logged out" : !0;
54
+ }
55
+ async function A(e) {
56
+ for (let t = 0;; t += 1) try {
57
+ return await E(e);
58
+ } catch (e) {
59
+ if (t >= D || !k(e)) throw e;
60
+ await new Promise((e) => {
61
+ setTimeout(e, O);
62
+ });
63
+ }
64
+ }
65
+ function j(e, t = {}) {
51
66
  let { probeDisabledOnce: n = !1 } = t, r = m.useSyncExternalStore(u, s, s), i = d({ queries: e.map((e) => {
52
67
  let t = r[e.id], i = w(e), a = t?.disabled === !0, s = a && e.kind === "cloud" && o(t?.lastError), u = !i && (!a || n || s);
53
68
  return {
@@ -60,7 +75,7 @@ function D(e, t = {}) {
60
75
  ],
61
76
  queryFn: async () => {
62
77
  try {
63
- let t = await E(e);
78
+ let t = await A(e);
64
79
  return l(e.id), t;
65
80
  } catch (t) {
66
81
  throw c(e.id, t), t;
@@ -88,6 +103,6 @@ function D(e, t = {}) {
88
103
  }), a;
89
104
  }
90
105
  //#endregion
91
- export { C as isCloudBackendApiKeyOrNetworkHealthError, T as isCloudBackendLoggedOutHealthError, x as isInvalidBackendApiKeyHealthError, S as isMissingBackendApiKeyHealthError, D as useBackendsHealth };
106
+ export { C as isCloudBackendApiKeyOrNetworkHealthError, T as isCloudBackendLoggedOutHealthError, x as isInvalidBackendApiKeyHealthError, S as isMissingBackendApiKeyHealthError, j as useBackendsHealth };
92
107
 
93
108
  //# sourceMappingURL=use-backends-health.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-backends-health.js","names":[],"sources":["../../../src/hooks/query/use-backends-health.ts"],"sourcesContent":["import React from \"react\";\nimport axios from \"axios\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport { getCurrentCloudApiKey } from \"#/api/cloud/organization-service.api\";\nimport {\n assertAgentServerVersionIsSupported,\n isSdkHttpStatusError,\n} from \"#/api/agent-server-compatibility\";\nimport type { Backend } from \"#/api/backend-registry/types\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport {\n isCorsOrNetworkError,\n isCorsOrNetworkErrorMessage,\n} from \"#/utils/user-facing-error\";\nimport {\n getHealthSnapshot,\n recordBackendFailure,\n recordBackendSuccess,\n subscribeBackendHealth,\n} from \"#/api/backend-registry/health-store\";\nimport { MAX_CONSECUTIVE_FAILURES } from \"#/api/backend-registry/health-storage\";\n\nconst REFRESH_INTERVAL_MS = 10000;\nconst PROBE_TIMEOUT_MS = 4000;\nexport const INVALID_BACKEND_API_KEY_ERROR = \"Invalid API key\";\nexport const MISSING_BACKEND_API_KEY_ERROR = \"API key required\";\nexport const CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR =\n \"Cloud API key or network issue\";\nexport const CLOUD_BACKEND_LOGGED_OUT_ERROR = \"Logged out\";\n\nexport function isInvalidBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === INVALID_BACKEND_API_KEY_ERROR;\n}\n\nexport function isMissingBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === MISSING_BACKEND_API_KEY_ERROR;\n}\n\nexport function isCloudBackendApiKeyOrNetworkHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR;\n}\n\nfunction hasMissingBackendApiKey(backend: Backend): boolean {\n return backend.kind === \"cloud\" && !backend.apiKey.trim();\n}\n\nexport function isCloudBackendLoggedOutHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_LOGGED_OUT_ERROR;\n}\n\n/**\n * Probe a single backend for connectivity. The probe path differs by\n * backend kind:\n *\n * - Local agent-server: GET `/api/settings`, then `/server_info` via the\n * typescript-client. The settings call validates the configured session\n * API key; the server info call validates the version compatibility floor.\n * - Cloud: GET `/api/keys/current` directly against the cloud host. That\n * endpoint is lightweight, requires auth, and `getCurrentCloudApiKey`\n * already absorbs the legacy-key 400 fallback so we treat that as\n * \"connected\" too. Missing / rejected keys are reported explicitly instead\n * of falling through to the browser's opaque CORS/network error shape.\n *\n * Throws on failure so React Query marks the query as errored — the\n * dropdown reads `isSuccess` to flip the indicator green.\n */\nasync function probeBackend(backend: Backend): Promise<true> {\n if (backend.kind === \"cloud\") {\n if (!backend.apiKey?.trim()) {\n throw new Error(MISSING_BACKEND_API_KEY_ERROR);\n }\n\n try {\n await getCurrentCloudApiKey(backend);\n } catch (error) {\n if (axios.isAxiosError(error) && error.response?.status === 401) {\n throw new Error(CLOUD_BACKEND_LOGGED_OUT_ERROR);\n }\n if (isCorsOrNetworkError(error)) {\n throw new Error(CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR);\n }\n throw error;\n }\n return true;\n }\n\n try {\n const clientOptions = getAgentServerClientOptions({\n host: backend.host,\n sessionApiKey: backend.apiKey || null,\n timeout: PROBE_TIMEOUT_MS,\n });\n\n await new SettingsClient(clientOptions).getSettings();\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n assertAgentServerVersionIsSupported(serverInfo);\n } catch (error) {\n if (isSdkHttpStatusError(error, 401)) {\n throw new Error(INVALID_BACKEND_API_KEY_ERROR);\n }\n throw error;\n }\n return true;\n}\n\nexport interface BackendHealth {\n /** `null` while the first probe is in flight; then `true` / `false`. */\n isConnected: boolean | null;\n /** Number of consecutive failed probes since the last success. */\n consecutiveFailures: number;\n /** Last error message captured from a failed probe, if any. */\n lastError: string | null;\n /**\n * `true` once `consecutiveFailures` reaches the cap. While disabled,\n * ordinary background polling stops and survives a page refresh in\n * that state.\n */\n disabled: boolean;\n}\n\nexport interface UseBackendsHealthOptions {\n /**\n * Re-probe disabled backends once when the hook mounts. Used by the\n * Manage Backends modal so a recovered backend can clear its stale\n * persisted error state without forcing the user to edit the config.\n */\n probeDisabledOnce?: boolean;\n}\n\n/**\n * Poll every backend in `backends` once every 10s and report a simple\n * connected / disconnected verdict per backend id.\n *\n * The query key includes `host` and `apiKey` so editing a backend's\n * connection details re-keys the query and triggers an immediate\n * refetch instead of waiting for the next tick.\n *\n * After `MAX_CONSECUTIVE_FAILURES` failures in a row, ordinary polling\n * stops for that backend until the user updates its host / apiKey.\n * Callers can still opt into a one-shot recheck for disabled backends\n * (for example when the user explicitly opens Manage Backends). The\n * failure count and last error live in localStorage so a page refresh\n * does not silently re-arm polling against a backend that's known to\n * be unreachable.\n */\nexport function useBackendsHealth(\n backends: Backend[],\n options: UseBackendsHealthOptions = {},\n): Record<string, BackendHealth> {\n const { probeDisabledOnce = false } = options;\n const healthMap = React.useSyncExternalStore(\n subscribeBackendHealth,\n getHealthSnapshot,\n getHealthSnapshot,\n );\n\n const results = useQueries({\n queries: backends.map((b) => {\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const isDisabled = entry?.disabled === true;\n const shouldReprobeStaleCloudNetworkError =\n isDisabled &&\n b.kind === \"cloud\" &&\n isCorsOrNetworkErrorMessage(entry?.lastError);\n const shouldProbe =\n !hasMissingCloudApiKey &&\n (!isDisabled ||\n probeDisabledOnce ||\n shouldReprobeStaleCloudNetworkError);\n return {\n queryKey: [\n \"backend-health\",\n b.id,\n b.kind,\n b.host,\n b.apiKey ?? \"\",\n ] as const,\n queryFn: async () => {\n try {\n const result = await probeBackend(b);\n recordBackendSuccess(b.id);\n return result;\n } catch (err) {\n recordBackendFailure(b.id, err);\n throw err;\n }\n },\n enabled: shouldProbe,\n refetchInterval:\n isDisabled || hasMissingCloudApiKey\n ? (false as const)\n : REFRESH_INTERVAL_MS,\n refetchIntervalInBackground: false,\n refetchOnMount: isDisabled && probeDisabledOnce ? \"always\" : true,\n refetchOnReconnect: !isDisabled && !hasMissingCloudApiKey,\n refetchOnWindowFocus: !isDisabled && !hasMissingCloudApiKey,\n retry: false,\n // Keep the previous verdict visible while the next probe is in\n // flight so the indicator doesn't flicker on routine polling.\n staleTime: isDisabled ? 0 : REFRESH_INTERVAL_MS,\n meta: { disableToast: true },\n };\n }),\n });\n\n const out: Record<string, BackendHealth> = {};\n backends.forEach((b, i) => {\n const r = results[i];\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const disabled = hasMissingCloudApiKey ? false : entry?.disabled === true;\n const consecutiveFailures = hasMissingCloudApiKey\n ? 0\n : (entry?.consecutiveFailures ?? 0);\n const lastError = hasMissingCloudApiKey\n ? MISSING_BACKEND_API_KEY_ERROR\n : (entry?.lastError ?? null);\n\n let isConnected: boolean | null;\n if (hasMissingCloudApiKey) {\n isConnected = false;\n } else if (disabled) {\n // Polling stopped after hitting the cap — treat as disconnected\n // so existing consumers (dot, badge) render red without needing\n // to know about the new fields.\n isConnected = false;\n } else if (r.isSuccess) isConnected = true;\n else if (r.isError) isConnected = false;\n else isConnected = null;\n\n out[b.id] = { isConnected, consecutiveFailures, lastError, disabled };\n });\n return out;\n}\n\nexport { MAX_CONSECUTIVE_FAILURES };\n"],"mappings":";;;;;;;;;;;AA0BA,IAAM,IAAsB,KACtB,IAAmB,KACZ,IAAgC,mBAChC,IAAgC,oBAChC,IACX,kCACW,IAAiC;AAE9C,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAS,EAAwB,GAA2B;AAC1D,QAAO,EAAQ,SAAS,WAAW,CAAC,EAAQ,OAAO,MAAM;;AAG3D,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAmBnB,eAAe,EAAa,GAAiC;AAC3D,KAAI,EAAQ,SAAS,SAAS;AAC5B,MAAI,CAAC,EAAQ,QAAQ,MAAM,CACzB,OAAU,MAAM,EAA8B;AAGhD,MAAI;AACF,SAAM,EAAsB,EAAQ;WAC7B,GAAO;AAOd,SANI,EAAM,aAAa,EAAM,IAAI,EAAM,UAAU,WAAW,MAChD,MAAM,EAA+B,GAE7C,EAAqB,EAAM,GACnB,MAAM,EAAuC,GAEnD;;AAER,SAAO;;AAGT,KAAI;EACF,IAAM,IAAgB,EAA4B;GAChD,MAAM,EAAQ;GACd,eAAe,EAAQ,UAAU;GACjC,SAAS;GACV,CAAC;AAIF,EAFA,MAAM,IAAI,EAAe,EAAc,CAAC,aAAa,EAErD,EAAoC,MADX,IAAI,EAAa,EAAc,CAAC,eAAe,CACzB;UACxC,GAAO;AAId,QAHI,EAAqB,GAAO,IAAI,GACxB,MAAM,EAA8B,GAE1C;;AAER,QAAO;;AA2CT,SAAgB,EACd,GACA,IAAoC,EAAE,EACP;CAC/B,IAAM,EAAE,uBAAoB,OAAU,GAChC,IAAY,EAAM,qBACtB,GACA,GACA,EACD,EAEK,IAAU,EAAW,EACzB,SAAS,EAAS,KAAK,MAAM;EAC3B,IAAM,IAAQ,EAAU,EAAE,KACpB,IAAwB,EAAwB,EAAE,EAClD,IAAa,GAAO,aAAa,IACjC,IACJ,KACA,EAAE,SAAS,WACX,EAA4B,GAAO,UAAU,EACzC,IACJ,CAAC,MACA,CAAC,KACA,KACA;AACJ,SAAO;GACL,UAAU;IACR;IACA,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE,UAAU;IACb;GACD,SAAS,YAAY;AACnB,QAAI;KACF,IAAM,IAAS,MAAM,EAAa,EAAE;AAEpC,YADA,EAAqB,EAAE,GAAG,EACnB;aACA,GAAK;AAEZ,WADA,EAAqB,EAAE,IAAI,EAAI,EACzB;;;GAGV,SAAS;GACT,iBACE,KAAc,IACT,KACD;GACN,6BAA6B;GAC7B,gBAAgB,KAAc,IAAoB,WAAW;GAC7D,oBAAoB,CAAC,KAAc,CAAC;GACpC,sBAAsB,CAAC,KAAc,CAAC;GACtC,OAAO;GAGP,WAAW,IAAa,IAAI;GAC5B,MAAM,EAAE,cAAc,IAAM;GAC7B;GACD,EACH,CAAC,EAEI,IAAqC,EAAE;AA2B7C,QA1BA,EAAS,SAAS,GAAG,MAAM;EACzB,IAAM,IAAI,EAAQ,IACZ,IAAQ,EAAU,EAAE,KACpB,IAAwB,EAAwB,EAAE,EAClD,IAAW,IAAwB,KAAQ,GAAO,aAAa,IAC/D,IAAsB,IACxB,IACC,GAAO,uBAAuB,GAC7B,IAAY,IACd,IACC,GAAO,aAAa,MAErB;AAYJ,EAXA,AASK,IATD,KAEO,IADK,KAML,EAAE,YAAyB,KAC7B,EAAE,UAAuB,KACf,MAEnB,EAAI,EAAE,MAAM;GAAE;GAAa;GAAqB;GAAW;GAAU;GACrE,EACK"}
1
+ {"version":3,"file":"use-backends-health.js","names":[],"sources":["../../../src/hooks/query/use-backends-health.ts"],"sourcesContent":["import React from \"react\";\nimport axios from \"axios\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport { getCurrentCloudApiKey } from \"#/api/cloud/organization-service.api\";\nimport {\n assertAgentServerVersionIsSupported,\n isSdkHttpStatusError,\n} from \"#/api/agent-server-compatibility\";\nimport type { Backend } from \"#/api/backend-registry/types\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport {\n isCorsOrNetworkError,\n isCorsOrNetworkErrorMessage,\n} from \"#/utils/user-facing-error\";\nimport {\n getHealthSnapshot,\n recordBackendFailure,\n recordBackendSuccess,\n subscribeBackendHealth,\n} from \"#/api/backend-registry/health-store\";\nimport { MAX_CONSECUTIVE_FAILURES } from \"#/api/backend-registry/health-storage\";\n\nconst REFRESH_INTERVAL_MS = 10000;\nconst PROBE_TIMEOUT_MS = 4000;\nexport const INVALID_BACKEND_API_KEY_ERROR = \"Invalid API key\";\nexport const MISSING_BACKEND_API_KEY_ERROR = \"API key required\";\nexport const CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR =\n \"Cloud API key or network issue\";\nexport const CLOUD_BACKEND_LOGGED_OUT_ERROR = \"Logged out\";\n\nexport function isInvalidBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === INVALID_BACKEND_API_KEY_ERROR;\n}\n\nexport function isMissingBackendApiKeyHealthError(\n error: string | null | undefined,\n): boolean {\n return error === MISSING_BACKEND_API_KEY_ERROR;\n}\n\nexport function isCloudBackendApiKeyOrNetworkHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR;\n}\n\nfunction hasMissingBackendApiKey(backend: Backend): boolean {\n return backend.kind === \"cloud\" && !backend.apiKey.trim();\n}\n\nexport function isCloudBackendLoggedOutHealthError(\n error: string | null | undefined,\n): boolean {\n return error === CLOUD_BACKEND_LOGGED_OUT_ERROR;\n}\n\n/**\n * Probe a single backend for connectivity. The probe path differs by\n * backend kind:\n *\n * - Local agent-server: GET `/api/settings`, then `/server_info` via the\n * typescript-client. The settings call validates the configured session\n * API key; the server info call validates the version compatibility floor.\n * - Cloud: GET `/api/keys/current` directly against the cloud host. That\n * endpoint is lightweight, requires auth, and `getCurrentCloudApiKey`\n * already absorbs the legacy-key 400 fallback so we treat that as\n * \"connected\" too. Missing / rejected keys are reported explicitly instead\n * of falling through to the browser's opaque CORS/network error shape.\n *\n * Throws on failure so React Query marks the query as errored — the\n * dropdown reads `isSuccess` to flip the indicator green.\n */\nasync function probeBackend(backend: Backend): Promise<true> {\n if (backend.kind === \"cloud\") {\n if (!backend.apiKey?.trim()) {\n throw new Error(MISSING_BACKEND_API_KEY_ERROR);\n }\n\n try {\n await getCurrentCloudApiKey(backend);\n } catch (error) {\n if (axios.isAxiosError(error) && error.response?.status === 401) {\n throw new Error(CLOUD_BACKEND_LOGGED_OUT_ERROR);\n }\n if (isCorsOrNetworkError(error)) {\n throw new Error(CLOUD_BACKEND_API_KEY_OR_NETWORK_ERROR);\n }\n throw error;\n }\n return true;\n }\n\n try {\n const clientOptions = getAgentServerClientOptions({\n host: backend.host,\n sessionApiKey: backend.apiKey || null,\n timeout: PROBE_TIMEOUT_MS,\n });\n\n await new SettingsClient(clientOptions).getSettings();\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n assertAgentServerVersionIsSupported(serverInfo);\n } catch (error) {\n if (isSdkHttpStatusError(error, 401)) {\n throw new Error(INVALID_BACKEND_API_KEY_ERROR);\n }\n throw error;\n }\n return true;\n}\n\n/**\n * How many extra times to re-run a failed probe before giving up, and how\n * long to wait between attempts.\n */\nconst PROBE_RETRY_ATTEMPTS = 2;\nconst PROBE_RETRY_DELAY_MS = 300;\n\n/**\n * Probe a backend, retrying a couple of times on failure before giving up.\n *\n * The connectivity indicator (and the onboarding \"backend connected\" banner)\n * only flips green once a probe succeeds. With `retry: false` at the query\n * level and a REFRESH_INTERVAL_MS (10s) poll, a single transient first-probe\n * miss — the agent-server still warming up right after navigation, a momentary\n * proxy 5xx, a dropped connection — would otherwise leave the banner stuck for\n * a full 10s until the next scheduled refetch. That is the root cause of the\n * flaky onboarding e2e \"backend health probe should report connected\" timeout.\n *\n * Retrying here, inside the query function rather than via React Query's\n * `retry`, is deliberate: the success/failure recording below runs once per\n * settled query, so a single logical probe still records exactly one outcome.\n * Retrying at the query level instead would call `recordBackendFailure` on\n * every internal attempt and reach the disabled cap several times too fast.\n *\n * Definitive auth failures (logged out, invalid/missing key) are NOT retried:\n * they are a decided server response, not a transient miss, so retrying only\n * delays surfacing the correct \"disconnected\" state (and the recovery UI).\n */\nfunction isRetryableProbeError(error: unknown): boolean {\n if (!(error instanceof Error)) return true;\n return (\n error.message !== INVALID_BACKEND_API_KEY_ERROR &&\n error.message !== MISSING_BACKEND_API_KEY_ERROR &&\n error.message !== CLOUD_BACKEND_LOGGED_OUT_ERROR\n );\n}\n\nasync function probeBackendWithQuickRetry(backend: Backend): Promise<true> {\n for (let attempt = 0; ; attempt += 1) {\n try {\n return await probeBackend(backend);\n } catch (error) {\n if (attempt >= PROBE_RETRY_ATTEMPTS || !isRetryableProbeError(error)) {\n throw error;\n }\n await new Promise((resolve) => {\n setTimeout(resolve, PROBE_RETRY_DELAY_MS);\n });\n }\n }\n}\n\nexport interface BackendHealth {\n /** `null` while the first probe is in flight; then `true` / `false`. */\n isConnected: boolean | null;\n /** Number of consecutive failed probes since the last success. */\n consecutiveFailures: number;\n /** Last error message captured from a failed probe, if any. */\n lastError: string | null;\n /**\n * `true` once `consecutiveFailures` reaches the cap. While disabled,\n * ordinary background polling stops and survives a page refresh in\n * that state.\n */\n disabled: boolean;\n}\n\nexport interface UseBackendsHealthOptions {\n /**\n * Re-probe disabled backends once when the hook mounts. Used by the\n * Manage Backends modal so a recovered backend can clear its stale\n * persisted error state without forcing the user to edit the config.\n */\n probeDisabledOnce?: boolean;\n}\n\n/**\n * Poll every backend in `backends` once every 10s and report a simple\n * connected / disconnected verdict per backend id.\n *\n * The query key includes `host` and `apiKey` so editing a backend's\n * connection details re-keys the query and triggers an immediate\n * refetch instead of waiting for the next tick.\n *\n * After `MAX_CONSECUTIVE_FAILURES` failures in a row, ordinary polling\n * stops for that backend until the user updates its host / apiKey.\n * Callers can still opt into a one-shot recheck for disabled backends\n * (for example when the user explicitly opens Manage Backends). The\n * failure count and last error live in localStorage so a page refresh\n * does not silently re-arm polling against a backend that's known to\n * be unreachable.\n */\nexport function useBackendsHealth(\n backends: Backend[],\n options: UseBackendsHealthOptions = {},\n): Record<string, BackendHealth> {\n const { probeDisabledOnce = false } = options;\n const healthMap = React.useSyncExternalStore(\n subscribeBackendHealth,\n getHealthSnapshot,\n getHealthSnapshot,\n );\n\n const results = useQueries({\n queries: backends.map((b) => {\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const isDisabled = entry?.disabled === true;\n const shouldReprobeStaleCloudNetworkError =\n isDisabled &&\n b.kind === \"cloud\" &&\n isCorsOrNetworkErrorMessage(entry?.lastError);\n const shouldProbe =\n !hasMissingCloudApiKey &&\n (!isDisabled ||\n probeDisabledOnce ||\n shouldReprobeStaleCloudNetworkError);\n return {\n queryKey: [\n \"backend-health\",\n b.id,\n b.kind,\n b.host,\n b.apiKey ?? \"\",\n ] as const,\n queryFn: async () => {\n try {\n const result = await probeBackendWithQuickRetry(b);\n recordBackendSuccess(b.id);\n return result;\n } catch (err) {\n recordBackendFailure(b.id, err);\n throw err;\n }\n },\n enabled: shouldProbe,\n refetchInterval:\n isDisabled || hasMissingCloudApiKey\n ? (false as const)\n : REFRESH_INTERVAL_MS,\n refetchIntervalInBackground: false,\n refetchOnMount: isDisabled && probeDisabledOnce ? \"always\" : true,\n refetchOnReconnect: !isDisabled && !hasMissingCloudApiKey,\n refetchOnWindowFocus: !isDisabled && !hasMissingCloudApiKey,\n retry: false,\n // Keep the previous verdict visible while the next probe is in\n // flight so the indicator doesn't flicker on routine polling.\n staleTime: isDisabled ? 0 : REFRESH_INTERVAL_MS,\n meta: { disableToast: true },\n };\n }),\n });\n\n const out: Record<string, BackendHealth> = {};\n backends.forEach((b, i) => {\n const r = results[i];\n const entry = healthMap[b.id];\n const hasMissingCloudApiKey = hasMissingBackendApiKey(b);\n const disabled = hasMissingCloudApiKey ? false : entry?.disabled === true;\n const consecutiveFailures = hasMissingCloudApiKey\n ? 0\n : (entry?.consecutiveFailures ?? 0);\n const lastError = hasMissingCloudApiKey\n ? MISSING_BACKEND_API_KEY_ERROR\n : (entry?.lastError ?? null);\n\n let isConnected: boolean | null;\n if (hasMissingCloudApiKey) {\n isConnected = false;\n } else if (disabled) {\n // Polling stopped after hitting the cap — treat as disconnected\n // so existing consumers (dot, badge) render red without needing\n // to know about the new fields.\n isConnected = false;\n } else if (r.isSuccess) isConnected = true;\n else if (r.isError) isConnected = false;\n else isConnected = null;\n\n out[b.id] = { isConnected, consecutiveFailures, lastError, disabled };\n });\n return out;\n}\n\nexport { MAX_CONSECUTIVE_FAILURES };\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAM,IAAsB,KACtB,IAAmB,KACZ,IAAgC,mBAChC,IAAgC,oBAChC,IACX,kCACW,IAAiC;AAE9C,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAGnB,SAAS,EAAwB,GAA2B;AAC1D,QAAO,EAAQ,SAAS,WAAW,CAAC,EAAQ,OAAO,MAAM;;AAG3D,SAAgB,EACd,GACS;AACT,QAAO,MAAU;;AAmBnB,eAAe,EAAa,GAAiC;AAC3D,KAAI,EAAQ,SAAS,SAAS;AAC5B,MAAI,CAAC,EAAQ,QAAQ,MAAM,CACzB,OAAU,MAAM,EAA8B;AAGhD,MAAI;AACF,SAAM,EAAsB,EAAQ;WAC7B,GAAO;AAOd,SANI,EAAM,aAAa,EAAM,IAAI,EAAM,UAAU,WAAW,MAChD,MAAM,EAA+B,GAE7C,EAAqB,EAAM,GACnB,MAAM,EAAuC,GAEnD;;AAER,SAAO;;AAGT,KAAI;EACF,IAAM,IAAgB,EAA4B;GAChD,MAAM,EAAQ;GACd,eAAe,EAAQ,UAAU;GACjC,SAAS;GACV,CAAC;AAIF,EAFA,MAAM,IAAI,EAAe,EAAc,CAAC,aAAa,EAErD,EAAoC,MADX,IAAI,EAAa,EAAc,CAAC,eAAe,CACzB;UACxC,GAAO;AAId,QAHI,EAAqB,GAAO,IAAI,GACxB,MAAM,EAA8B,GAE1C;;AAER,QAAO;;AAOT,IAAM,IAAuB,GACvB,IAAuB;AAuB7B,SAAS,EAAsB,GAAyB;AAEtD,QADM,aAAiB,QAErB,EAAM,YAAA,qBACN,EAAM,YAAA,sBACN,EAAM,YAAA,eAJ8B;;AAQxC,eAAe,EAA2B,GAAiC;AACzE,MAAK,IAAI,IAAU,IAAK,KAAW,EACjC,KAAI;AACF,SAAO,MAAM,EAAa,EAAQ;UAC3B,GAAO;AACd,MAAI,KAAW,KAAwB,CAAC,EAAsB,EAAM,CAClE,OAAM;AAER,QAAM,IAAI,SAAS,MAAY;AAC7B,cAAW,GAAS,EAAqB;IACzC;;;AA6CR,SAAgB,EACd,GACA,IAAoC,EAAE,EACP;CAC/B,IAAM,EAAE,uBAAoB,OAAU,GAChC,IAAY,EAAM,qBACtB,GACA,GACA,EACD,EAEK,IAAU,EAAW,EACzB,SAAS,EAAS,KAAK,MAAM;EAC3B,IAAM,IAAQ,EAAU,EAAE,KACpB,IAAwB,EAAwB,EAAE,EAClD,IAAa,GAAO,aAAa,IACjC,IACJ,KACA,EAAE,SAAS,WACX,EAA4B,GAAO,UAAU,EACzC,IACJ,CAAC,MACA,CAAC,KACA,KACA;AACJ,SAAO;GACL,UAAU;IACR;IACA,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE,UAAU;IACb;GACD,SAAS,YAAY;AACnB,QAAI;KACF,IAAM,IAAS,MAAM,EAA2B,EAAE;AAElD,YADA,EAAqB,EAAE,GAAG,EACnB;aACA,GAAK;AAEZ,WADA,EAAqB,EAAE,IAAI,EAAI,EACzB;;;GAGV,SAAS;GACT,iBACE,KAAc,IACT,KACD;GACN,6BAA6B;GAC7B,gBAAgB,KAAc,IAAoB,WAAW;GAC7D,oBAAoB,CAAC,KAAc,CAAC;GACpC,sBAAsB,CAAC,KAAc,CAAC;GACtC,OAAO;GAGP,WAAW,IAAa,IAAI;GAC5B,MAAM,EAAE,cAAc,IAAM;GAC7B;GACD,EACH,CAAC,EAEI,IAAqC,EAAE;AA2B7C,QA1BA,EAAS,SAAS,GAAG,MAAM;EACzB,IAAM,IAAI,EAAQ,IACZ,IAAQ,EAAU,EAAE,KACpB,IAAwB,EAAwB,EAAE,EAClD,IAAW,IAAwB,KAAQ,GAAO,aAAa,IAC/D,IAAsB,IACxB,IACC,GAAO,uBAAuB,GAC7B,IAAY,IACd,IACC,GAAO,aAAa,MAErB;AAYJ,EAXA,AASK,IATD,KAEO,IADK,KAML,EAAE,YAAyB,KAC7B,EAAE,UAAuB,KACf,MAEnB,EAAI,EAAE,MAAM;GAAE;GAAa;GAAqB;GAAW;GAAU;GACrE,EACK"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),t=require(`../../api/event-service/event-service.api.cjs`),n=require(`./use-user-conversation.cjs`);var r=r=>{let{data:i}=n.useUserConversation(r??null);return e.useQuery({queryKey:[`conversation-history`,r,i?.conversation_url??null,i?.session_api_key??null],enabled:!!r&&!!i,queryFn:async()=>{if(!r)return{events:[],hasMore:!1,nextPageId:null};let e=await t.default.searchEvents(r,i?.conversation_url??null,i?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`});if(!Array.isArray(e.items))throw Error(`Invalid conversation history response: expected page.items to be an array.`);return{events:[...e.items].reverse(),hasMore:!!e.next_page_id||e.items.length>=50,nextPageId:e.next_page_id??null}},staleTime:1/0,gcTime:1800*1e3})};exports.useConversationHistory=r;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),t=require(`../../api/event-service/event-service.api.cjs`),n=require(`./use-user-conversation.cjs`);var r=r=>{let{data:i}=n.useUserConversation(r??null);return e.useQuery({queryKey:[`conversation-history`,r,i?.conversation_url??null,i?.session_api_key??null],enabled:!!r&&!!i,queryFn:async()=>{if(!r)return{events:[],hasMore:!1,nextPageId:null};let e=await t.default.searchEvents(r,i?.conversation_url??null,i?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`});if(!Array.isArray(e.items))throw Error(`Invalid conversation history response: expected page.items to be an array.`);return{events:[...e.items].reverse(),hasMore:!!e.next_page_id||e.items.length>=50,nextPageId:e.next_page_id??null}},staleTime:0,gcTime:1800*1e3,refetchOnMount:`always`,refetchOnWindowFocus:!1})};exports.useConversationHistory=r;
2
2
  //# sourceMappingURL=use-conversation-history.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-conversation-history.cjs","names":[],"sources":["../../../src/hooks/query/use-conversation-history.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport EventService from \"#/api/event-service/event-service.api\";\nimport { useUserConversation } from \"#/hooks/query/use-user-conversation\";\nimport type { OpenHandsEvent } from \"#/types/agent-server/core\";\n\n/**\n * Number of events to load on the initial REST history fetch and on each\n * subsequent \"scroll-up\" page. The agent server caps `limit` at 100.\n */\nexport const INITIAL_HISTORY_PAGE_SIZE = 50;\n\nexport interface ConversationHistoryPage {\n /** Events in chronological (oldest → newest) order. */\n events: OpenHandsEvent[];\n /** True when the server has more events older than this page. */\n hasMore: boolean;\n /** Optional `next_page_id` from the server for keyset pagination. */\n nextPageId: string | null;\n}\n\n/**\n * Loads the most recent conversation events via REST. The server query is\n * sorted `TIMESTAMP_DESC` so we can request just the tail of the conversation;\n * we reverse the result to chronological order before handing it to callers.\n *\n * Older events are loaded on demand by `useLoadOlderEvents` once the user\n * scrolls up. The WebSocket then connects with `resend_mode='since'` using\n * the latest event's timestamp so we don't re-receive history we already have.\n */\nexport const useConversationHistory = (conversationId?: string) => {\n const { data: conversation } = useUserConversation(conversationId ?? null);\n\n return useQuery<ConversationHistoryPage>({\n queryKey: [\n \"conversation-history\",\n conversationId,\n // Include the conversation's host + key so a backend swap (or a\n // re-provisioned cloud sandbox with a new URL) re-fetches.\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n ],\n enabled: !!conversationId && !!conversation,\n queryFn: async () => {\n if (!conversationId) {\n return { events: [], hasMore: false, nextPageId: null };\n }\n\n const page = await EventService.searchEvents(\n conversationId,\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n {\n limit: INITIAL_HISTORY_PAGE_SIZE,\n sortOrder: \"TIMESTAMP_DESC\",\n },\n );\n\n if (!Array.isArray(page.items)) {\n throw new Error(\n \"Invalid conversation history response: expected page.items to be an array.\",\n );\n }\n\n // Reverse so callers can append in chronological order.\n const events = [...page.items].reverse();\n return {\n events,\n hasMore:\n !!page.next_page_id || page.items.length >= INITIAL_HISTORY_PAGE_SIZE,\n nextPageId: page.next_page_id ?? null,\n };\n },\n staleTime: Infinity,\n gcTime: 30 * 60 * 1000, // 30 minutes — survive navigation away and back (AC5)\n });\n};\n"],"mappings":"0OA6BA,IAAa,EAA0B,GAA4B,CACjE,GAAM,CAAE,KAAM,GAAiB,EAAA,oBAAoB,GAAkB,KAAK,CAE1E,OAAO,EAAA,SAAkC,CACvC,SAAU,CACR,uBACA,EAGA,GAAc,kBAAoB,KAClC,GAAc,iBAAmB,KAClC,CACD,QAAS,CAAC,CAAC,GAAkB,CAAC,CAAC,EAC/B,QAAS,SAAY,CACnB,GAAI,CAAC,EACH,MAAO,CAAE,OAAQ,EAAE,CAAE,QAAS,GAAO,WAAY,KAAM,CAGzD,IAAM,EAAO,MAAM,EAAA,QAAa,aAC9B,EACA,GAAc,kBAAoB,KAClC,GAAc,iBAAmB,KACjC,CACE,MAAA,GACA,UAAW,iBACZ,CACF,CAED,GAAI,CAAC,MAAM,QAAQ,EAAK,MAAM,CAC5B,MAAU,MACR,6EACD,CAKH,MAAO,CACL,OAFa,CAAC,GAAG,EAAK,MAAM,CAAC,SAE7B,CACA,QACE,CAAC,CAAC,EAAK,cAAgB,EAAK,MAAM,QAAA,GACpC,WAAY,EAAK,cAAgB,KAClC,EAEH,UAAW,IACX,OAAQ,KAAU,IACnB,CAAC"}
1
+ {"version":3,"file":"use-conversation-history.cjs","names":[],"sources":["../../../src/hooks/query/use-conversation-history.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport EventService from \"#/api/event-service/event-service.api\";\nimport { useUserConversation } from \"#/hooks/query/use-user-conversation\";\nimport type { OpenHandsEvent } from \"#/types/agent-server/core\";\n\n/**\n * Number of events to load on the initial REST history fetch and on each\n * subsequent \"scroll-up\" page. The agent server caps `limit` at 100.\n */\nexport const INITIAL_HISTORY_PAGE_SIZE = 50;\n\nexport interface ConversationHistoryPage {\n /** Events in chronological (oldest → newest) order. */\n events: OpenHandsEvent[];\n /** True when the server has more events older than this page. */\n hasMore: boolean;\n /** Optional `next_page_id` from the server for keyset pagination. */\n nextPageId: string | null;\n}\n\n/**\n * Loads the most recent conversation events via REST. The server query is\n * sorted `TIMESTAMP_DESC` so we can request just the tail of the conversation;\n * we reverse the result to chronological order before handing it to callers.\n *\n * Older events are loaded on demand by `useLoadOlderEvents` once the user\n * scrolls up. The WebSocket then connects with `resend_mode='since'` using\n * the latest event's timestamp so we don't re-receive history we already have.\n */\nexport const useConversationHistory = (conversationId?: string) => {\n const { data: conversation } = useUserConversation(conversationId ?? null);\n\n return useQuery<ConversationHistoryPage>({\n queryKey: [\n \"conversation-history\",\n conversationId,\n // Include the conversation's host + key so a backend swap (or a\n // re-provisioned cloud sandbox with a new URL) re-fetches.\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n ],\n enabled: !!conversationId && !!conversation,\n queryFn: async () => {\n if (!conversationId) {\n return { events: [], hasMore: false, nextPageId: null };\n }\n\n const page = await EventService.searchEvents(\n conversationId,\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n {\n limit: INITIAL_HISTORY_PAGE_SIZE,\n sortOrder: \"TIMESTAMP_DESC\",\n },\n );\n\n if (!Array.isArray(page.items)) {\n throw new Error(\n \"Invalid conversation history response: expected page.items to be an array.\",\n );\n }\n\n // Reverse so callers can append in chronological order.\n const events = [...page.items].reverse();\n return {\n events,\n hasMore:\n !!page.next_page_id || page.items.length >= INITIAL_HISTORY_PAGE_SIZE,\n nextPageId: page.next_page_id ?? null,\n };\n },\n // Keep the cached page so returning to a conversation renders the\n // last-known discussion instantly (no skeleton). But refetch the tail on\n // mount so events produced while we were away — e.g. an active /goal loop\n // that keeps emitting user + agent turns while we're on another\n // conversation — arrive in one batched REST page instead of being\n // back-filled one event at a time over the WebSocket `since` replay. The\n // cached tail's newest timestamp never advances on its own, so without this\n // refetch every return replays the entire post-first-load history over the\n // socket (and it gets worse the longer the goal has been running).\n //\n // refetchOnWindowFocus is disabled because the WebSocket connection is\n // gated on this query settling (see conversation-websocket-context.tsx); a\n // focus-driven refetch would otherwise needlessly drop and reconnect it.\n staleTime: 0,\n gcTime: 30 * 60 * 1000, // 30 minutes — keep cached data to render instantly on return\n refetchOnMount: \"always\",\n refetchOnWindowFocus: false,\n });\n};\n"],"mappings":"0OA6BA,IAAa,EAA0B,GAA4B,CACjE,GAAM,CAAE,KAAM,GAAiB,EAAA,oBAAoB,GAAkB,KAAK,CAE1E,OAAO,EAAA,SAAkC,CACvC,SAAU,CACR,uBACA,EAGA,GAAc,kBAAoB,KAClC,GAAc,iBAAmB,KAClC,CACD,QAAS,CAAC,CAAC,GAAkB,CAAC,CAAC,EAC/B,QAAS,SAAY,CACnB,GAAI,CAAC,EACH,MAAO,CAAE,OAAQ,EAAE,CAAE,QAAS,GAAO,WAAY,KAAM,CAGzD,IAAM,EAAO,MAAM,EAAA,QAAa,aAC9B,EACA,GAAc,kBAAoB,KAClC,GAAc,iBAAmB,KACjC,CACE,MAAA,GACA,UAAW,iBACZ,CACF,CAED,GAAI,CAAC,MAAM,QAAQ,EAAK,MAAM,CAC5B,MAAU,MACR,6EACD,CAKH,MAAO,CACL,OAFa,CAAC,GAAG,EAAK,MAAM,CAAC,SAE7B,CACA,QACE,CAAC,CAAC,EAAK,cAAgB,EAAK,MAAM,QAAA,GACpC,WAAY,EAAK,cAAgB,KAClC,EAeH,UAAW,EACX,OAAQ,KAAU,IAClB,eAAgB,SAChB,qBAAsB,GACvB,CAAC"}
@@ -28,8 +28,10 @@ var r = (r) => {
28
28
  nextPageId: e.next_page_id ?? null
29
29
  };
30
30
  },
31
- staleTime: Infinity,
32
- gcTime: 1800 * 1e3
31
+ staleTime: 0,
32
+ gcTime: 1800 * 1e3,
33
+ refetchOnMount: "always",
34
+ refetchOnWindowFocus: !1
33
35
  });
34
36
  };
35
37
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"use-conversation-history.js","names":[],"sources":["../../../src/hooks/query/use-conversation-history.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport EventService from \"#/api/event-service/event-service.api\";\nimport { useUserConversation } from \"#/hooks/query/use-user-conversation\";\nimport type { OpenHandsEvent } from \"#/types/agent-server/core\";\n\n/**\n * Number of events to load on the initial REST history fetch and on each\n * subsequent \"scroll-up\" page. The agent server caps `limit` at 100.\n */\nexport const INITIAL_HISTORY_PAGE_SIZE = 50;\n\nexport interface ConversationHistoryPage {\n /** Events in chronological (oldest → newest) order. */\n events: OpenHandsEvent[];\n /** True when the server has more events older than this page. */\n hasMore: boolean;\n /** Optional `next_page_id` from the server for keyset pagination. */\n nextPageId: string | null;\n}\n\n/**\n * Loads the most recent conversation events via REST. The server query is\n * sorted `TIMESTAMP_DESC` so we can request just the tail of the conversation;\n * we reverse the result to chronological order before handing it to callers.\n *\n * Older events are loaded on demand by `useLoadOlderEvents` once the user\n * scrolls up. The WebSocket then connects with `resend_mode='since'` using\n * the latest event's timestamp so we don't re-receive history we already have.\n */\nexport const useConversationHistory = (conversationId?: string) => {\n const { data: conversation } = useUserConversation(conversationId ?? null);\n\n return useQuery<ConversationHistoryPage>({\n queryKey: [\n \"conversation-history\",\n conversationId,\n // Include the conversation's host + key so a backend swap (or a\n // re-provisioned cloud sandbox with a new URL) re-fetches.\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n ],\n enabled: !!conversationId && !!conversation,\n queryFn: async () => {\n if (!conversationId) {\n return { events: [], hasMore: false, nextPageId: null };\n }\n\n const page = await EventService.searchEvents(\n conversationId,\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n {\n limit: INITIAL_HISTORY_PAGE_SIZE,\n sortOrder: \"TIMESTAMP_DESC\",\n },\n );\n\n if (!Array.isArray(page.items)) {\n throw new Error(\n \"Invalid conversation history response: expected page.items to be an array.\",\n );\n }\n\n // Reverse so callers can append in chronological order.\n const events = [...page.items].reverse();\n return {\n events,\n hasMore:\n !!page.next_page_id || page.items.length >= INITIAL_HISTORY_PAGE_SIZE,\n nextPageId: page.next_page_id ?? null,\n };\n },\n staleTime: Infinity,\n gcTime: 30 * 60 * 1000, // 30 minutes — survive navigation away and back (AC5)\n });\n};\n"],"mappings":";;;AA6BA,IAAa,KAA0B,MAA4B;CACjE,IAAM,EAAE,MAAM,MAAiB,EAAoB,KAAkB,KAAK;AAE1E,QAAO,EAAkC;EACvC,UAAU;GACR;GACA;GAGA,GAAc,oBAAoB;GAClC,GAAc,mBAAmB;GAClC;EACD,SAAS,CAAC,CAAC,KAAkB,CAAC,CAAC;EAC/B,SAAS,YAAY;AACnB,OAAI,CAAC,EACH,QAAO;IAAE,QAAQ,EAAE;IAAE,SAAS;IAAO,YAAY;IAAM;GAGzD,IAAM,IAAO,MAAM,EAAa,aAC9B,GACA,GAAc,oBAAoB,MAClC,GAAc,mBAAmB,MACjC;IACE,OAAA;IACA,WAAW;IACZ,CACF;AAED,OAAI,CAAC,MAAM,QAAQ,EAAK,MAAM,CAC5B,OAAU,MACR,6EACD;AAKH,UAAO;IACL,QAFa,CAAC,GAAG,EAAK,MAAM,CAAC,SAE7B;IACA,SACE,CAAC,CAAC,EAAK,gBAAgB,EAAK,MAAM,UAAA;IACpC,YAAY,EAAK,gBAAgB;IAClC;;EAEH,WAAW;EACX,QAAQ,OAAU;EACnB,CAAC"}
1
+ {"version":3,"file":"use-conversation-history.js","names":[],"sources":["../../../src/hooks/query/use-conversation-history.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport EventService from \"#/api/event-service/event-service.api\";\nimport { useUserConversation } from \"#/hooks/query/use-user-conversation\";\nimport type { OpenHandsEvent } from \"#/types/agent-server/core\";\n\n/**\n * Number of events to load on the initial REST history fetch and on each\n * subsequent \"scroll-up\" page. The agent server caps `limit` at 100.\n */\nexport const INITIAL_HISTORY_PAGE_SIZE = 50;\n\nexport interface ConversationHistoryPage {\n /** Events in chronological (oldest → newest) order. */\n events: OpenHandsEvent[];\n /** True when the server has more events older than this page. */\n hasMore: boolean;\n /** Optional `next_page_id` from the server for keyset pagination. */\n nextPageId: string | null;\n}\n\n/**\n * Loads the most recent conversation events via REST. The server query is\n * sorted `TIMESTAMP_DESC` so we can request just the tail of the conversation;\n * we reverse the result to chronological order before handing it to callers.\n *\n * Older events are loaded on demand by `useLoadOlderEvents` once the user\n * scrolls up. The WebSocket then connects with `resend_mode='since'` using\n * the latest event's timestamp so we don't re-receive history we already have.\n */\nexport const useConversationHistory = (conversationId?: string) => {\n const { data: conversation } = useUserConversation(conversationId ?? null);\n\n return useQuery<ConversationHistoryPage>({\n queryKey: [\n \"conversation-history\",\n conversationId,\n // Include the conversation's host + key so a backend swap (or a\n // re-provisioned cloud sandbox with a new URL) re-fetches.\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n ],\n enabled: !!conversationId && !!conversation,\n queryFn: async () => {\n if (!conversationId) {\n return { events: [], hasMore: false, nextPageId: null };\n }\n\n const page = await EventService.searchEvents(\n conversationId,\n conversation?.conversation_url ?? null,\n conversation?.session_api_key ?? null,\n {\n limit: INITIAL_HISTORY_PAGE_SIZE,\n sortOrder: \"TIMESTAMP_DESC\",\n },\n );\n\n if (!Array.isArray(page.items)) {\n throw new Error(\n \"Invalid conversation history response: expected page.items to be an array.\",\n );\n }\n\n // Reverse so callers can append in chronological order.\n const events = [...page.items].reverse();\n return {\n events,\n hasMore:\n !!page.next_page_id || page.items.length >= INITIAL_HISTORY_PAGE_SIZE,\n nextPageId: page.next_page_id ?? null,\n };\n },\n // Keep the cached page so returning to a conversation renders the\n // last-known discussion instantly (no skeleton). But refetch the tail on\n // mount so events produced while we were away — e.g. an active /goal loop\n // that keeps emitting user + agent turns while we're on another\n // conversation — arrive in one batched REST page instead of being\n // back-filled one event at a time over the WebSocket `since` replay. The\n // cached tail's newest timestamp never advances on its own, so without this\n // refetch every return replays the entire post-first-load history over the\n // socket (and it gets worse the longer the goal has been running).\n //\n // refetchOnWindowFocus is disabled because the WebSocket connection is\n // gated on this query settling (see conversation-websocket-context.tsx); a\n // focus-driven refetch would otherwise needlessly drop and reconnect it.\n staleTime: 0,\n gcTime: 30 * 60 * 1000, // 30 minutes — keep cached data to render instantly on return\n refetchOnMount: \"always\",\n refetchOnWindowFocus: false,\n });\n};\n"],"mappings":";;;AA6BA,IAAa,KAA0B,MAA4B;CACjE,IAAM,EAAE,MAAM,MAAiB,EAAoB,KAAkB,KAAK;AAE1E,QAAO,EAAkC;EACvC,UAAU;GACR;GACA;GAGA,GAAc,oBAAoB;GAClC,GAAc,mBAAmB;GAClC;EACD,SAAS,CAAC,CAAC,KAAkB,CAAC,CAAC;EAC/B,SAAS,YAAY;AACnB,OAAI,CAAC,EACH,QAAO;IAAE,QAAQ,EAAE;IAAE,SAAS;IAAO,YAAY;IAAM;GAGzD,IAAM,IAAO,MAAM,EAAa,aAC9B,GACA,GAAc,oBAAoB,MAClC,GAAc,mBAAmB,MACjC;IACE,OAAA;IACA,WAAW;IACZ,CACF;AAED,OAAI,CAAC,MAAM,QAAQ,EAAK,MAAM,CAC5B,OAAU,MACR,6EACD;AAKH,UAAO;IACL,QAFa,CAAC,GAAG,EAAK,MAAM,CAAC,SAE7B;IACA,SACE,CAAC,CAAC,EAAK,gBAAgB,EAAK,MAAM,UAAA;IACpC,YAAY,EAAK,gBAAgB;IAClC;;EAeH,WAAW;EACX,QAAQ,OAAU;EAClB,gBAAgB;EAChB,sBAAsB;EACvB,CAAC"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`),t=require(`./query-keys.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../api/workspaces-service/workspaces-service.api.cjs`);function i({enabled:i=!0}={}){return n.useQuery({queryKey:t.LOCAL_WORKSPACES_QUERY_KEYS.all,queryFn:()=>r.default.listWorkspaces(),enabled:i,retry:(t,n)=>!e.isAgentServerVersionError(n)&&t<3,meta:{disableToast:!0},staleTime:6e4})}exports.useLocalWorkspaces=i;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const t=require(`./query-keys.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../api/workspaces-service/workspaces-service.api.cjs`);function i({enabled:i=!0}={}){return n.useQuery({queryKey:t.LOCAL_WORKSPACES_QUERY_KEYS.all,queryFn:()=>r.default.listWorkspaces(),enabled:i,retry:(t,n)=>!e.isAgentServerVersionError(n)&&t<3,meta:{disableToast:!0},staleTime:6e4})}exports.useLocalWorkspaces=i;
2
2
  //# sourceMappingURL=use-local-workspaces.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-local-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-local-workspaces.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport WorkspacesService, {\n WorkspacesListResponse,\n} from \"#/api/workspaces-service/workspaces-service.api\";\nimport { LOCAL_WORKSPACES_QUERY_KEYS } from \"#/hooks/query/query-keys\";\n\ninterface UseLocalWorkspacesOptions {\n enabled?: boolean;\n}\n\nexport function useLocalWorkspaces({\n enabled = true,\n}: UseLocalWorkspacesOptions = {}) {\n return useQuery<WorkspacesListResponse>({\n queryKey: LOCAL_WORKSPACES_QUERY_KEYS.all,\n queryFn: () => WorkspacesService.listWorkspaces(),\n enabled,\n retry: (failureCount, error) =>\n !isAgentServerVersionError(error) && failureCount < 3,\n meta: { disableToast: true },\n staleTime: 60_000,\n });\n}\n"],"mappings":"iVAYA,SAAgB,EAAmB,CACjC,UAAU,IACmB,EAAE,CAAE,CACjC,OAAO,EAAA,SAAiC,CACtC,SAAU,EAAA,4BAA4B,IACtC,YAAe,EAAA,QAAkB,gBAAgB,CACjD,UACA,OAAQ,EAAc,IACpB,CAAC,EAAA,0BAA0B,EAAM,EAAI,EAAe,EACtD,KAAM,CAAE,aAAc,GAAM,CAC5B,UAAW,IACZ,CAAC"}
1
+ {"version":3,"file":"use-local-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-local-workspaces.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport WorkspacesService, {\n WorkspacesListResponse,\n} from \"#/api/workspaces-service/workspaces-service.api\";\nimport { LOCAL_WORKSPACES_QUERY_KEYS } from \"#/hooks/query/query-keys\";\n\ninterface UseLocalWorkspacesOptions {\n enabled?: boolean;\n}\n\nexport function useLocalWorkspaces({\n enabled = true,\n}: UseLocalWorkspacesOptions = {}) {\n return useQuery<WorkspacesListResponse>({\n queryKey: LOCAL_WORKSPACES_QUERY_KEYS.all,\n queryFn: () => WorkspacesService.listWorkspaces(),\n enabled,\n retry: (failureCount, error) =>\n !isAgentServerVersionError(error) && failureCount < 3,\n meta: { disableToast: true },\n staleTime: 60_000,\n });\n}\n"],"mappings":"maAYA,SAAgB,EAAmB,CACjC,UAAU,IACmB,EAAE,CAAE,CACjC,OAAO,EAAA,SAAiC,CACtC,SAAU,EAAA,4BAA4B,IACtC,YAAe,EAAA,QAAkB,gBAAgB,CACjD,UACA,OAAQ,EAAc,IACpB,CAAC,EAAA,0BAA0B,EAAM,EAAI,EAAe,EACtD,KAAM,CAAE,aAAc,GAAM,CAC5B,UAAW,IACZ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { isAgentServerVersionError as e } from "../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js";
2
+ import "../../node_modules/@openhands/typescript-client/dist/clients.js";
2
3
  import { LOCAL_WORKSPACES_QUERY_KEYS as t } from "./query-keys.js";
3
4
  import { useQuery as n } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
4
5
  import r from "../../api/workspaces-service/workspaces-service.api.js";
@@ -1 +1 @@
1
- {"version":3,"file":"use-local-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-local-workspaces.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport WorkspacesService, {\n WorkspacesListResponse,\n} from \"#/api/workspaces-service/workspaces-service.api\";\nimport { LOCAL_WORKSPACES_QUERY_KEYS } from \"#/hooks/query/query-keys\";\n\ninterface UseLocalWorkspacesOptions {\n enabled?: boolean;\n}\n\nexport function useLocalWorkspaces({\n enabled = true,\n}: UseLocalWorkspacesOptions = {}) {\n return useQuery<WorkspacesListResponse>({\n queryKey: LOCAL_WORKSPACES_QUERY_KEYS.all,\n queryFn: () => WorkspacesService.listWorkspaces(),\n enabled,\n retry: (failureCount, error) =>\n !isAgentServerVersionError(error) && failureCount < 3,\n meta: { disableToast: true },\n staleTime: 60_000,\n });\n}\n"],"mappings":";;;;;AAYA,SAAgB,EAAmB,EACjC,aAAU,OACmB,EAAE,EAAE;AACjC,QAAO,EAAiC;EACtC,UAAU,EAA4B;EACtC,eAAe,EAAkB,gBAAgB;EACjD;EACA,QAAQ,GAAc,MACpB,CAAC,EAA0B,EAAM,IAAI,IAAe;EACtD,MAAM,EAAE,cAAc,IAAM;EAC5B,WAAW;EACZ,CAAC"}
1
+ {"version":3,"file":"use-local-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-local-workspaces.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { isAgentServerVersionError } from \"@openhands/typescript-client/clients\";\n\nimport WorkspacesService, {\n WorkspacesListResponse,\n} from \"#/api/workspaces-service/workspaces-service.api\";\nimport { LOCAL_WORKSPACES_QUERY_KEYS } from \"#/hooks/query/query-keys\";\n\ninterface UseLocalWorkspacesOptions {\n enabled?: boolean;\n}\n\nexport function useLocalWorkspaces({\n enabled = true,\n}: UseLocalWorkspacesOptions = {}) {\n return useQuery<WorkspacesListResponse>({\n queryKey: LOCAL_WORKSPACES_QUERY_KEYS.all,\n queryFn: () => WorkspacesService.listWorkspaces(),\n enabled,\n retry: (failureCount, error) =>\n !isAgentServerVersionError(error) && failureCount < 3,\n meta: { disableToast: true },\n staleTime: 60_000,\n });\n}\n"],"mappings":";;;;;;AAYA,SAAgB,EAAmB,EACjC,aAAU,OACmB,EAAE,EAAE;AACjC,QAAO,EAAiC;EACtC,UAAU,EAA4B;EACtC,eAAe,EAAkB,gBAAgB;EACjD;EACA,QAAQ,GAAc,MACpB,CAAC,EAA0B,EAAM,IAAI,IAAe;EACtD,MAAM,EAAE,cAAc,IAAM;EAC5B,WAAW;EACZ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type MarketplacePlugin } from "#/api/plugins-service";
2
+ /**
3
+ * Query hook for the dynamic plugins marketplace catalog. The catalog is global
4
+ * (not project-scoped), and currently local-backend only — a cloud backend
5
+ * yields an empty list. Mirrors `useSkills`.
6
+ */
7
+ export declare const usePluginsMarketplace: () => import("@tanstack/react-query").UseQueryResult<MarketplacePlugin[], import("axios").AxiosError<unknown, any>>;
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`),t=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`),n=require(`../../api/agent-server-client-options.cjs`),r=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),i=require(`./use-local-workspaces.cjs`);let a=require(`react`);function o(){let{data:o,isLoading:s,isError:c,error:l}=i.useLocalWorkspaces(),u=e.isAgentServerVersionError(l),d=o?.workspaces??[],f=o?.workspaceParents??[],p=(0,a.useMemo)(()=>{let e=new Set(f.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?f:[...f,...t]},[f,u]),m=r.useQueries({queries:u?[]:p.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>new t.FileClient(n.getAgentServerClientOptions()).searchSubdirectories(e.path),retry:!1,meta:{disableToast:!0}}))}),h=s||m.some(e=>e.isLoading),g=c||m.some(e=>e.isError);return{workspaces:(0,a.useMemo)(()=>{let e=new Map,t=new Map(p.map((e,t)=>[e.path,m[t]]));return p.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),d.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[d,p,m.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),isLoading:h,isError:g,error:l}}exports.useResolvedWorkspaces=o;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`),t=require(`../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const n=require(`../../api/agent-server-client-options.cjs`),r=require(`../../node_modules/@tanstack/react-query/build/modern/useQueries.cjs`),i=require(`./use-local-workspaces.cjs`);let a=require(`react`);function o(){let{data:o,isLoading:s,isError:c,error:l}=i.useLocalWorkspaces(),u=t.isAgentServerVersionError(l),d=o?.workspaces??[],f=o?.workspaceParents??[],p=(0,a.useMemo)(()=>{let e=new Set(f.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?f:[...f,...t]},[f,u]),m=r.useQueries({queries:u?[]:p.map(t=>({queryKey:[`file`,`search_subdirs`,t.path],queryFn:()=>new e.FileClient(n.getAgentServerClientOptions()).searchSubdirectories(t.path),retry:!1,meta:{disableToast:!0}}))}),h=s||m.some(e=>e.isLoading),g=c||m.some(e=>e.isError);return{workspaces:(0,a.useMemo)(()=>{let e=new Map,t=new Map(p.map((e,t)=>[e.path,m[t]]));return p.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),d.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[d,p,m.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),isLoading:h,isError:g,error:l}}exports.useResolvedWorkspaces=o;
2
2
  //# sourceMappingURL=use-resolved-workspaces.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-resolved-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return { workspaces: merged, isLoading, isError, error: listError };\n}\n"],"mappings":"+bA8CA,SAAgB,GAAqD,CACnE,GAAM,CACJ,OACA,UAAW,EACX,QAAS,EACT,MAAO,GACL,EAAA,oBAAoB,CAClB,EAAwB,EAAA,0BAA0B,EAAU,CAC5D,EAAa,GAAM,YAAc,EAAE,CACnC,EAAgB,GAAM,kBAAoB,EAAE,CAI5C,GAAA,EAAA,EAAA,aAAiC,CACrC,IAAM,EAAO,IAAI,IAAI,EAAc,IAAK,GAAM,EAAE,KAAK,CAAC,CAOhD,EAAS,EAAA,CAAgB,OAAQ,GAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC,CAC/D,OAAO,EAAO,SAAW,EAAI,EAAgB,CAAC,GAAG,EAAe,GAAG,EAAO,EACzE,CAAC,EAAe,EAAsB,CAAC,CAEpC,EAAgB,EAAA,WAAW,CAC/B,QAAS,EACL,EAAE,CACF,EAAiB,IAAK,IAAY,CAChC,SAAU,CAAC,OAAQ,iBAAkB,EAAO,KAAK,CACjD,YACE,IAAI,EAAA,WAAW,EAAA,6BAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR,CACH,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,EAAE,CACR,CAAC,CAEI,EAAY,GAAiB,EAAc,KAAM,GAAM,EAAE,UAAU,CACnE,EAAU,GAAe,EAAc,KAAM,GAAM,EAAE,QAAQ,CAwCnE,MAAO,CAAE,YAAA,EAAA,EAAA,aA/BoB,CAC3B,IAAM,EAAS,IAAI,IACb,EAAkB,IAAI,IAC1B,EAAiB,KAAK,EAAQ,IAAU,CACtC,EAAO,KACP,EAAc,GACf,CAAC,CACH,CAqBD,OAnBA,EAAiB,QAAS,GAAW,EACpB,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,OAAS,EAAE,EACjC,QAAS,GAAU,CACnB,EAAO,IAAI,EAAM,KAAK,EAC1B,EAAO,IAAI,EAAM,KAAM,CACrB,GAAI,EAAM,KACV,KAAM,EAAM,KACZ,KAAM,EAAM,KACZ,WAAY,EAAO,KACpB,CAAC,EACF,EACF,CAGF,EAAW,QAAS,GAAM,CACxB,EAAO,IAAI,EAAE,KAAM,EAAE,EACrB,CAEK,MAAM,KAAK,EAAO,QAAQ,CAAC,EACjC,CAAC,EAAY,EAjCW,EACxB,IAAK,GAAM,GAAG,EAAE,eAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B,CAAmB,CAEhC,CAAQ,YAAW,UAAS,MAAO,EAAW"}
1
+ {"version":3,"file":"use-resolved-workspaces.cjs","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return { workspaces: merged, isLoading, isError, error: listError };\n}\n"],"mappings":"ihBA8CA,SAAgB,GAAqD,CACnE,GAAM,CACJ,OACA,UAAW,EACX,QAAS,EACT,MAAO,GACL,EAAA,oBAAoB,CAClB,EAAwB,EAAA,0BAA0B,EAAU,CAC5D,EAAa,GAAM,YAAc,EAAE,CACnC,EAAgB,GAAM,kBAAoB,EAAE,CAI5C,GAAA,EAAA,EAAA,aAAiC,CACrC,IAAM,EAAO,IAAI,IAAI,EAAc,IAAK,GAAM,EAAE,KAAK,CAAC,CAOhD,EAAS,EAAA,CAAgB,OAAQ,GAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC,CAC/D,OAAO,EAAO,SAAW,EAAI,EAAgB,CAAC,GAAG,EAAe,GAAG,EAAO,EACzE,CAAC,EAAe,EAAsB,CAAC,CAEpC,EAAgB,EAAA,WAAW,CAC/B,QAAS,EACL,EAAE,CACF,EAAiB,IAAK,IAAY,CAChC,SAAU,CAAC,OAAQ,iBAAkB,EAAO,KAAK,CACjD,YACE,IAAI,EAAA,WAAW,EAAA,6BAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR,CACH,MAAO,GACP,KAAM,CAAE,aAAc,GAAM,CAC7B,EAAE,CACR,CAAC,CAEI,EAAY,GAAiB,EAAc,KAAM,GAAM,EAAE,UAAU,CACnE,EAAU,GAAe,EAAc,KAAM,GAAM,EAAE,QAAQ,CAwCnE,MAAO,CAAE,YAAA,EAAA,EAAA,aA/BoB,CAC3B,IAAM,EAAS,IAAI,IACb,EAAkB,IAAI,IAC1B,EAAiB,KAAK,EAAQ,IAAU,CACtC,EAAO,KACP,EAAc,GACf,CAAC,CACH,CAqBD,OAnBA,EAAiB,QAAS,GAAW,EACpB,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,OAAS,EAAE,EACjC,QAAS,GAAU,CACnB,EAAO,IAAI,EAAM,KAAK,EAC1B,EAAO,IAAI,EAAM,KAAM,CACrB,GAAI,EAAM,KACV,KAAM,EAAM,KACZ,KAAM,EAAM,KACZ,WAAY,EAAO,KACpB,CAAC,EACF,EACF,CAGF,EAAW,QAAS,GAAM,CACxB,EAAO,IAAI,EAAE,KAAM,EAAE,EACrB,CAEK,MAAM,KAAK,EAAO,QAAQ,CAAC,EACjC,CAAC,EAAY,EAjCW,EACxB,IAAK,GAAM,GAAG,EAAE,eAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B,CAAmB,CAEhC,CAAQ,YAAW,UAAS,MAAO,EAAW"}
@@ -1,21 +1,22 @@
1
- import { isAgentServerVersionError as e } from "../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js";
2
- import { FileClient as t } from "../../node_modules/@openhands/typescript-client/dist/client/file-client.js";
1
+ import { FileClient as e } from "../../node_modules/@openhands/typescript-client/dist/client/file-client.js";
2
+ import { isAgentServerVersionError as t } from "../../node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js";
3
+ import "../../node_modules/@openhands/typescript-client/dist/clients.js";
3
4
  import { getAgentServerClientOptions as n } from "../../api/agent-server-client-options.js";
4
5
  import { useQueries as r } from "../../node_modules/@tanstack/react-query/build/modern/useQueries.js";
5
6
  import { useLocalWorkspaces as i } from "./use-local-workspaces.js";
6
7
  import { useMemo as a } from "react";
7
8
  //#region src/hooks/query/use-resolved-workspaces.ts
8
9
  function o() {
9
- let { data: o, isLoading: s, isError: c, error: l } = i(), u = e(l), d = o?.workspaces ?? [], f = o?.workspaceParents ?? [], p = a(() => {
10
+ let { data: o, isLoading: s, isError: c, error: l } = i(), u = t(l), d = o?.workspaces ?? [], f = o?.workspaceParents ?? [], p = a(() => {
10
11
  let e = new Set(f.map((e) => e.path)), t = [].filter((t) => !e.has(t.path));
11
12
  return t.length === 0 ? f : [...f, ...t];
12
- }, [f, u]), m = r({ queries: u ? [] : p.map((e) => ({
13
+ }, [f, u]), m = r({ queries: u ? [] : p.map((t) => ({
13
14
  queryKey: [
14
15
  "file",
15
16
  "search_subdirs",
16
- e.path
17
+ t.path
17
18
  ],
18
- queryFn: () => new t(n()).searchSubdirectories(e.path),
19
+ queryFn: () => new e(n()).searchSubdirectories(t.path),
19
20
  retry: !1,
20
21
  meta: { disableToast: !0 }
21
22
  })) }), h = s || m.some((e) => e.isLoading), g = c || m.some((e) => e.isError);
@@ -1 +1 @@
1
- {"version":3,"file":"use-resolved-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return { workspaces: merged, isLoading, isError, error: listError };\n}\n"],"mappings":";;;;;;;AA8CA,SAAgB,IAAqD;CACnE,IAAM,EACJ,SACA,WAAW,GACX,SAAS,GACT,OAAO,MACL,GAAoB,EAClB,IAAwB,EAA0B,EAAU,EAC5D,IAAa,GAAM,cAAc,EAAE,EACnC,IAAgB,GAAM,oBAAoB,EAAE,EAI5C,IAAmB,QAAc;EACrC,IAAM,IAAO,IAAI,IAAI,EAAc,KAAK,MAAM,EAAE,KAAK,CAAC,EAOhD,IAAS,EAAA,CAAgB,QAAQ,MAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC;AAC/D,SAAO,EAAO,WAAW,IAAI,IAAgB,CAAC,GAAG,GAAe,GAAG,EAAO;IACzE,CAAC,GAAe,EAAsB,CAAC,EAEpC,IAAgB,EAAW,EAC/B,SAAS,IACL,EAAE,GACF,EAAiB,KAAK,OAAY;EAChC,UAAU;GAAC;GAAQ;GAAkB,EAAO;GAAK;EACjD,eACE,IAAI,EAAW,GAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR;EACH,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,EAAE,EACR,CAAC,EAEI,IAAY,KAAiB,EAAc,MAAM,MAAM,EAAE,UAAU,EACnE,IAAU,KAAe,EAAc,MAAM,MAAM,EAAE,QAAQ;AAwCnE,QAAO;EAAE,YA/BM,QAAc;GAC3B,IAAM,oBAAS,IAAI,KAA6B,EAC1C,IAAkB,IAAI,IAC1B,EAAiB,KAAK,GAAQ,MAAU,CACtC,EAAO,MACP,EAAc,GACf,CAAC,CACH;AAqBD,UAnBA,EAAiB,SAAS,MAAW;AAGnC,KAFe,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,SAAS,EAAE,EACjC,SAAS,MAAU;AACnB,OAAO,IAAI,EAAM,KAAK,IAC1B,EAAO,IAAI,EAAM,MAAM;MACrB,IAAI,EAAM;MACV,MAAM,EAAM;MACZ,MAAM,EAAM;MACZ,YAAY,EAAO;MACpB,CAAC;MACF;KACF,EAGF,EAAW,SAAS,MAAM;AACxB,MAAO,IAAI,EAAE,MAAM,EAAE;KACrB,EAEK,MAAM,KAAK,EAAO,QAAQ,CAAC;KACjC;GAAC;GAAY;GAjCW,EACxB,KAAK,MAAM,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B;GAAmB,CAEhC;EAAQ;EAAW;EAAS,OAAO;EAAW"}
1
+ {"version":3,"file":"use-resolved-workspaces.js","names":[],"sources":["../../../src/hooks/query/use-resolved-workspaces.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport {\n FileClient,\n isAgentServerVersionError,\n} from \"@openhands/typescript-client/clients\";\n\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { useLocalWorkspaces } from \"#/hooks/query/use-local-workspaces\";\nimport { LocalWorkspace, LocalWorkspaceParent } from \"#/types/workspace\";\n\ninterface UseResolvedWorkspacesResult {\n workspaces: LocalWorkspace[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n}\n\n/**\n * Implicit workspace parents that are always considered when resolving\n * workspaces. `/projects` is a well-known directory that some agent-server\n * setups use as the projects root. We surface its immediate subdirectories\n * as workspaces automatically in dev mode.\n *\n * This is a development convenience only. Production previews may point at\n * arbitrary remote agent servers that do not expose the file-browser endpoint;\n * probing `/projects` there creates noisy 404s before the user has added any\n * workspace parent explicitly.\n */\nconst INCLUDE_IMPLICIT_WORKSPACE_PARENTS = import.meta.env.DEV;\n\nconst IMPLICIT_WORKSPACE_PARENTS: LocalWorkspaceParent[] = [\n { id: \"implicit:/projects\", name: \"/projects\", path: \"/projects\" },\n];\n\n/**\n * Returns the merged list of workspaces to display:\n * - workspaces explicitly added by the user (from the persisted store),\n * - the immediate subdirectories of every saved \"workspace parent\",\n * fetched dynamically, and\n * - the immediate subdirectories of any implicit, built-in parents\n * (currently just `/projects`).\n *\n * Static workspaces always take precedence over a dynamic child with the\n * same path so that user-selected names/ids are preserved.\n */\nexport function useResolvedWorkspaces(): UseResolvedWorkspacesResult {\n const {\n data,\n isLoading: isLoadingList,\n isError: isErrorList,\n error: listError,\n } = useLocalWorkspaces();\n const workspacesUnsupported = isAgentServerVersionError(listError);\n const workspaces = data?.workspaces ?? [];\n const storedParents = data?.workspaceParents ?? [];\n\n // Merge stored parents with the implicit ones, deduping on path so a\n // user-added `/projects` doesn't trigger a second query.\n const workspaceParents = useMemo(() => {\n const seen = new Set(storedParents.map((p) => p.path));\n // Filter out implicit parents that conflict with user-added ones (by path)\n // so custom names/ids are preserved.\n const implicitParents =\n INCLUDE_IMPLICIT_WORKSPACE_PARENTS && !workspacesUnsupported\n ? IMPLICIT_WORKSPACE_PARENTS\n : [];\n const extras = implicitParents.filter((p) => !seen.has(p.path));\n return extras.length === 0 ? storedParents : [...storedParents, ...extras];\n }, [storedParents, workspacesUnsupported]);\n\n const parentQueries = useQueries({\n queries: workspacesUnsupported\n ? []\n : workspaceParents.map((parent) => ({\n queryKey: [\"file\", \"search_subdirs\", parent.path],\n queryFn: () =>\n new FileClient(getAgentServerClientOptions()).searchSubdirectories(\n parent.path,\n ),\n retry: false,\n meta: { disableToast: true },\n })),\n });\n\n const isLoading = isLoadingList || parentQueries.some((q) => q.isLoading);\n const isError = isErrorList || parentQueries.some((q) => q.isError);\n\n // Stable string fingerprint that changes whenever any parent's subdir\n // results change. Avoids spreading timestamps into the `useMemo` deps,\n // which would change the array length as parents are added/removed.\n const queriesFingerprint = parentQueries\n .map((q) => `${q.dataUpdatedAt ?? 0}:${q.status}`)\n .join(\"|\");\n\n const merged = useMemo(() => {\n const byPath = new Map<string, LocalWorkspace>();\n const resultsByParent = new Map(\n workspaceParents.map((parent, index) => [\n parent.path,\n parentQueries[index],\n ]),\n );\n\n workspaceParents.forEach((parent) => {\n const result = resultsByParent.get(parent.path);\n const items = result?.data?.items ?? [];\n items.forEach((entry) => {\n if (byPath.has(entry.path)) return;\n byPath.set(entry.path, {\n id: entry.path,\n name: entry.name,\n path: entry.path,\n parentPath: parent.path,\n });\n });\n });\n\n // Static workspaces win on duplicate paths.\n workspaces.forEach((w) => {\n byPath.set(w.path, w);\n });\n\n return Array.from(byPath.values());\n }, [workspaces, workspaceParents, queriesFingerprint]);\n\n return { workspaces: merged, isLoading, isError, error: listError };\n}\n"],"mappings":";;;;;;;;AA8CA,SAAgB,IAAqD;CACnE,IAAM,EACJ,SACA,WAAW,GACX,SAAS,GACT,OAAO,MACL,GAAoB,EAClB,IAAwB,EAA0B,EAAU,EAC5D,IAAa,GAAM,cAAc,EAAE,EACnC,IAAgB,GAAM,oBAAoB,EAAE,EAI5C,IAAmB,QAAc;EACrC,IAAM,IAAO,IAAI,IAAI,EAAc,KAAK,MAAM,EAAE,KAAK,CAAC,EAOhD,IAAS,EAAA,CAAgB,QAAQ,MAAM,CAAC,EAAK,IAAI,EAAE,KAAK,CAAC;AAC/D,SAAO,EAAO,WAAW,IAAI,IAAgB,CAAC,GAAG,GAAe,GAAG,EAAO;IACzE,CAAC,GAAe,EAAsB,CAAC,EAEpC,IAAgB,EAAW,EAC/B,SAAS,IACL,EAAE,GACF,EAAiB,KAAK,OAAY;EAChC,UAAU;GAAC;GAAQ;GAAkB,EAAO;GAAK;EACjD,eACE,IAAI,EAAW,GAA6B,CAAC,CAAC,qBAC5C,EAAO,KACR;EACH,OAAO;EACP,MAAM,EAAE,cAAc,IAAM;EAC7B,EAAE,EACR,CAAC,EAEI,IAAY,KAAiB,EAAc,MAAM,MAAM,EAAE,UAAU,EACnE,IAAU,KAAe,EAAc,MAAM,MAAM,EAAE,QAAQ;AAwCnE,QAAO;EAAE,YA/BM,QAAc;GAC3B,IAAM,oBAAS,IAAI,KAA6B,EAC1C,IAAkB,IAAI,IAC1B,EAAiB,KAAK,GAAQ,MAAU,CACtC,EAAO,MACP,EAAc,GACf,CAAC,CACH;AAqBD,UAnBA,EAAiB,SAAS,MAAW;AAGnC,KAFe,EAAgB,IAAI,EAAO,KAC5B,EAAQ,MAAM,SAAS,EAAE,EACjC,SAAS,MAAU;AACnB,OAAO,IAAI,EAAM,KAAK,IAC1B,EAAO,IAAI,EAAM,MAAM;MACrB,IAAI,EAAM;MACV,MAAM,EAAM;MACZ,MAAM,EAAM;MACZ,YAAY,EAAO;MACpB,CAAC;MACF;KACF,EAGF,EAAW,SAAS,MAAM;AACxB,MAAO,IAAI,EAAE,MAAM,EAAE;KACrB,EAEK,MAAM,KAAK,EAAO,QAAQ,CAAC;KACjC;GAAC;GAAY;GAjCW,EACxB,KAAK,MAAM,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,CACjD,KAAK,IA+B0B;GAAmB,CAEhC;EAAQ;EAAW;EAAS,OAAO;EAAW"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`),t=require(`../../api/agent-server-client-options.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../contexts/active-backend-context.cjs`);function i(){return new e.FileClient(t.getAgentServerClientOptions())}var a=e=>{let t=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>i().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},o=()=>{let e=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>i().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})};exports.useHomeDirectory=o,exports.useSearchSubdirs=a;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/file-client.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/clients.cjs`);const t=require(`../../api/agent-server-client-options.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),r=require(`../../contexts/active-backend-context.cjs`);function i(){return new e.FileClient(t.getAgentServerClientOptions())}var a=e=>{let t=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>i().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},o=()=>{let e=r.useActiveBackend();return n.useQuery({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>i().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})};exports.useHomeDirectory=o,exports.useSearchSubdirs=a;
2
2
  //# sourceMappingURL=use-search-subdirs.cjs.map