@openhands/agent-canvas 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (710) hide show
  1. package/README.md +11 -12
  2. package/README.windows.md +4 -2
  3. package/build/assets/{Trans-Ch-OVWEA.js → Trans-DqF_OEZB.js} +1 -1
  4. package/build/assets/{acp-providers-Sy2LKyMa.js → acp-providers-DerAmTyY.js} +1 -1
  5. package/build/assets/active-backend-context-B8rMv0X9.js +1 -0
  6. package/build/assets/{add-backend-modal-Bgy8anoR.js → add-backend-modal-CxC7BNEc.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-3mmXljZX.js → agent-profiles-settings-BJb8YXR1.js} +1 -1
  8. package/build/assets/agent-server-compatibility-BWN-EIQn.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +41 -0
  10. package/build/assets/{agent-settings-B-W10B4E.js → agent-settings-CgCnqaAA.js} +2 -2
  11. package/build/assets/agent-settings-DDkSavD7.js +1 -0
  12. package/build/assets/{alert-banner-Bpf2NQJq.js → alert-banner-Dh51WURQ.js} +1 -1
  13. package/build/assets/api-key-entry-screen-iZc7n8AI.js +1 -0
  14. package/build/assets/app-settings-B5zyipxJ.js +1 -0
  15. package/build/assets/automation-detail-CZsu2CoM.js +2 -0
  16. package/build/assets/automation-export-BwRX6H32.js +2 -0
  17. package/build/assets/automations-list-lHAVzMoA.js +1 -0
  18. package/build/assets/{back-nav-button-CUS2mi-U.js → back-nav-button-DVknCcSP.js} +1 -1
  19. package/build/assets/backend-form-modal-RGcu909r.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-D9hZx05w.js → backend-synced-settings-badge-BSfN0AZA.js} +1 -1
  21. package/build/assets/{base-modal-BuF2f0YL.js → base-modal-CIF_785P.js} +1 -1
  22. package/build/assets/{bot-D7eUAuSB.js → bot-C-EA6685.js} +1 -1
  23. package/build/assets/{brand-button-vMVuyDXu.js → brand-button-B1izLAdR.js} +1 -1
  24. package/build/assets/{browser-BifzWIBd.js → browser-DKaeq_sT.js} +3 -3
  25. package/build/assets/{browser-tab-CkkqJnqw.js → browser-tab-qb_ftCxW.js} +1 -1
  26. package/build/assets/canvas-ui-COgjltGz.js +1 -0
  27. package/build/assets/{chat-send-button-B_jc5z5C.js → chat-send-button-BZHG2hAW.js} +1 -1
  28. package/build/assets/check-TbOEtHKj.js +1 -0
  29. package/build/assets/{chevron-down-CI8A6tet.js → chevron-down-D7IvFMBM.js} +1 -1
  30. package/build/assets/{circle-plus-check-toggle-C5YxjxvI.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
  31. package/build/assets/client-source-BZK8vRs2.js +1 -0
  32. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +1 -0
  33. package/build/assets/{color-themes-DPBzNtVg.js → color-themes-CHizm1xF.js} +1 -1
  34. package/build/assets/{combobox-caret-DoObzqf4.js → combobox-caret-CxZpqoSR.js} +1 -1
  35. package/build/assets/{command-menu-D-JV3Wqm.js → command-menu-oTvKDU3Y.js} +1 -1
  36. package/build/assets/condenser-settings-BGlWn93P.js +1 -0
  37. package/build/assets/{confirmation-modal-BGLu6XJN.js → confirmation-modal-DGBWM2Ls.js} +1 -1
  38. package/build/assets/{context-menu-list-item-BD5_EaKN.js → context-menu-list-item-6psNyl7X.js} +1 -1
  39. package/build/assets/conversation-BoCYx8n2.js +89 -0
  40. package/build/assets/conversation-DgHqMjnY.js +1 -0
  41. package/build/assets/conversation-panel-78Rxh_-I.js +1 -0
  42. package/build/assets/conversation-service.api-_f9GlIEi.js +1 -0
  43. package/build/assets/{conversation-tab-empty-state-B2dDYEwf.js → conversation-tab-empty-state-CNUmIms2.js} +1 -1
  44. package/build/assets/{copy-3JCw_XFB.js → copy-D1YGjP-C.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CaR52OnA.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
  46. package/build/assets/declaration-BGsHjPEW.js +1 -0
  47. package/build/assets/{device-verify-Dj6I4Iqe.js → device-verify-WBSjJBLH.js} +1 -1
  48. package/build/assets/{dropdown-classes-DJSXeLqc.js → dropdown-classes-D3wMJlXT.js} +1 -1
  49. package/build/assets/{ellipsis-button-C5Z-tPFp.js → ellipsis-button-CbNnHlIq.js} +1 -1
  50. package/build/assets/{entry.client-2_3ePAm0.js → entry.client-DNlPGxsu.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-DXbVwiNZ.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-DZQfRGTx.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
  53. package/build/assets/{extensions-hub-CLjmOGqS.js → extensions-hub-CCbLA7IM.js} +1 -1
  54. package/build/assets/{extensions-navigation-B5MeUiMq.js → extensions-navigation-CPNjMNvR.js} +1 -1
  55. package/build/assets/{external-link-D2zJjE9G.js → external-link-lhdITPqq.js} +1 -1
  56. package/build/assets/files-tab-y4K7EXBO.js +1 -0
  57. package/build/assets/{form-control-classes-ChpNBe9n.js → form-control-classes-CbdN5aO3.js} +1 -1
  58. package/build/assets/format-time-delta-DhDbkD7V.js +1 -0
  59. package/build/assets/git-provider-icon-ITvsH4Ko.js +1 -0
  60. package/build/assets/home-BwbeOWwU.js +1 -0
  61. package/build/assets/home-DKPGQ5P3.js +1 -0
  62. package/build/assets/index-home-Bko2Itv5.js +1 -0
  63. package/build/assets/install-server-modal-Qk1gwyI8.js +1 -0
  64. package/build/assets/{launch-V_3Rp7WS.js → launch-CAGavYl-.js} +1 -1
  65. package/build/assets/lesson-plan-DMCPdtrf.js +4 -0
  66. package/build/assets/{list-todo-BfH6yYUK.js → list-todo-CAtvkzcy.js} +1 -1
  67. package/build/assets/llm-not-configured-banner-C1ktyb3C.js +27 -0
  68. package/build/assets/llm-settings-BBsZFi9l.js +1 -0
  69. package/build/assets/llm-settings-DFkJQr_w.js +1 -0
  70. package/build/assets/llm-subscription-service-Casyzgn1.js +1 -0
  71. package/build/assets/loader-circle-CsAsfLIs.js +1 -0
  72. package/build/assets/{loading-spinner-BLdswi6q.js → loading-spinner-BcdnT0mN.js} +1 -1
  73. package/build/assets/manage-backends-modal-CKQ46rvw.js +1 -0
  74. package/build/assets/manifest-03478bbf.js +1 -0
  75. package/build/assets/{map-provider-BM2SJarp.js → map-provider-BbIb12oh.js} +1 -1
  76. package/build/assets/{markdown-renderer-DMT7Zkpd.js → markdown-renderer-B4V2OMFP.js} +1 -1
  77. package/build/assets/{mcp-BQufNPZ6.js → mcp-BapoJsDc.js} +2 -2
  78. package/build/assets/{messages-BnJCqnFf.js → messages-CUBFMY5o.js} +26 -26
  79. package/build/assets/{modal-body-DouOE5KH.js → modal-body-Cc2zp0xb.js} +1 -1
  80. package/build/assets/{modal-classes-Cf-4tbHz.js → modal-classes-3qT9Ap7Q.js} +1 -1
  81. package/build/assets/{modal-close-button-B6CfxxJj.js → modal-close-button-BcIBUdSq.js} +1 -1
  82. package/build/assets/model-selector-DJrMrFAr.js +1 -0
  83. package/build/assets/onboarding-6NMkdNxV.js +1 -0
  84. package/build/assets/onboarding-modal-Q4AnpIdg.js +1 -0
  85. package/build/assets/organization-service.api-vrRNwOma.js +1 -0
  86. package/build/assets/path-utils-PNfCKQDV.js +1 -0
  87. package/build/assets/{pencil-Dj2XjKmI.js → pencil-CWhApFIT.js} +1 -1
  88. package/build/assets/{plan-components-CcCBmCzW.js → plan-components-BdZXPyZU.js} +1 -1
  89. package/build/assets/{planner-tab-Dhyqcqmb.js → planner-tab-ByOw1he8.js} +1 -1
  90. package/build/assets/plugins-management-service-B75jyC56.js +1 -0
  91. package/build/assets/profiles-service.api-BQTklD5D.js +1 -0
  92. package/build/assets/providers-DfTB2gPd.js +1 -0
  93. package/build/assets/proxy-B3tCGf0X.js +1 -0
  94. package/build/assets/{recommended-automations-launcher-CTcGTl4d.js → recommended-automations-launcher-Bj7PuHY1.js} +1 -1
  95. package/build/assets/{refresh-cw-DM82EIyx.js → refresh-cw-B9B7-vsy.js} +1 -1
  96. package/build/assets/root-CDnuTToz.js +2 -0
  97. package/build/assets/root-CYWeTrWE.css +1 -0
  98. package/build/assets/root-layout-DfYVlcRG.js +2 -0
  99. package/build/assets/{runtime-waiting-state-BsXLElvN.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
  100. package/build/assets/schema-field-CUwk4wrQ.js +1 -0
  101. package/build/assets/sdk-section-page-DLLNrYjI.js +1 -0
  102. package/build/assets/{sdk-settings-schema-Cv7M9eSe.js → sdk-settings-schema-CLR01YIK.js} +1 -1
  103. package/build/assets/search-dIQ09UY2.js +1 -0
  104. package/build/assets/secrets-service-CvyPWJhg.js +1 -0
  105. package/build/assets/{secrets-settings-Cx6yJlyb.js → secrets-settings-CHy72A5C.js} +1 -1
  106. package/build/assets/{segmented-toggle-DyQqPhoD.js → segmented-toggle-kzwZkLaj.js} +1 -1
  107. package/build/assets/settings-B9S8UVQr.js +1 -0
  108. package/build/assets/{settings-dropdown-input-BjunGXJb.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
  109. package/build/assets/{settings-index-D6sxWSRk.js → settings-index-BKDl2CQ-.js} +1 -1
  110. package/build/assets/{settings-input-bD6npsDm.js → settings-input-BsgQWS5R.js} +1 -1
  111. package/build/assets/{settings-list-classes-Dp_OgzN0.js → settings-list-classes-DSJJX99U.js} +1 -1
  112. package/build/assets/settings-modal-DeK11CyT.js +1 -0
  113. package/build/assets/settings-service.api-DXk5TdeJ.js +1 -0
  114. package/build/assets/{settings-switch-5cuxl8Dc.js → settings-switch-Bes8dIlV.js} +1 -1
  115. package/build/assets/{settings-utils-BMdG65By.js → settings-utils-DzCVfiR3.js} +1 -1
  116. package/build/assets/shared-conversation-9atDzTR4.js +1 -0
  117. package/build/assets/{sidebar-layout-DuzJMMw-.js → sidebar-layout-Bm7pa3Vk.js} +1 -1
  118. package/build/assets/{sidebar-mobile-menu-toggle-VvvX32iF.js → sidebar-mobile-menu-toggle-giMMZctn.js} +1 -1
  119. package/build/assets/{sidebar-nav-link-5AlTT5-j.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
  120. package/build/assets/{sidebar-store-CZuE8AH5.js → sidebar-store-uiUXBU1N.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-eTIkE4nz.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
  122. package/build/assets/skills-plugins-Tropusio.js +1 -0
  123. package/build/assets/{skills-settings-BUv04tSc.js → skills-settings-BvzBBCWk.js} +2 -2
  124. package/build/assets/{square-chevron-right-Czw3FFWc.js → square-chevron-right-DE-JN-2Z.js} +1 -1
  125. package/build/assets/{styled-tooltip-CgX2oRaK.js → styled-tooltip-B14i_Uac.js} +1 -1
  126. package/build/assets/{suspense-BO1Tl_Vf.js → suspense-DmZ3MSSh.js} +1 -1
  127. package/build/assets/{task-list-tab-0k9PhuqO.js → task-list-tab-DyfgG4MC.js} +1 -1
  128. package/build/assets/telemetry-C5JMEfqB.js +2 -0
  129. package/build/assets/{terminal-B61WrJdS.js → terminal-DRXt2Lr4.js} +1 -1
  130. package/build/assets/{toggle-switch-2j5wwR85.js → toggle-switch-DX_k418f.js} +1 -1
  131. package/build/assets/{trash-2-Be_7y3Mn.js → trash-2-BU6BlW4i.js} +1 -1
  132. package/build/assets/{typography-D8mHDeNG.js → typography-CzfoD9DY.js} +1 -1
  133. package/build/assets/use-acp-credential-form-Bm8qXdlc.js +1 -0
  134. package/build/assets/{use-activate-agent-profile-20v1xU0H.js → use-activate-agent-profile-DlykqEfN.js} +1 -1
  135. package/build/assets/{use-active-agent-profile-BkJN7Xsy.js → use-active-agent-profile-hI-x-UBa.js} +1 -1
  136. package/build/assets/{use-active-conversation-DOZVSVtU.js → use-active-conversation-2qeez40F.js} +1 -1
  137. package/build/assets/use-agent-profiles-0pr5bLS7.js +1 -0
  138. package/build/assets/{use-agent-state-DHZO1obC.js → use-agent-state-C6peDXUm.js} +1 -1
  139. package/build/assets/use-backends-health-CLHPitJM.js +1 -0
  140. package/build/assets/{use-can-manage-org-profiles-C-OhWVBS.js → use-can-manage-org-profiles-Ck_bsNbH.js} +1 -1
  141. package/build/assets/use-cloud-current-user-id-DUCSxNjY.js +1 -0
  142. package/build/assets/use-config-B5r8erYt.js +1 -0
  143. package/build/assets/use-create-conversation-r1JHfKO5.js +1 -0
  144. package/build/assets/{use-create-secret-D0HCOZFu.js → use-create-secret-Cf2N11d2.js} +1 -1
  145. package/build/assets/{use-event-store-DjgU4wfO.js → use-event-store-Bbaz51GR.js} +1 -1
  146. package/build/assets/{use-handle-plan-click-DyRASKMC.js → use-handle-plan-click-CsAW3FlH.js} +1 -1
  147. package/build/assets/use-is-authed-BezEyfeh.js +1 -0
  148. package/build/assets/use-llm-profiles-Dr5__SlZ.js +1 -0
  149. package/build/assets/use-plugins-marketplace-BplU65ae.js +1 -0
  150. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +1 -0
  151. package/build/assets/use-save-agent-profile-RqUGqTv6.js +1 -0
  152. package/build/assets/use-save-settings-Chvzeu2s.js +1 -0
  153. package/build/assets/use-settings-CyxSlyTQ.js +1 -0
  154. package/build/assets/use-settings-nav-items-zEkSO_Bf.js +16 -0
  155. package/build/assets/use-skills-xrVoKYrF.js +1 -0
  156. package/build/assets/{use-task-list-AVBLbbcR.js → use-task-list-CfisapBW.js} +1 -1
  157. package/build/assets/use-tracking-D2Qg5Lpd.js +1 -0
  158. package/build/assets/{use-user-conversation-zpx7I18x.js → use-user-conversation-CnE4zhOA.js} +1 -1
  159. package/build/assets/{useMutation-DrCAVg5w.js → useMutation-u8UgRgDK.js} +1 -1
  160. package/build/assets/{useMutationState-D8QN0ZCy.js → useMutationState-OnAsCLA_.js} +1 -1
  161. package/build/assets/{useQueries-DClgUTc7.js → useQueries-BpIlT8Mt.js} +1 -1
  162. package/build/assets/{useQuery-CRBP8vIS.js → useQuery-D5pEZbY0.js} +1 -1
  163. package/build/assets/{useTranslation-CDRCKC9-.js → useTranslation-Cbf5AGg_.js} +1 -1
  164. package/build/assets/{utils-D3U3rlqr.js → utils-DB9LsAzA.js} +1 -1
  165. package/build/assets/{vendor~browser-tab-Di0kh5Zw.js → vendor~browser-tab-CsMb-pta.js} +1 -1
  166. package/build/assets/{vendor~browser-Cvg7jXCP.js → vendor~browser-wXQ-WZEC.js} +1 -1
  167. package/build/assets/{vendor~entry.client-9tWQ_Ugw.js → vendor~entry.client-DDuH4--y.js} +1 -1
  168. package/build/assets/{vendor~entry.client-D6BtSOtn.js → vendor~entry.client-DQGrNspu.js} +1 -1
  169. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js +2 -0
  170. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js +185 -0
  171. package/build/assets/{vendor~files-tab-B02k3xvx.js → vendor~files-tab-B-5fBohe.js} +1 -1
  172. package/build/assets/{vendor~home~conversation-panel~conversation-CYMF9JYB.js → vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js} +1 -1
  173. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +2 -0
  174. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
  175. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
  176. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
  177. package/build/assets/{vendor~launch-CHXA9cJu.js → vendor~launch-_Km3J77E.js} +1 -1
  178. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ivvrgjsa-BlIZPCXX.js → vendor~module-D5a_AClf.js} +1 -1
  179. package/build/assets/{vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js → vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js} +1 -1
  180. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
  181. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
  182. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
  183. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-B0EIDu4M.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +2 -2
  184. package/build/assets/{verification-settings-D576N2xa.js → verification-settings-CfkrXoSa.js} +1 -1
  185. package/build/assets/x-ZE4iplpF.js +1 -0
  186. package/build/index.html +4 -4
  187. package/build/locales/ar/openhands.json +9 -0
  188. package/build/locales/ca/openhands.json +9 -0
  189. package/build/locales/de/openhands.json +9 -0
  190. package/build/locales/en/openhands.json +9 -0
  191. package/build/locales/es/openhands.json +9 -0
  192. package/build/locales/fr/openhands.json +9 -0
  193. package/build/locales/it/openhands.json +9 -0
  194. package/build/locales/ja/openhands.json +9 -0
  195. package/build/locales/ko-KR/openhands.json +9 -0
  196. package/build/locales/no/openhands.json +9 -0
  197. package/build/locales/pt/openhands.json +9 -0
  198. package/build/locales/tr/openhands.json +9 -0
  199. package/build/locales/uk/openhands.json +9 -0
  200. package/build/locales/zh-CN/openhands.json +9 -0
  201. package/build/locales/zh-TW/openhands.json +9 -0
  202. package/config/defaults.json +5 -4
  203. package/dist/api/agent-server-adapter.cjs +3 -3
  204. package/dist/api/agent-server-adapter.cjs.map +1 -1
  205. package/dist/api/agent-server-adapter.d.ts +9 -1
  206. package/dist/api/agent-server-adapter.js +105 -102
  207. package/dist/api/agent-server-adapter.js.map +1 -1
  208. package/dist/api/agent-server-config.cjs +1 -1
  209. package/dist/api/agent-server-config.cjs.map +1 -1
  210. package/dist/api/agent-server-config.d.ts +3 -0
  211. package/dist/api/agent-server-config.js +45 -23
  212. package/dist/api/agent-server-config.js.map +1 -1
  213. package/dist/api/backend-registry/auth.cjs +1 -1
  214. package/dist/api/backend-registry/auth.cjs.map +1 -1
  215. package/dist/api/backend-registry/auth.js +1 -1
  216. package/dist/api/backend-registry/auth.js.map +1 -1
  217. package/dist/api/backend-registry/default-backend.cjs +1 -1
  218. package/dist/api/backend-registry/default-backend.cjs.map +1 -1
  219. package/dist/api/backend-registry/default-backend.d.ts +3 -0
  220. package/dist/api/backend-registry/default-backend.js +22 -10
  221. package/dist/api/backend-registry/default-backend.js.map +1 -1
  222. package/dist/api/backend-registry/storage.cjs +1 -1
  223. package/dist/api/backend-registry/storage.cjs.map +1 -1
  224. package/dist/api/backend-registry/storage.js +38 -33
  225. package/dist/api/backend-registry/storage.js.map +1 -1
  226. package/dist/api/backend-registry/types.d.ts +2 -0
  227. package/dist/api/canvas-ui-client-tool.cjs +38 -0
  228. package/dist/api/canvas-ui-client-tool.cjs.map +1 -0
  229. package/dist/api/canvas-ui-client-tool.d.ts +14 -0
  230. package/dist/api/canvas-ui-client-tool.js +47 -0
  231. package/dist/api/canvas-ui-client-tool.js.map +1 -0
  232. package/dist/api/client-source.cjs +2 -0
  233. package/dist/api/client-source.cjs.map +1 -0
  234. package/dist/api/client-source.d.ts +9 -0
  235. package/dist/api/client-source.js +10 -0
  236. package/dist/api/client-source.js.map +1 -0
  237. package/dist/api/cloud/client.cjs +2 -0
  238. package/dist/api/cloud/client.cjs.map +1 -0
  239. package/dist/api/cloud/client.d.ts +4 -0
  240. package/dist/api/cloud/client.js +38 -0
  241. package/dist/api/cloud/client.js.map +1 -0
  242. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  243. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  244. package/dist/api/cloud/conversation-service.api.js +35 -33
  245. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  246. package/dist/api/cloud/organization-service.api.cjs +1 -1
  247. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  248. package/dist/api/cloud/organization-service.api.js +11 -10
  249. package/dist/api/cloud/organization-service.api.js.map +1 -1
  250. package/dist/api/cloud/proxy.cjs +1 -1
  251. package/dist/api/cloud/proxy.cjs.map +1 -1
  252. package/dist/api/cloud/proxy.d.ts +2 -40
  253. package/dist/api/cloud/proxy.js +14 -39
  254. package/dist/api/cloud/proxy.js.map +1 -1
  255. package/dist/api/conversation-metadata-store.cjs +1 -1
  256. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  257. package/dist/api/conversation-metadata-store.d.ts +2 -9
  258. package/dist/api/conversation-metadata-store.js +13 -9
  259. package/dist/api/conversation-metadata-store.js.map +1 -1
  260. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  261. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  262. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +2 -1
  263. package/dist/api/conversation-service/agent-server-conversation-service.api.js +98 -88
  264. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  265. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +5 -0
  266. package/dist/api/device-flow-client.cjs +1 -1
  267. package/dist/api/device-flow-client.cjs.map +1 -1
  268. package/dist/api/device-flow-client.d.ts +4 -58
  269. package/dist/api/device-flow-client.js +8 -98
  270. package/dist/api/device-flow-client.js.map +1 -1
  271. package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
  272. package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
  273. package/dist/api/git-service/agent-server-git-service.api.d.ts +10 -2
  274. package/dist/api/git-service/agent-server-git-service.api.js +107 -40
  275. package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
  276. package/dist/api/open-hands.types.d.ts +11 -0
  277. package/dist/api/option-service/option-service.api.cjs +1 -1
  278. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  279. package/dist/api/option-service/option-service.api.js +0 -1
  280. package/dist/api/option-service/option-service.api.js.map +1 -1
  281. package/dist/api/option-service/option.types.d.ts +0 -1
  282. package/dist/api/secrets-service.cjs +1 -1
  283. package/dist/api/secrets-service.cjs.map +1 -1
  284. package/dist/api/secrets-service.js +15 -14
  285. package/dist/api/secrets-service.js.map +1 -1
  286. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  287. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  288. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +73 -64
  289. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs +2 -2
  291. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs.map +1 -1
  292. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js +2 -0
  293. package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js.map +1 -1
  294. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  295. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  296. package/dist/components/features/backends/backend-form-modal.d.ts +4 -2
  297. package/dist/components/features/backends/backend-form-modal.js +108 -101
  298. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  299. package/dist/components/features/backends/backend-row.cjs +1 -1
  300. package/dist/components/features/backends/backend-row.cjs.map +1 -1
  301. package/dist/components/features/backends/backend-row.js +2 -1
  302. package/dist/components/features/backends/backend-row.js.map +1 -1
  303. package/dist/components/features/backends/backend-selector.cjs +1 -1
  304. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  305. package/dist/components/features/backends/backend-selector.js +51 -51
  306. package/dist/components/features/backends/backend-selector.js.map +1 -1
  307. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  308. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  309. package/dist/components/features/backends/device-flow-auth.d.ts +4 -1
  310. package/dist/components/features/backends/device-flow-auth.js +38 -38
  311. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  312. package/dist/components/features/chat/chat-interface.cjs +2 -2
  313. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  314. package/dist/components/features/chat/chat-interface.js +173 -165
  315. package/dist/components/features/chat/chat-interface.js.map +1 -1
  316. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  317. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  318. package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
  319. package/dist/components/features/chat/components/chat-input-actions.js +44 -43
  320. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  321. package/dist/components/features/chat/components/chat-input-container.cjs +1 -1
  322. package/dist/components/features/chat/components/chat-input-container.cjs.map +1 -1
  323. package/dist/components/features/chat/components/chat-input-container.d.ts +2 -1
  324. package/dist/components/features/chat/components/chat-input-container.js +20 -19
  325. package/dist/components/features/chat/components/chat-input-container.js.map +1 -1
  326. package/dist/components/features/chat/components/chat-input-profile-picker.cjs +1 -1
  327. package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -1
  328. package/dist/components/features/chat/components/chat-input-profile-picker.js +44 -32
  329. package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -1
  330. package/dist/components/features/chat/components/resolve-picker-kind.cjs +1 -1
  331. package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -1
  332. package/dist/components/features/chat/components/resolve-picker-kind.d.ts +10 -22
  333. package/dist/components/features/chat/components/resolve-picker-kind.js +6 -3
  334. package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -1
  335. package/dist/components/features/chat/custom-chat-input.cjs +1 -1
  336. package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
  337. package/dist/components/features/chat/custom-chat-input.d.ts +2 -1
  338. package/dist/components/features/chat/custom-chat-input.js +52 -51
  339. package/dist/components/features/chat/custom-chat-input.js.map +1 -1
  340. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  341. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  342. package/dist/components/features/chat/interactive-chat-box.d.ts +2 -1
  343. package/dist/components/features/chat/interactive-chat-box.js +9 -8
  344. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  345. package/dist/components/features/diff-viewer/commit-list.cjs +2 -0
  346. package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -0
  347. package/dist/components/features/diff-viewer/commit-list.d.ts +13 -0
  348. package/dist/components/features/diff-viewer/commit-list.js +27 -0
  349. package/dist/components/features/diff-viewer/commit-list.js.map +1 -0
  350. package/dist/components/features/diff-viewer/commit-row.cjs +2 -0
  351. package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -0
  352. package/dist/components/features/diff-viewer/commit-row.d.ts +14 -0
  353. package/dist/components/features/diff-viewer/commit-row.js +59 -0
  354. package/dist/components/features/diff-viewer/commit-row.js.map +1 -0
  355. package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
  356. package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
  357. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +7 -1
  358. package/dist/components/features/diff-viewer/file-diff-viewer.js +40 -39
  359. package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
  360. package/dist/components/features/plugins/plugin-detail-modal.d.ts +2 -1
  361. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  362. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  363. package/dist/components/providers/agent-server-ui-providers.d.ts +4 -2
  364. package/dist/components/providers/agent-server-ui-providers.js +9 -2
  365. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  366. package/dist/components/providers/index.cjs +1 -1
  367. package/dist/components/providers/index.d.ts +1 -2
  368. package/dist/components/providers/index.js +0 -1
  369. package/dist/components/providers/telemetry-provider.cjs +2 -0
  370. package/dist/components/providers/telemetry-provider.cjs.map +1 -0
  371. package/dist/components/providers/telemetry-provider.d.ts +6 -0
  372. package/dist/components/providers/telemetry-provider.js +64 -0
  373. package/dist/components/providers/telemetry-provider.js.map +1 -0
  374. package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
  375. package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
  376. package/dist/components/shared/modals/settings/settings-modal.js +23 -22
  377. package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
  378. package/dist/config/defaults.cjs +1 -1
  379. package/dist/config/defaults.cjs.map +1 -1
  380. package/dist/config/defaults.js +5 -4
  381. package/dist/config/defaults.js.map +1 -1
  382. package/dist/constants/acp-providers.cjs.map +1 -1
  383. package/dist/constants/acp-providers.d.ts +1 -1
  384. package/dist/constants/acp-providers.js.map +1 -1
  385. package/dist/constants/canvas-ui.cjs +2 -0
  386. package/dist/constants/canvas-ui.cjs.map +1 -0
  387. package/dist/constants/canvas-ui.d.ts +8 -0
  388. package/dist/constants/canvas-ui.js +6 -0
  389. package/dist/constants/canvas-ui.js.map +1 -0
  390. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  391. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  392. package/dist/contexts/conversation-websocket-context.js +197 -204
  393. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  394. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  395. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  396. package/dist/hooks/mutation/use-create-conversation.d.ts +2 -1
  397. package/dist/hooks/mutation/use-create-conversation.js +52 -52
  398. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  399. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  400. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  401. package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
  402. package/dist/hooks/mutation/use-save-settings.js +6 -5
  403. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  404. package/dist/hooks/query/query-keys.cjs +1 -1
  405. package/dist/hooks/query/query-keys.cjs.map +1 -1
  406. package/dist/hooks/query/query-keys.d.ts +2 -0
  407. package/dist/hooks/query/query-keys.js +4 -1
  408. package/dist/hooks/query/query-keys.js.map +1 -1
  409. package/dist/hooks/query/use-backends-health.cjs +1 -1
  410. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  411. package/dist/hooks/query/use-backends-health.js +50 -48
  412. package/dist/hooks/query/use-backends-health.js.map +1 -1
  413. package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
  414. package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
  415. package/dist/hooks/query/use-cloud-organizations.d.ts +1 -0
  416. package/dist/hooks/query/use-cloud-organizations.js +5 -2
  417. package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
  418. package/dist/hooks/query/use-commit-changes.cjs +2 -0
  419. package/dist/hooks/query/use-commit-changes.cjs.map +1 -0
  420. package/dist/hooks/query/use-commit-changes.d.ts +5 -0
  421. package/dist/hooks/query/use-commit-changes.js +34 -0
  422. package/dist/hooks/query/use-commit-changes.js.map +1 -0
  423. package/dist/hooks/query/use-task-polling.cjs +1 -1
  424. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  425. package/dist/hooks/query/use-task-polling.d.ts +3 -2
  426. package/dist/hooks/query/use-task-polling.js +53 -40
  427. package/dist/hooks/query/use-task-polling.js.map +1 -1
  428. package/dist/hooks/query/use-unified-git-commits.cjs +2 -0
  429. package/dist/hooks/query/use-unified-git-commits.cjs.map +1 -0
  430. package/dist/hooks/query/use-unified-git-commits.d.ts +10 -0
  431. package/dist/hooks/query/use-unified-git-commits.js +41 -0
  432. package/dist/hooks/query/use-unified-git-commits.js.map +1 -0
  433. package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
  434. package/dist/hooks/query/use-unified-git-diff.cjs.map +1 -1
  435. package/dist/hooks/query/use-unified-git-diff.d.ts +5 -0
  436. package/dist/hooks/query/use-unified-git-diff.js +11 -4
  437. package/dist/hooks/query/use-unified-git-diff.js.map +1 -1
  438. package/dist/hooks/use-acp-model-context.cjs +1 -1
  439. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  440. package/dist/hooks/use-acp-model-context.d.ts +4 -1
  441. package/dist/hooks/use-acp-model-context.js +9 -8
  442. package/dist/hooks/use-acp-model-context.js.map +1 -1
  443. package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
  444. package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
  445. package/dist/hooks/use-auto-refresh-files-on-edit.js +1 -1
  446. package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
  447. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
  448. package/dist/hooks/use-chat-input-model-state.d.ts +2 -1
  449. package/dist/hooks/use-chat-input-model-state.js.map +1 -1
  450. package/dist/hooks/use-chat-input-profile-state.cjs +1 -1
  451. package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -1
  452. package/dist/hooks/use-chat-input-profile-state.d.ts +1 -10
  453. package/dist/hooks/use-chat-input-profile-state.js +42 -15
  454. package/dist/hooks/use-chat-input-profile-state.js.map +1 -1
  455. package/dist/hooks/use-device-flow.cjs +1 -1
  456. package/dist/hooks/use-device-flow.cjs.map +1 -1
  457. package/dist/hooks/use-device-flow.d.ts +4 -1
  458. package/dist/hooks/use-device-flow.js +42 -40
  459. package/dist/hooks/use-device-flow.js.map +1 -1
  460. package/dist/hooks/use-telemetry.cjs +1 -1
  461. package/dist/hooks/use-telemetry.cjs.map +1 -1
  462. package/dist/hooks/use-telemetry.d.ts +3 -3
  463. package/dist/hooks/use-telemetry.js +16 -22
  464. package/dist/hooks/use-telemetry.js.map +1 -1
  465. package/dist/hooks/use-tracking.cjs +1 -1
  466. package/dist/hooks/use-tracking.cjs.map +1 -1
  467. package/dist/hooks/use-tracking.d.ts +5 -5
  468. package/dist/hooks/use-tracking.js +37 -37
  469. package/dist/hooks/use-tracking.js.map +1 -1
  470. package/dist/i18n/declaration.cjs +1 -1
  471. package/dist/i18n/declaration.cjs.map +1 -1
  472. package/dist/i18n/declaration.d.ts +9 -0
  473. package/dist/i18n/declaration.js +1 -1
  474. package/dist/i18n/declaration.js.map +1 -1
  475. package/dist/i18n/index.cjs +1 -1
  476. package/dist/i18n/index.cjs.map +1 -1
  477. package/dist/i18n/index.js +19 -18
  478. package/dist/i18n/index.js.map +1 -1
  479. package/dist/i18n/translation.cjs +2 -2
  480. package/dist/i18n/translation.cjs.map +1 -1
  481. package/dist/i18n/translation.js +153 -0
  482. package/dist/i18n/translation.js.map +1 -1
  483. package/dist/index.cjs +1 -1
  484. package/dist/index.js +32 -32
  485. package/dist/lib/index.cjs +1 -1
  486. package/dist/lib/index.d.ts +2 -2
  487. package/dist/lib/index.js +1 -1
  488. package/dist/locales/ar/openhands.json +9 -0
  489. package/dist/locales/ca/openhands.json +9 -0
  490. package/dist/locales/de/openhands.json +9 -0
  491. package/dist/locales/en/openhands.json +9 -0
  492. package/dist/locales/es/openhands.json +9 -0
  493. package/dist/locales/fr/openhands.json +9 -0
  494. package/dist/locales/it/openhands.json +9 -0
  495. package/dist/locales/ja/openhands.json +9 -0
  496. package/dist/locales/ko-KR/openhands.json +9 -0
  497. package/dist/locales/no/openhands.json +9 -0
  498. package/dist/locales/pt/openhands.json +9 -0
  499. package/dist/locales/tr/openhands.json +9 -0
  500. package/dist/locales/uk/openhands.json +9 -0
  501. package/dist/locales/zh-CN/openhands.json +9 -0
  502. package/dist/locales/zh-TW/openhands.json +9 -0
  503. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs +2 -0
  504. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs.map +1 -0
  505. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js +351 -0
  506. package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js.map +1 -0
  507. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs +2 -0
  508. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs.map +1 -0
  509. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js +106 -0
  510. package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js.map +1 -0
  511. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +2 -0
  512. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -0
  513. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +69 -0
  514. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -0
  515. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
  516. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +3 -0
  517. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  518. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  519. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +18 -2
  520. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  521. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
  522. package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
  523. package/dist/node_modules/axios/index.cjs +1 -1
  524. package/dist/node_modules/axios/index.js +1 -1
  525. package/dist/package.cjs +1 -1
  526. package/dist/package.cjs.map +1 -1
  527. package/dist/package.js +3 -3
  528. package/dist/package.js.map +1 -1
  529. package/dist/routes/app-settings.cjs +1 -1
  530. package/dist/routes/app-settings.cjs.map +1 -1
  531. package/dist/routes/app-settings.js +59 -60
  532. package/dist/routes/app-settings.js.map +1 -1
  533. package/dist/routes/commits-tab.cjs +2 -0
  534. package/dist/routes/commits-tab.cjs.map +1 -0
  535. package/dist/routes/commits-tab.d.ts +8 -0
  536. package/dist/routes/commits-tab.js +45 -0
  537. package/dist/routes/commits-tab.js.map +1 -0
  538. package/dist/routes/files-tab.cjs +1 -1
  539. package/dist/routes/files-tab.cjs.map +1 -1
  540. package/dist/routes/files-tab.js +148 -127
  541. package/dist/routes/files-tab.js.map +1 -1
  542. package/dist/routes/llm-settings.cjs +1 -1
  543. package/dist/routes/llm-settings.cjs.map +1 -1
  544. package/dist/routes/llm-settings.js +4 -1
  545. package/dist/routes/llm-settings.js.map +1 -1
  546. package/dist/services/cloud-funnel-analytics.cjs +2 -0
  547. package/dist/services/cloud-funnel-analytics.cjs.map +1 -0
  548. package/dist/services/cloud-funnel-analytics.d.ts +4 -0
  549. package/dist/services/cloud-funnel-analytics.js +39 -0
  550. package/dist/services/cloud-funnel-analytics.js.map +1 -0
  551. package/dist/services/telemetry.cjs +1 -1
  552. package/dist/services/telemetry.cjs.map +1 -1
  553. package/dist/services/telemetry.d.ts +46 -9
  554. package/dist/services/telemetry.js +182 -71
  555. package/dist/services/telemetry.js.map +1 -1
  556. package/dist/themes/color-themes.cjs.map +1 -1
  557. package/dist/themes/color-themes.d.ts +3 -6
  558. package/dist/themes/color-themes.js.map +1 -1
  559. package/dist/types/agent-server/core/base/action.d.ts +5 -4
  560. package/dist/types/agent-server/core/base/base.d.ts +3 -2
  561. package/dist/types/agent-server/core/base/observation.d.ts +1 -1
  562. package/dist/types/agent-server/type-guards.cjs +1 -1
  563. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  564. package/dist/types/agent-server/type-guards.d.ts +3 -5
  565. package/dist/types/agent-server/type-guards.js +2 -1
  566. package/dist/types/agent-server/type-guards.js.map +1 -1
  567. package/dist/types/automation.d.ts +5 -0
  568. package/dist/utils/api-error-message.d.ts +11 -0
  569. package/dist/utils/automation-timeout.d.ts +19 -0
  570. package/dist/utils/base-path.cjs +2 -0
  571. package/dist/utils/base-path.cjs.map +1 -0
  572. package/dist/utils/base-path.d.ts +2 -0
  573. package/dist/utils/base-path.js +23 -0
  574. package/dist/utils/base-path.js.map +1 -0
  575. package/dist/utils/error-handler.cjs +1 -1
  576. package/dist/utils/error-handler.cjs.map +1 -1
  577. package/dist/utils/error-handler.d.ts +1 -4
  578. package/dist/utils/error-handler.js +6 -7
  579. package/dist/utils/error-handler.js.map +1 -1
  580. package/dist/utils/map-provider.cjs +1 -1
  581. package/dist/utils/map-provider.cjs.map +1 -1
  582. package/dist/utils/map-provider.d.ts +1 -0
  583. package/dist/utils/map-provider.js +2 -1
  584. package/dist/utils/map-provider.js.map +1 -1
  585. package/package.json +3 -3
  586. package/scripts/check-sdk-version-sync.mjs +6 -6
  587. package/scripts/dev-safe.mjs +7 -8
  588. package/scripts/dev-static.mjs +3 -0
  589. package/scripts/dev-with-automation.mjs +3 -0
  590. package/scripts/docker-build.mjs +4 -0
  591. package/scripts/static-server.mjs +93 -7
  592. package/tools/canvas_ui_tool.py +14 -8
  593. package/build/assets/active-backend-context-hxq31W25.js +0 -1
  594. package/build/assets/agent-server-client-options-DVLRd9sw.js +0 -1
  595. package/build/assets/agent-server-conversation-service.api-CuSdr4Qb.js +0 -5
  596. package/build/assets/agent-settings-D_yOy8XB.js +0 -1
  597. package/build/assets/api-key-entry-screen-Dl0qVYi4.js +0 -1
  598. package/build/assets/app-settings-yVizGXox.js +0 -1
  599. package/build/assets/automation-detail-dvJfLs5u.js +0 -2
  600. package/build/assets/automation-export-BPcgLqPD.js +0 -2
  601. package/build/assets/automations-list-CUXogTe0.js +0 -1
  602. package/build/assets/backend-form-modal-CQJGmItq.js +0 -1
  603. package/build/assets/check-Bvi71siz.js +0 -1
  604. package/build/assets/condenser-settings-Ca8fYZ_Z.js +0 -1
  605. package/build/assets/conversation-9NBSRoR9.js +0 -1
  606. package/build/assets/conversation-BXg6Oti2.js +0 -89
  607. package/build/assets/conversation-panel-CZri9Rup.js +0 -1
  608. package/build/assets/conversation-service.api-DPBQvTKD.js +0 -1
  609. package/build/assets/declaration-gq8V5eTU.js +0 -1
  610. package/build/assets/files-tab-UVoray88.js +0 -1
  611. package/build/assets/git-provider-icon-o6hdnJUB.js +0 -1
  612. package/build/assets/handle-capture-consent-CPMXU29K.js +0 -1
  613. package/build/assets/home-D1IHvGTN.js +0 -1
  614. package/build/assets/index-redirect-CUUJiNki.js +0 -1
  615. package/build/assets/install-server-modal-BbuQaA2w.js +0 -1
  616. package/build/assets/lesson-plan-jC0HBoe6.js +0 -4
  617. package/build/assets/llm-not-configured-banner-DoARbcdL.js +0 -27
  618. package/build/assets/llm-settings-4JMLV8mq.js +0 -1
  619. package/build/assets/llm-settings-D91gMw3U.js +0 -1
  620. package/build/assets/llm-subscription-service-CKyaV24y.js +0 -1
  621. package/build/assets/loader-circle-BEykUKYG.js +0 -1
  622. package/build/assets/manage-backends-modal-DkWAMSle.js +0 -1
  623. package/build/assets/manifest-aa5c29f6.js +0 -1
  624. package/build/assets/model-selector-BfqpMkSJ.js +0 -1
  625. package/build/assets/mouse-pointer-click-PdEQPL6v.js +0 -1
  626. package/build/assets/onboarding-Bu-HN1ze.js +0 -1
  627. package/build/assets/onboarding-modal-CZgjs5Bx.js +0 -1
  628. package/build/assets/option-service.api-BrZ5q87N.js +0 -1
  629. package/build/assets/organization-service.api-Bk4pCGU1.js +0 -1
  630. package/build/assets/path-utils-CSmuZoix.js +0 -1
  631. package/build/assets/plugins-management-service-BRBLxvUl.js +0 -1
  632. package/build/assets/profiles-service.api-BMXQ9pZC.js +0 -1
  633. package/build/assets/providers-BpO967xS.js +0 -1
  634. package/build/assets/proxy-BgJLtxu7.js +0 -1
  635. package/build/assets/root-BM5WgQ4_.js +0 -2
  636. package/build/assets/root-V8fkplMy.css +0 -1
  637. package/build/assets/root-layout-BdoyoobY.js +0 -2
  638. package/build/assets/schema-field-BSHrUMme.js +0 -1
  639. package/build/assets/sdk-section-page-t82gsOqa.js +0 -1
  640. package/build/assets/search-4DHskuhE.js +0 -1
  641. package/build/assets/secrets-service-B2GqPV0N.js +0 -1
  642. package/build/assets/settings-DmPLkgq0.js +0 -1
  643. package/build/assets/settings-modal-CwrZKrTq.js +0 -1
  644. package/build/assets/settings-service.api-Ce-ub11I.js +0 -1
  645. package/build/assets/shared-conversation-BDREQPnE.js +0 -1
  646. package/build/assets/skills-plugins-2Y44YHbO.js +0 -1
  647. package/build/assets/use-acp-credential-form-MzZM6D7D.js +0 -1
  648. package/build/assets/use-agent-profiles-DwZxnwO5.js +0 -1
  649. package/build/assets/use-backends-health-CRHzuvxO.js +0 -1
  650. package/build/assets/use-cloud-current-user-id-utFreJ0i.js +0 -1
  651. package/build/assets/use-config-mJrtZHP1.js +0 -1
  652. package/build/assets/use-create-conversation-DdqsP78F.js +0 -1
  653. package/build/assets/use-is-authed-B6M0mcGL.js +0 -1
  654. package/build/assets/use-llm-profiles-RC-PkpBl.js +0 -1
  655. package/build/assets/use-plugins-marketplace-FHlbeQ4c.js +0 -1
  656. package/build/assets/use-runtime-is-ready-RKj2WmEh.js +0 -1
  657. package/build/assets/use-save-agent-profile-tvDP15mh.js +0 -1
  658. package/build/assets/use-save-settings-BGlSfuYn.js +0 -1
  659. package/build/assets/use-settings-CH5LzXD8.js +0 -1
  660. package/build/assets/use-settings-nav-items-Dwktv8wo.js +0 -16
  661. package/build/assets/use-skills-CSzSL6HG.js +0 -1
  662. package/build/assets/use-tracking-BIXzagSI.js +0 -1
  663. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lf310vj7-CSVPGId3.js +0 -10
  664. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js +0 -177
  665. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jewnulst-C57fm7C-.js +0 -1
  666. package/build/assets/vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js +0 -2
  667. package/build/assets/x-Cb0WAtak.js +0 -1
  668. package/dist/components/providers/posthog-wrapper.cjs +0 -2
  669. package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
  670. package/dist/components/providers/posthog-wrapper.d.ts +0 -4
  671. package/dist/components/providers/posthog-wrapper.js +0 -49
  672. package/dist/components/providers/posthog-wrapper.js.map +0 -1
  673. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
  674. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
  675. package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
  676. package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
  677. package/dist/utils/handle-capture-consent.cjs +0 -2
  678. package/dist/utils/handle-capture-consent.cjs.map +0 -1
  679. package/dist/utils/handle-capture-consent.d.ts +0 -7
  680. package/dist/utils/handle-capture-consent.js +0 -8
  681. package/dist/utils/handle-capture-consent.js.map +0 -1
  682. /package/build/assets/{__vite-browser-external-4xJsU2-u.js → __vite-browser-external-BQUj0sYu.js} +0 -0
  683. /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
  684. /package/build/assets/{automation-BU8zu-FP.js → automation-LZB0MjdV.js} +0 -0
  685. /package/build/assets/{close-p3Op5lxI.js → close-DLFb5kfv.js} +0 -0
  686. /package/build/assets/{common-Dh7OqABE.js → common-CxbUL3nR.js} +0 -0
  687. /package/build/assets/{createLucideIcon-CVAsW2Yo.js → createLucideIcon-D4Tak8A1.js} +0 -0
  688. /package/build/assets/{folder-mMWFvaw0.js → folder-Bk311brm.js} +0 -0
  689. /package/build/assets/{get-language-from-path-CPNnuVhI.js → get-language-from-path-DBqBsCWH.js} +0 -0
  690. /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-DnL9OC8_.js} +0 -0
  691. /package/build/assets/{iconBase-DaTRRUjy.js → iconBase-Dz51Zn5x.js} +0 -0
  692. /package/build/assets/{link-external-DfKQroKX.js → link-external-CaBmUEs_.js} +0 -0
  693. /package/build/assets/{search-BsjCEFNf.js → search-BgOCR7_c.js} +0 -0
  694. /package/build/assets/{settings-like-page-layout-classes-DENKlZpD.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
  695. /package/build/assets/{skills-9cDZONKh.js → skills-EqzxYBvT.js} +0 -0
  696. /package/build/assets/{terminal-BuLtIrb9.js → terminal-Cgf___rK.js} +0 -0
  697. /package/build/assets/{u-check-circle-half-LiwZkuFe.js → u-check-circle-half-MsShT8Ec.js} +0 -0
  698. /package/build/assets/{u-edit-DJ90xc8Z.js → u-edit-DL5LgKon.js} +0 -0
  699. /package/build/assets/{use-breakpoint-B-O0lQ84.js → use-breakpoint-BP3lqLMx.js} +0 -0
  700. /package/build/assets/{use-click-outside-element-Bf4Omzot.js → use-click-outside-element-D9BYdANT.js} +0 -0
  701. /package/build/assets/{use-launch-skill-in-chat-BnoDgvAy.js → use-launch-skill-in-chat-DJWEfVc5.js} +0 -0
  702. /package/build/assets/{vendor~browser-Dqd33JyP.js → vendor~browser-By2MVv_N.js} +0 -0
  703. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
  704. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js} +0 -0
  705. /package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js} +0 -0
  706. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +0 -0
  707. /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
  708. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
  709. /package/build/assets/{vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
  710. /package/build/assets/{vendor~terminal-aeP3PnKf.js → vendor~terminal-CnKZILnC.js} +0 -0
@@ -1,10 +1,11 @@
1
1
  import { getActiveBackend as e } from "../backend-registry/active-store.js";
2
2
  import { callCloudProxy as t } from "./proxy.js";
3
- import { getStoredConversationMetadata as n } from "../conversation-metadata-store.js";
3
+ import { AGENT_CANVAS_CLIENT_HEADERS as n } from "../client-source.js";
4
+ import { getStoredConversationMetadata as r } from "../conversation-metadata-store.js";
4
5
  //#region src/api/cloud/conversation-service.api.ts
5
- function r(e) {
6
+ function i(e) {
6
7
  if (!e?.id) return e;
7
- let t = n(e.id);
8
+ let t = r(e.id);
8
9
  return t ? {
9
10
  ...e,
10
11
  selected_repository: e.selected_repository ?? t.selected_repository ?? null,
@@ -13,89 +14,90 @@ function r(e) {
13
14
  selected_workspace: e.selected_workspace ?? t.selected_workspace ?? null
14
15
  } : e;
15
16
  }
16
- function i() {
17
+ function a() {
17
18
  let t = e().backend;
18
19
  if (t.kind !== "cloud") throw Error("Cloud conversations call requires a cloud backend.");
19
20
  return t;
20
21
  }
21
- async function a(e = 20, n) {
22
- let a = i(), o = new URLSearchParams();
22
+ async function o(e = 20, n) {
23
+ let r = a(), o = new URLSearchParams();
23
24
  o.set("limit", String(e)), n && o.set("page_id", n), o.set("sort_order", "UPDATED_AT_DESC");
24
25
  let s = await t({
25
- backend: a,
26
+ backend: r,
26
27
  method: "GET",
27
28
  path: `/api/v1/app-conversations/search?${o.toString()}`
28
29
  });
29
30
  return {
30
- items: (s?.items ?? []).map((e) => r(e)),
31
+ items: (s?.items ?? []).map((e) => i(e)),
31
32
  next_page_id: s?.next_page_id ?? null
32
33
  };
33
34
  }
34
- async function o(e) {
35
+ async function s(e) {
35
36
  if (e.length === 0) return [];
36
- let n = i(), a = new URLSearchParams();
37
- for (let t of e) a.append("ids", t);
37
+ let n = a(), r = new URLSearchParams();
38
+ for (let t of e) r.append("ids", t);
38
39
  return (await t({
39
40
  backend: n,
40
41
  method: "GET",
41
- path: `/api/v1/app-conversations?${a.toString()}`
42
- }) ?? []).map(r);
42
+ path: `/api/v1/app-conversations?${r.toString()}`
43
+ }) ?? []).map(i);
43
44
  }
44
- async function s(e) {
45
+ async function c(e) {
45
46
  return await t({
46
- backend: i(),
47
+ backend: a(),
47
48
  method: "POST",
48
49
  path: "/api/v1/app-conversations",
49
- body: e
50
+ body: e,
51
+ headers: n
50
52
  });
51
53
  }
52
- async function c(e) {
54
+ async function l(e) {
53
55
  return t({
54
- backend: i(),
56
+ backend: a(),
55
57
  method: "GET",
56
58
  path: `/api/v1/app-conversations/${e}/download`,
57
59
  responseType: "blob"
58
60
  });
59
61
  }
60
- async function l(e) {
62
+ async function u(e) {
61
63
  await t({
62
- backend: i(),
64
+ backend: a(),
63
65
  method: "DELETE",
64
66
  path: `/api/v1/app-conversations/${e}`
65
67
  });
66
68
  }
67
- async function u(e, n) {
69
+ async function d(e, n) {
68
70
  return await t({
69
- backend: i(),
71
+ backend: a(),
70
72
  method: "PATCH",
71
73
  path: `/api/v1/app-conversations/${e}`,
72
74
  body: { public: n }
73
75
  });
74
76
  }
75
- async function d(e) {
77
+ async function f(e) {
76
78
  await t({
77
- backend: i(),
79
+ backend: a(),
78
80
  method: "POST",
79
81
  path: `/api/v1/sandboxes/${e}/pause`
80
82
  });
81
83
  }
82
- async function f(e) {
84
+ async function p(e) {
83
85
  await t({
84
- backend: i(),
86
+ backend: a(),
85
87
  method: "POST",
86
88
  path: `/api/v1/sandboxes/${e}/resume`
87
89
  });
88
90
  }
89
- async function p(e, n) {
90
- let r = i(), a = new URLSearchParams();
91
- return a.append("file_path", n), await t({
91
+ async function m(e, n) {
92
+ let r = a(), i = new URLSearchParams();
93
+ return i.append("file_path", n), await t({
92
94
  backend: r,
93
95
  method: "GET",
94
- path: `/api/v1/app-conversations/${e}/file?${a.toString()}`
96
+ path: `/api/v1/app-conversations/${e}/file?${i.toString()}`
95
97
  }) ?? "";
96
98
  }
97
- async function m(e) {
98
- let n = i(), r = new URLSearchParams();
99
+ async function h(e) {
100
+ let n = a(), r = new URLSearchParams();
99
101
  return r.set("ids", e), (await t({
100
102
  backend: n,
101
103
  method: "GET",
@@ -103,6 +105,6 @@ async function m(e) {
103
105
  }))?.[0] ?? null;
104
106
  }
105
107
  //#endregion
106
- export { o as batchGetCloudConversations, s as createCloudAppConversation, l as deleteCloudConversation, c as downloadCloudConversation, m as getCloudAppConversationStartTask, d as pauseCloudSandbox, p as readCloudConversationFile, f as resumeCloudSandbox, a as searchCloudConversations, u as updateCloudConversationPublicFlag };
108
+ export { s as batchGetCloudConversations, c as createCloudAppConversation, u as deleteCloudConversation, l as downloadCloudConversation, h as getCloudAppConversationStartTask, f as pauseCloudSandbox, m as readCloudConversationFile, p as resumeCloudSandbox, o as searchCloudConversations, d as updateCloudConversationPublicFlag };
107
109
 
108
110
  //# sourceMappingURL=conversation-service.api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-service.api.js","names":[],"sources":["../../../src/api/cloud/conversation-service.api.ts"],"sourcesContent":["import { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { getStoredConversationMetadata } from \"../conversation-metadata-store\";\nimport type {\n AppConversation,\n AppConversationPage,\n AppConversationStartRequest,\n AppConversationStartTask,\n} from \"../conversation-service/agent-server-conversation-service.types\";\nimport { callCloudProxy } from \"./proxy\";\n\n/**\n * The cloud backend does not always echo `selected_repository` /\n * `selected_branch` / `git_provider` back from\n * `GET /api/v1/app-conversations` until its own background hydration\n * completes. We persist the selection to local storage at connect time\n * (see `AgentServerConversationService.updateConversationRepository`)\n * and overlay it here so the chat-page git control bar reflects the\n * connection immediately, instead of snapping back to the empty\n * \"Connect Repo\" state on every refetch.\n *\n * Server values take precedence whenever they're populated; the\n * local-storage fallback only fills in fields the server returned as\n * `null`/`undefined`.\n */\nfunction overlayStoredRepoSelection(\n conversation: AppConversation | null,\n): AppConversation | null {\n if (!conversation?.id) return conversation;\n const stored = getStoredConversationMetadata(conversation.id);\n if (!stored) return conversation;\n\n return {\n ...conversation,\n selected_repository:\n conversation.selected_repository ?? stored.selected_repository ?? null,\n selected_branch:\n conversation.selected_branch ?? stored.selected_branch ?? null,\n git_provider: conversation.git_provider ?? stored.git_provider ?? null,\n selected_workspace:\n conversation.selected_workspace ?? stored.selected_workspace ?? null,\n };\n}\n\nfunction getActiveCloudBackend(): Backend {\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\"Cloud conversations call requires a cloud backend.\");\n }\n return active;\n}\n\n/**\n * Search the cloud app-conversations list. Mirrors the local\n * `AgentServerConversationService.searchConversations` interface but calls\n * the cloud endpoint `/api/v1/app-conversations/search`.\n */\nexport async function searchCloudConversations(\n limit: number = 20,\n pageId?: string,\n): Promise<AppConversationPage> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.set(\"limit\", String(limit));\n if (pageId) params.set(\"page_id\", pageId);\n params.set(\"sort_order\", \"UPDATED_AT_DESC\");\n\n const data = await callCloudProxy<{\n items: AppConversation[];\n next_page_id: string | null;\n }>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/search?${params.toString()}`,\n });\n\n return {\n items: (data?.items ?? []).map(\n (item) => overlayStoredRepoSelection(item) as AppConversation,\n ),\n next_page_id: data?.next_page_id ?? null,\n };\n}\n\n/**\n * Batch-fetch cloud app-conversations by id. Mirrors the local\n * `AgentServerConversationService.batchGetAppConversations` interface.\n */\nexport async function batchGetCloudConversations(\n ids: string[],\n): Promise<(AppConversation | null)[]> {\n if (ids.length === 0) return [];\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n for (const id of ids) params.append(\"ids\", id);\n const data = await callCloudProxy<(AppConversation | null)[]>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations?${params.toString()}`,\n });\n return (data ?? []).map(overlayStoredRepoSelection);\n}\n\n/**\n * Create a v1 app-conversation on the cloud backend.\n *\n * Mirrors OpenHands' cloud flow: POST /api/v1/app-conversations with the\n * `AppConversationStartRequest` payload, returning a\n * `AppConversationStartTask`. The task is initially WORKING; the caller\n * polls `getCloudAppConversationStartTask` (3s cadence per OpenHands)\n * until status is READY (then `app_conversation_id`, `agent_server_url`,\n * and `session_api_key` are populated) or ERROR.\n *\n * This path does NOT use encrypted-settings round-tripping. Secrets stay\n * server-side on the cloud backend — the only auth carried is the cloud bearer\n * token, and the conversation runtime is\n * provisioned with its own ephemeral session_api_key returned in the\n * task.\n */\nexport async function createCloudAppConversation(\n request: AppConversationStartRequest,\n): Promise<AppConversationStartTask> {\n const backend = getActiveCloudBackend();\n const data = await callCloudProxy<AppConversationStartTask>({\n backend,\n method: \"POST\",\n path: \"/api/v1/app-conversations\",\n body: request as unknown as Record<string, unknown>,\n });\n return data;\n}\n\n/**\n * Download a v1 app-conversation as a ZIP from the cloud backend. Mirrors\n * the local `AgentServerConversationService.downloadConversation` interface but\n * calls\n * `GET /api/v1/app-conversations/{id}/download`, which returns\n * `application/zip` with `Content-Disposition` set by the cloud backend.\n */\nexport async function downloadCloudConversation(\n conversationId: string,\n): Promise<Blob> {\n const backend = getActiveCloudBackend();\n return callCloudProxy<Blob>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/${conversationId}/download`,\n responseType: \"blob\",\n });\n}\n\n/**\n * Delete a v1 app-conversation on the cloud backend. Mirrors the local\n * `AgentServerConversationService.deleteConversation` interface but calls\n * `DELETE /api/v1/app-conversations/{id}`, which returns a JSON\n * `Success` envelope (discarded here — the caller only needs to know\n * the request didn't error).\n */\nexport async function deleteCloudConversation(\n conversationId: string,\n): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"DELETE\",\n path: `/api/v1/app-conversations/${conversationId}`,\n });\n}\n\n/**\n * Toggle the public-sharing flag on a cloud v1 app-conversation. Mirrors\n * OpenHands' `AgentServerConversationService.updateConversationPublicFlag`:\n * `PATCH /api/v1/app-conversations/{id}` with `{ public }`, returning\n * the updated conversation.\n */\nexport async function updateCloudConversationPublicFlag(\n conversationId: string,\n isPublic: boolean,\n): Promise<AppConversation> {\n const backend = getActiveCloudBackend();\n const data = await callCloudProxy<AppConversation>({\n backend,\n method: \"PATCH\",\n path: `/api/v1/app-conversations/${conversationId}`,\n body: { public: isPublic },\n });\n return data;\n}\n\n/**\n * Pause the cloud sandbox backing a v1 app-conversation. Mirrors\n * OpenHands' `SandboxService.pauseSandbox`:\n * `POST /api/v1/sandboxes/{sandboxId}/pause` on the cloud backend, which stops\n * the runtime owning the conversation.\n */\nexport async function pauseCloudSandbox(sandboxId: string): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"POST\",\n path: `/api/v1/sandboxes/${sandboxId}/pause`,\n });\n}\n\n/**\n * Resume a paused cloud sandbox. Mirrors OpenHands' `SandboxService.resumeSandbox`\n * by calling `POST /api/v1/sandboxes/{sandboxId}/resume` on the SaaS.\n *\n * This is the correct endpoint for waking a PAUSED sandbox. It is a\n * lightweight unpause — NOT the same as creating a new start task via\n * `POST /api/v1/app-conversations`, which provisions a fresh conversation\n * and is subject to the 120-second sandbox-start timeout.\n */\nexport async function resumeCloudSandbox(sandboxId: string): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"POST\",\n path: `/api/v1/sandboxes/${sandboxId}/resume`,\n });\n}\n\n/**\n * Read a file from a cloud conversation's sandbox workspace. Mirrors\n * OpenHands' `AgentServerConversationService.readConversationFile` — hits\n * `GET /api/v1/app-conversations/{id}/file?file_path=...` on the cloud backend\n * and returns the file content as a string.\n */\nexport async function readCloudConversationFile(\n conversationId: string,\n filePath: string,\n): Promise<string> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.append(\"file_path\", filePath);\n const data = await callCloudProxy<string>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/${conversationId}/file?${params.toString()}`,\n });\n return data ?? \"\";\n}\n\n/**\n * Fetch a single v1 app-conversation start task. Mirrors OpenHands'\n * `AgentServerConversationService.getStartTask` — uses the batch search endpoint\n * with a single id and unwraps the first result.\n */\nexport async function getCloudAppConversationStartTask(\n taskId: string,\n): Promise<AppConversationStartTask | null> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.set(\"ids\", taskId);\n const data = await callCloudProxy<(AppConversationStartTask | null)[]>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/start-tasks?${params.toString()}`,\n });\n return data?.[0] ?? null;\n}\n"],"mappings":";;;;AAyBA,SAAS,EACP,GACwB;AACxB,KAAI,CAAC,GAAc,GAAI,QAAO;CAC9B,IAAM,IAAS,EAA8B,EAAa,GAAG;AAG7D,QAFK,IAEE;EACL,GAAG;EACH,qBACE,EAAa,uBAAuB,EAAO,uBAAuB;EACpE,iBACE,EAAa,mBAAmB,EAAO,mBAAmB;EAC5D,cAAc,EAAa,gBAAgB,EAAO,gBAAgB;EAClE,oBACE,EAAa,sBAAsB,EAAO,sBAAsB;EACnE,GAXmB;;AActB,SAAS,IAAiC;CACxC,IAAM,IAAS,GAAkB,CAAC;AAClC,KAAI,EAAO,SAAS,QAClB,OAAU,MAAM,qDAAqD;AAEvE,QAAO;;AAQT,eAAsB,EACpB,IAAgB,IAChB,GAC8B;CAC9B,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAGpC,CAFA,EAAO,IAAI,SAAS,OAAO,EAAM,CAAC,EAC9B,KAAQ,EAAO,IAAI,WAAW,EAAO,EACzC,EAAO,IAAI,cAAc,kBAAkB;CAE3C,IAAM,IAAO,MAAM,EAGhB;EACD;EACA,QAAQ;EACR,MAAM,oCAAoC,EAAO,UAAU;EAC5D,CAAC;AAEF,QAAO;EACL,QAAQ,GAAM,SAAS,EAAE,EAAE,KACxB,MAAS,EAA2B,EAAK,CAC3C;EACD,cAAc,GAAM,gBAAgB;EACrC;;AAOH,eAAsB,EACpB,GACqC;AACrC,KAAI,EAAI,WAAW,EAAG,QAAO,EAAE;CAC/B,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AACpC,MAAK,IAAM,KAAM,EAAK,GAAO,OAAO,OAAO,EAAG;AAM9C,SAAQ,MALW,EAA2C;EAC5D;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAO,UAAU;EACrD,CAAC,IACc,EAAE,EAAE,IAAI,EAA2B;;AAmBrD,eAAsB,EACpB,GACmC;AAQnC,QAAO,MANY,EAAyC;EAC1D,SAFc,GAEd;EACA,QAAQ;EACR,MAAM;EACN,MAAM;EACP,CAAC;;AAWJ,eAAsB,EACpB,GACe;AAEf,QAAO,EAAqB;EAC1B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAe;EAClD,cAAc;EACf,CAAC;;AAUJ,eAAsB,EACpB,GACe;AAEf,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B;EACpC,CAAC;;AASJ,eAAsB,EACpB,GACA,GAC0B;AAQ1B,QAAO,MANY,EAAgC;EACjD,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B;EACnC,MAAM,EAAE,QAAQ,GAAU;EAC3B,CAAC;;AAUJ,eAAsB,EAAkB,GAAkC;AAExE,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,qBAAqB,EAAU;EACtC,CAAC;;AAYJ,eAAsB,EAAmB,GAAkC;AAEzE,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,qBAAqB,EAAU;EACtC,CAAC;;AASJ,eAAsB,EACpB,GACA,GACiB;CACjB,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAOpC,QANA,EAAO,OAAO,aAAa,EAAS,EAM7B,MALY,EAAuB;EACxC;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAe,QAAQ,EAAO,UAAU;EAC5E,CAAC,IACa;;AAQjB,eAAsB,EACpB,GAC0C;CAC1C,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAOpC,QANA,EAAO,IAAI,OAAO,EAAO,GAMlB,MALY,EAAoD;EACrE;EACA,QAAQ;EACR,MAAM,yCAAyC,EAAO,UAAU;EACjE,CAAC,IACY,MAAM"}
1
+ {"version":3,"file":"conversation-service.api.js","names":[],"sources":["../../../src/api/cloud/conversation-service.api.ts"],"sourcesContent":["import { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { getStoredConversationMetadata } from \"../conversation-metadata-store\";\nimport type {\n AppConversation,\n AppConversationPage,\n AppConversationStartRequest,\n AppConversationStartTask,\n} from \"../conversation-service/agent-server-conversation-service.types\";\nimport { AGENT_CANVAS_CLIENT_HEADERS } from \"../client-source\";\nimport { callCloudProxy } from \"./proxy\";\n\n/**\n * The cloud backend does not always echo `selected_repository` /\n * `selected_branch` / `git_provider` back from\n * `GET /api/v1/app-conversations` until its own background hydration\n * completes. We persist the selection to local storage at connect time\n * (see `AgentServerConversationService.updateConversationRepository`)\n * and overlay it here so the chat-page git control bar reflects the\n * connection immediately, instead of snapping back to the empty\n * \"Connect Repo\" state on every refetch.\n *\n * Server values take precedence whenever they're populated; the\n * local-storage fallback only fills in fields the server returned as\n * `null`/`undefined`.\n */\nfunction overlayStoredRepoSelection(\n conversation: AppConversation | null,\n): AppConversation | null {\n if (!conversation?.id) return conversation;\n const stored = getStoredConversationMetadata(conversation.id);\n if (!stored) return conversation;\n\n return {\n ...conversation,\n selected_repository:\n conversation.selected_repository ?? stored.selected_repository ?? null,\n selected_branch:\n conversation.selected_branch ?? stored.selected_branch ?? null,\n git_provider: conversation.git_provider ?? stored.git_provider ?? null,\n selected_workspace:\n conversation.selected_workspace ?? stored.selected_workspace ?? null,\n };\n}\n\nfunction getActiveCloudBackend(): Backend {\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\"Cloud conversations call requires a cloud backend.\");\n }\n return active;\n}\n\n/**\n * Search the cloud app-conversations list. Mirrors the local\n * `AgentServerConversationService.searchConversations` interface but calls\n * the cloud endpoint `/api/v1/app-conversations/search`.\n */\nexport async function searchCloudConversations(\n limit: number = 20,\n pageId?: string,\n): Promise<AppConversationPage> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.set(\"limit\", String(limit));\n if (pageId) params.set(\"page_id\", pageId);\n params.set(\"sort_order\", \"UPDATED_AT_DESC\");\n\n const data = await callCloudProxy<{\n items: AppConversation[];\n next_page_id: string | null;\n }>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/search?${params.toString()}`,\n });\n\n return {\n items: (data?.items ?? []).map(\n (item) => overlayStoredRepoSelection(item) as AppConversation,\n ),\n next_page_id: data?.next_page_id ?? null,\n };\n}\n\n/**\n * Batch-fetch cloud app-conversations by id. Mirrors the local\n * `AgentServerConversationService.batchGetAppConversations` interface.\n */\nexport async function batchGetCloudConversations(\n ids: string[],\n): Promise<(AppConversation | null)[]> {\n if (ids.length === 0) return [];\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n for (const id of ids) params.append(\"ids\", id);\n const data = await callCloudProxy<(AppConversation | null)[]>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations?${params.toString()}`,\n });\n return (data ?? []).map(overlayStoredRepoSelection);\n}\n\n/**\n * Create a v1 app-conversation on the cloud backend.\n *\n * Mirrors OpenHands' cloud flow: POST /api/v1/app-conversations with the\n * `AppConversationStartRequest` payload, returning a\n * `AppConversationStartTask`. The task is initially WORKING; the caller\n * polls `getCloudAppConversationStartTask` (3s cadence per OpenHands)\n * until status is READY (then `app_conversation_id`, `agent_server_url`,\n * and `session_api_key` are populated) or ERROR.\n *\n * This path does NOT use encrypted-settings round-tripping. Secrets stay\n * server-side on the cloud backend — the only auth carried is the cloud bearer\n * token, and the conversation runtime is\n * provisioned with its own ephemeral session_api_key returned in the\n * task.\n */\nexport async function createCloudAppConversation(\n request: AppConversationStartRequest,\n): Promise<AppConversationStartTask> {\n const backend = getActiveCloudBackend();\n const data = await callCloudProxy<AppConversationStartTask>({\n backend,\n method: \"POST\",\n path: \"/api/v1/app-conversations\",\n body: request as unknown as Record<string, unknown>,\n headers: AGENT_CANVAS_CLIENT_HEADERS,\n });\n return data;\n}\n\n/**\n * Download a v1 app-conversation as a ZIP from the cloud backend. Mirrors\n * the local `AgentServerConversationService.downloadConversation` interface but\n * calls\n * `GET /api/v1/app-conversations/{id}/download`, which returns\n * `application/zip` with `Content-Disposition` set by the cloud backend.\n */\nexport async function downloadCloudConversation(\n conversationId: string,\n): Promise<Blob> {\n const backend = getActiveCloudBackend();\n return callCloudProxy<Blob>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/${conversationId}/download`,\n responseType: \"blob\",\n });\n}\n\n/**\n * Delete a v1 app-conversation on the cloud backend. Mirrors the local\n * `AgentServerConversationService.deleteConversation` interface but calls\n * `DELETE /api/v1/app-conversations/{id}`, which returns a JSON\n * `Success` envelope (discarded here — the caller only needs to know\n * the request didn't error).\n */\nexport async function deleteCloudConversation(\n conversationId: string,\n): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"DELETE\",\n path: `/api/v1/app-conversations/${conversationId}`,\n });\n}\n\n/**\n * Toggle the public-sharing flag on a cloud v1 app-conversation. Mirrors\n * OpenHands' `AgentServerConversationService.updateConversationPublicFlag`:\n * `PATCH /api/v1/app-conversations/{id}` with `{ public }`, returning\n * the updated conversation.\n */\nexport async function updateCloudConversationPublicFlag(\n conversationId: string,\n isPublic: boolean,\n): Promise<AppConversation> {\n const backend = getActiveCloudBackend();\n const data = await callCloudProxy<AppConversation>({\n backend,\n method: \"PATCH\",\n path: `/api/v1/app-conversations/${conversationId}`,\n body: { public: isPublic },\n });\n return data;\n}\n\n/**\n * Pause the cloud sandbox backing a v1 app-conversation. Mirrors\n * OpenHands' `SandboxService.pauseSandbox`:\n * `POST /api/v1/sandboxes/{sandboxId}/pause` on the cloud backend, which stops\n * the runtime owning the conversation.\n */\nexport async function pauseCloudSandbox(sandboxId: string): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"POST\",\n path: `/api/v1/sandboxes/${sandboxId}/pause`,\n });\n}\n\n/**\n * Resume a paused cloud sandbox. Mirrors OpenHands' `SandboxService.resumeSandbox`\n * by calling `POST /api/v1/sandboxes/{sandboxId}/resume` on the SaaS.\n *\n * This is the correct endpoint for waking a PAUSED sandbox. It is a\n * lightweight unpause — NOT the same as creating a new start task via\n * `POST /api/v1/app-conversations`, which provisions a fresh conversation\n * and is subject to the 120-second sandbox-start timeout.\n */\nexport async function resumeCloudSandbox(sandboxId: string): Promise<void> {\n const backend = getActiveCloudBackend();\n await callCloudProxy<unknown>({\n backend,\n method: \"POST\",\n path: `/api/v1/sandboxes/${sandboxId}/resume`,\n });\n}\n\n/**\n * Read a file from a cloud conversation's sandbox workspace. Mirrors\n * OpenHands' `AgentServerConversationService.readConversationFile` — hits\n * `GET /api/v1/app-conversations/{id}/file?file_path=...` on the cloud backend\n * and returns the file content as a string.\n */\nexport async function readCloudConversationFile(\n conversationId: string,\n filePath: string,\n): Promise<string> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.append(\"file_path\", filePath);\n const data = await callCloudProxy<string>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/${conversationId}/file?${params.toString()}`,\n });\n return data ?? \"\";\n}\n\n/**\n * Fetch a single v1 app-conversation start task. Mirrors OpenHands'\n * `AgentServerConversationService.getStartTask` — uses the batch search endpoint\n * with a single id and unwraps the first result.\n */\nexport async function getCloudAppConversationStartTask(\n taskId: string,\n): Promise<AppConversationStartTask | null> {\n const backend = getActiveCloudBackend();\n const params = new URLSearchParams();\n params.set(\"ids\", taskId);\n const data = await callCloudProxy<(AppConversationStartTask | null)[]>({\n backend,\n method: \"GET\",\n path: `/api/v1/app-conversations/start-tasks?${params.toString()}`,\n });\n return data?.[0] ?? null;\n}\n"],"mappings":";;;;;AA0BA,SAAS,EACP,GACwB;AACxB,KAAI,CAAC,GAAc,GAAI,QAAO;CAC9B,IAAM,IAAS,EAA8B,EAAa,GAAG;AAG7D,QAFK,IAEE;EACL,GAAG;EACH,qBACE,EAAa,uBAAuB,EAAO,uBAAuB;EACpE,iBACE,EAAa,mBAAmB,EAAO,mBAAmB;EAC5D,cAAc,EAAa,gBAAgB,EAAO,gBAAgB;EAClE,oBACE,EAAa,sBAAsB,EAAO,sBAAsB;EACnE,GAXmB;;AActB,SAAS,IAAiC;CACxC,IAAM,IAAS,GAAkB,CAAC;AAClC,KAAI,EAAO,SAAS,QAClB,OAAU,MAAM,qDAAqD;AAEvE,QAAO;;AAQT,eAAsB,EACpB,IAAgB,IAChB,GAC8B;CAC9B,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAGpC,CAFA,EAAO,IAAI,SAAS,OAAO,EAAM,CAAC,EAC9B,KAAQ,EAAO,IAAI,WAAW,EAAO,EACzC,EAAO,IAAI,cAAc,kBAAkB;CAE3C,IAAM,IAAO,MAAM,EAGhB;EACD;EACA,QAAQ;EACR,MAAM,oCAAoC,EAAO,UAAU;EAC5D,CAAC;AAEF,QAAO;EACL,QAAQ,GAAM,SAAS,EAAE,EAAE,KACxB,MAAS,EAA2B,EAAK,CAC3C;EACD,cAAc,GAAM,gBAAgB;EACrC;;AAOH,eAAsB,EACpB,GACqC;AACrC,KAAI,EAAI,WAAW,EAAG,QAAO,EAAE;CAC/B,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AACpC,MAAK,IAAM,KAAM,EAAK,GAAO,OAAO,OAAO,EAAG;AAM9C,SAAQ,MALW,EAA2C;EAC5D;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAO,UAAU;EACrD,CAAC,IACc,EAAE,EAAE,IAAI,EAA2B;;AAmBrD,eAAsB,EACpB,GACmC;AASnC,QAAO,MAPY,EAAyC;EAC1D,SAFc,GAEd;EACA,QAAQ;EACR,MAAM;EACN,MAAM;EACN,SAAS;EACV,CAAC;;AAWJ,eAAsB,EACpB,GACe;AAEf,QAAO,EAAqB;EAC1B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAe;EAClD,cAAc;EACf,CAAC;;AAUJ,eAAsB,EACpB,GACe;AAEf,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B;EACpC,CAAC;;AASJ,eAAsB,EACpB,GACA,GAC0B;AAQ1B,QAAO,MANY,EAAgC;EACjD,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,6BAA6B;EACnC,MAAM,EAAE,QAAQ,GAAU;EAC3B,CAAC;;AAUJ,eAAsB,EAAkB,GAAkC;AAExE,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,qBAAqB,EAAU;EACtC,CAAC;;AAYJ,eAAsB,EAAmB,GAAkC;AAEzE,OAAM,EAAwB;EAC5B,SAFc,GAEd;EACA,QAAQ;EACR,MAAM,qBAAqB,EAAU;EACtC,CAAC;;AASJ,eAAsB,EACpB,GACA,GACiB;CACjB,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAOpC,QANA,EAAO,OAAO,aAAa,EAAS,EAM7B,MALY,EAAuB;EACxC;EACA,QAAQ;EACR,MAAM,6BAA6B,EAAe,QAAQ,EAAO,UAAU;EAC5E,CAAC,IACa;;AAQjB,eAAsB,EACpB,GAC0C;CAC1C,IAAM,IAAU,GAAuB,EACjC,IAAS,IAAI,iBAAiB;AAOpC,QANA,EAAO,IAAI,OAAO,EAAO,GAMlB,MALY,EAAoD;EACrE;EACA,QAAQ;EACR,MAAM,yCAAyC,EAAO,UAAU;EACjE,CAAC,IACY,MAAM"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../backend-registry/active-store.cjs`),t=require(`../../node_modules/axios/lib/axios.cjs`),n=require(`./proxy.cjs`);function r(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function i(t){if(t)return t;let n=e.getActiveBackend().backend;if(n.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return n}async function a(e){return r(await n.callCloudProxy({backend:i(e),method:`GET`,path:`/api/organizations`}))}async function o(e){let r=i(e);try{return{orgId:(await n.callCloudProxy({backend:r,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(t.default.isAxiosError(e)&&e.response?.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function s(e,t){let r=await n.callCloudProxy({backend:i(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:r?.org_id??e,userId:r?.user_id??``,role:r?.role??null,permissions:Array.isArray(r?.permissions)?r.permissions:null}}exports.getCloudOrganizationMe=s,exports.getCloudOrganizations=a,exports.getCurrentCloudApiKey=o;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@openhands/typescript-client/dist/client/http-client.cjs`),t=require(`../backend-registry/active-store.cjs`),n=require(`./proxy.cjs`);require(`../../node_modules/@openhands/typescript-client/dist/index.cjs`);function r(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function i(e){if(e)return e;let n=t.getActiveBackend().backend;if(n.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return n}async function a(e){return r(await n.callCloudProxy({backend:i(e),method:`GET`,path:`/api/organizations`}))}async function o(t){let r=i(t);try{return{orgId:(await n.callCloudProxy({backend:r,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(t){if(t instanceof e.HttpError&&t.status===400)return{orgId:null,isLegacyKey:!0};throw t}}async function s(e,t){let r=await n.callCloudProxy({backend:i(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:r?.org_id??e,userId:r?.user_id??``,role:r?.role??null,permissions:Array.isArray(r?.permissions)?r.permissions:null}}exports.getCloudOrganizationMe=s,exports.getCloudOrganizations=a,exports.getCurrentCloudApiKey=o;
2
2
  //# sourceMappingURL=organization-service.api.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-service.api.cjs","names":[],"sources":["../../../src/api/cloud/organization-service.api.ts"],"sourcesContent":["import axios from \"axios\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { callCloudProxy } from \"./proxy\";\nimport type {\n CloudApiKeyMetadata,\n CloudOrganization,\n CloudOrganizationsResponse,\n} from \"./types\";\n\ninterface OrganizationsResult {\n items: CloudOrganization[];\n currentOrgId: string | null;\n}\n\nfunction normalizeResult(\n data: CloudOrganizationsResponse | undefined | null,\n): OrganizationsResult {\n return {\n items: data?.items ?? [],\n currentOrgId: data?.current_org_id ?? null,\n };\n}\n\nfunction resolveBackend(backend?: Backend): Backend {\n if (backend) return backend;\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\n \"Cloud organization calls require a cloud backend. Active backend is local.\",\n );\n }\n return active;\n}\n\n/**\n * Fetch the org list for a cloud backend. With no argument, uses the active\n * cloud backend; pass `backend` explicitly to fetch for an inactive cloud\n * (used by the selector to flatten all cloud rows).\n *\n * Calls the cloud API directly with the backend's bearer token.\n */\nexport async function getCloudOrganizations(\n backend?: Backend,\n): Promise<OrganizationsResult> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<CloudOrganizationsResponse>({\n backend: target,\n method: \"GET\",\n path: \"/api/organizations\",\n });\n return normalizeResult(data);\n}\n\n/**\n * Fetch metadata for the API key used to authenticate this cloud backend.\n * The returned `orgId` is the single org the key is authorized to act on\n * (the cloud contract: one key → one org).\n *\n * Legacy keys minted before per-key org binding existed cause the upstream\n * to return HTTP 400 — we surface that as `isLegacyKey: true` with a null\n * `orgId` so the caller can fall back to the unfiltered behavior. Other\n * statuses (401 revoked, 5xx outage) propagate so React Query can mark\n * the query as failed and the selector can render the no-org-known row.\n */\nexport async function getCurrentCloudApiKey(\n backend?: Backend,\n): Promise<{ orgId: string | null; isLegacyKey: boolean }> {\n const target = resolveBackend(backend);\n try {\n const data = await callCloudProxy<CloudApiKeyMetadata>({\n backend: target,\n method: \"GET\",\n path: \"/api/keys/current\",\n });\n return { orgId: data?.org_id ?? null, isLegacyKey: false };\n } catch (e) {\n if (axios.isAxiosError(e) && e.response?.status === 400) {\n return { orgId: null, isLegacyKey: true };\n }\n throw e;\n }\n}\n\n/**\n * Fetch `GET /api/organizations/{orgId}/me`. Identifies the calling user as\n * a member of `orgId`. The GUI uses `me.org_id === me.user_id` to decide\n * whether `orgId` is the user's personal workspace — that's the cloud\n * contract (the auto-generated personal-workspace org has the same id as\n * the user).\n *\n * `role` is the caller's role in the org (`owner` | `admin` | `member`, or\n * `null` if the upstream omits it). `permissions` is the server-defined\n * permission set for that role (e.g. `edit_org_settings`); it is `null` on\n * older app-servers that don't return it, so callers fall back to the role.\n * See `useCanManageOrgProfiles`.\n */\nexport async function getCloudOrganizationMe(\n orgId: string,\n backend?: Backend,\n): Promise<{\n orgId: string;\n userId: string;\n role: string | null;\n permissions?: string[] | null;\n}> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<{\n org_id: string;\n user_id: string;\n role?: string;\n permissions?: string[];\n }>({\n backend: target,\n method: \"GET\",\n path: `/api/organizations/${encodeURIComponent(orgId)}/me`,\n });\n return {\n orgId: data?.org_id ?? orgId,\n userId: data?.user_id ?? \"\",\n role: data?.role ?? null,\n // `null` when the field is absent (older app-server) so callers can fall\n // back to a role check; a present array is the server's source of truth.\n permissions: Array.isArray(data?.permissions) ? data.permissions : null,\n };\n}\n"],"mappings":"qLAeA,SAAS,EACP,EACqB,CACrB,MAAO,CACL,MAAO,GAAM,OAAS,EAAE,CACxB,aAAc,GAAM,gBAAkB,KACvC,CAGH,SAAS,EAAe,EAA4B,CAClD,GAAI,EAAS,OAAO,EACpB,IAAM,EAAS,EAAA,kBAAkB,CAAC,QAClC,GAAI,EAAO,OAAS,QAClB,MAAU,MACR,6EACD,CAEH,OAAO,EAUT,eAAsB,EACpB,EAC8B,CAO9B,OAAO,EAAgB,MALJ,EAAA,eAA2C,CAC5D,QAFa,EAAe,EAEnB,CACT,OAAQ,MACR,KAAM,qBACP,CAAC,CAC0B,CAc9B,eAAsB,EACpB,EACyD,CACzD,IAAM,EAAS,EAAe,EAAQ,CACtC,GAAI,CAMF,MAAO,CAAE,OAAO,MALG,EAAA,eAAoC,CACrD,QAAS,EACT,OAAQ,MACR,KAAM,oBACP,CAAC,GACoB,QAAU,KAAM,YAAa,GAAO,OACnD,EAAG,CACV,GAAI,EAAA,QAAM,aAAa,EAAE,EAAI,EAAE,UAAU,SAAW,IAClD,MAAO,CAAE,MAAO,KAAM,YAAa,GAAM,CAE3C,MAAM,GAiBV,eAAsB,EACpB,EACA,EAMC,CAED,IAAM,EAAO,MAAM,EAAA,eAKhB,CACD,QAPa,EAAe,EAOnB,CACT,OAAQ,MACR,KAAM,sBAAsB,mBAAmB,EAAM,CAAC,KACvD,CAAC,CACF,MAAO,CACL,MAAO,GAAM,QAAU,EACvB,OAAQ,GAAM,SAAW,GACzB,KAAM,GAAM,MAAQ,KAGpB,YAAa,MAAM,QAAQ,GAAM,YAAY,CAAG,EAAK,YAAc,KACpE"}
1
+ {"version":3,"file":"organization-service.api.cjs","names":[],"sources":["../../../src/api/cloud/organization-service.api.ts"],"sourcesContent":["import { HttpError } from \"@openhands/typescript-client\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { callCloudProxy } from \"./proxy\";\nimport type {\n CloudApiKeyMetadata,\n CloudOrganization,\n CloudOrganizationsResponse,\n} from \"./types\";\n\ninterface OrganizationsResult {\n items: CloudOrganization[];\n currentOrgId: string | null;\n}\n\nfunction normalizeResult(\n data: CloudOrganizationsResponse | undefined | null,\n): OrganizationsResult {\n return {\n items: data?.items ?? [],\n currentOrgId: data?.current_org_id ?? null,\n };\n}\n\nfunction resolveBackend(backend?: Backend): Backend {\n if (backend) return backend;\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\n \"Cloud organization calls require a cloud backend. Active backend is local.\",\n );\n }\n return active;\n}\n\n/**\n * Fetch the org list for a cloud backend. With no argument, uses the active\n * cloud backend; pass `backend` explicitly to fetch for an inactive cloud\n * (used by the selector to flatten all cloud rows).\n *\n * Calls the cloud API directly with the backend's bearer token.\n */\nexport async function getCloudOrganizations(\n backend?: Backend,\n): Promise<OrganizationsResult> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<CloudOrganizationsResponse>({\n backend: target,\n method: \"GET\",\n path: \"/api/organizations\",\n });\n return normalizeResult(data);\n}\n\n/**\n * Fetch metadata for the API key used to authenticate this cloud backend.\n * The returned `orgId` is the single org the key is authorized to act on\n * (the cloud contract: one key → one org).\n *\n * Legacy keys minted before per-key org binding existed cause the upstream\n * to return HTTP 400 — we surface that as `isLegacyKey: true` with a null\n * `orgId` so the caller can fall back to the unfiltered behavior. Other\n * statuses (401 revoked, 5xx outage) propagate so React Query can mark\n * the query as failed and the selector can render the no-org-known row.\n */\nexport async function getCurrentCloudApiKey(\n backend?: Backend,\n): Promise<{ orgId: string | null; isLegacyKey: boolean }> {\n const target = resolveBackend(backend);\n try {\n const data = await callCloudProxy<CloudApiKeyMetadata>({\n backend: target,\n method: \"GET\",\n path: \"/api/keys/current\",\n });\n return { orgId: data?.org_id ?? null, isLegacyKey: false };\n } catch (e) {\n if (e instanceof HttpError && e.status === 400) {\n return { orgId: null, isLegacyKey: true };\n }\n throw e;\n }\n}\n\n/**\n * Fetch `GET /api/organizations/{orgId}/me`. Identifies the calling user as\n * a member of `orgId`. The GUI uses `me.org_id === me.user_id` to decide\n * whether `orgId` is the user's personal workspace — that's the cloud\n * contract (the auto-generated personal-workspace org has the same id as\n * the user).\n *\n * `role` is the caller's role in the org (`owner` | `admin` | `member`, or\n * `null` if the upstream omits it). `permissions` is the server-defined\n * permission set for that role (e.g. `edit_org_settings`); it is `null` on\n * older app-servers that don't return it, so callers fall back to the role.\n * See `useCanManageOrgProfiles`.\n */\nexport async function getCloudOrganizationMe(\n orgId: string,\n backend?: Backend,\n): Promise<{\n orgId: string;\n userId: string;\n role: string | null;\n permissions?: string[] | null;\n}> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<{\n org_id: string;\n user_id: string;\n role?: string;\n permissions?: string[];\n }>({\n backend: target,\n method: \"GET\",\n path: `/api/organizations/${encodeURIComponent(orgId)}/me`,\n });\n return {\n orgId: data?.org_id ?? orgId,\n userId: data?.user_id ?? \"\",\n role: data?.role ?? null,\n // `null` when the field is absent (older app-server) so callers can fall\n // back to a role check; a present array is the server's source of truth.\n permissions: Array.isArray(data?.permissions) ? data.permissions : null,\n };\n}\n"],"mappings":"oSAeA,SAAS,EACP,EACqB,CACrB,MAAO,CACL,MAAO,GAAM,OAAS,EAAE,CACxB,aAAc,GAAM,gBAAkB,KACvC,CAGH,SAAS,EAAe,EAA4B,CAClD,GAAI,EAAS,OAAO,EACpB,IAAM,EAAS,EAAA,kBAAkB,CAAC,QAClC,GAAI,EAAO,OAAS,QAClB,MAAU,MACR,6EACD,CAEH,OAAO,EAUT,eAAsB,EACpB,EAC8B,CAO9B,OAAO,EAAgB,MALJ,EAAA,eAA2C,CAC5D,QAFa,EAAe,EAEnB,CACT,OAAQ,MACR,KAAM,qBACP,CAAC,CAC0B,CAc9B,eAAsB,EACpB,EACyD,CACzD,IAAM,EAAS,EAAe,EAAQ,CACtC,GAAI,CAMF,MAAO,CAAE,OAAO,MALG,EAAA,eAAoC,CACrD,QAAS,EACT,OAAQ,MACR,KAAM,oBACP,CAAC,GACoB,QAAU,KAAM,YAAa,GAAO,OACnD,EAAG,CACV,GAAI,aAAa,EAAA,WAAa,EAAE,SAAW,IACzC,MAAO,CAAE,MAAO,KAAM,YAAa,GAAM,CAE3C,MAAM,GAiBV,eAAsB,EACpB,EACA,EAMC,CAED,IAAM,EAAO,MAAM,EAAA,eAKhB,CACD,QAPa,EAAe,EAOnB,CACT,OAAQ,MACR,KAAM,sBAAsB,mBAAmB,EAAM,CAAC,KACvD,CAAC,CACF,MAAO,CACL,MAAO,GAAM,QAAU,EACvB,OAAQ,GAAM,SAAW,GACzB,KAAM,GAAM,MAAQ,KAGpB,YAAa,MAAM,QAAQ,GAAM,YAAY,CAAG,EAAK,YAAc,KACpE"}
@@ -1,6 +1,7 @@
1
- import { getActiveBackend as e } from "../backend-registry/active-store.js";
2
- import t from "../../node_modules/axios/lib/axios.js";
1
+ import { HttpError as e } from "../../node_modules/@openhands/typescript-client/dist/client/http-client.js";
2
+ import { getActiveBackend as t } from "../backend-registry/active-store.js";
3
3
  import { callCloudProxy as n } from "./proxy.js";
4
+ import "../../node_modules/@openhands/typescript-client/dist/index.js";
4
5
  //#region src/api/cloud/organization-service.api.ts
5
6
  function r(e) {
6
7
  return {
@@ -8,9 +9,9 @@ function r(e) {
8
9
  currentOrgId: e?.current_org_id ?? null
9
10
  };
10
11
  }
11
- function i(t) {
12
- if (t) return t;
13
- let n = e().backend;
12
+ function i(e) {
13
+ if (e) return e;
14
+ let n = t().backend;
14
15
  if (n.kind !== "cloud") throw Error("Cloud organization calls require a cloud backend. Active backend is local.");
15
16
  return n;
16
17
  }
@@ -21,8 +22,8 @@ async function a(e) {
21
22
  path: "/api/organizations"
22
23
  }));
23
24
  }
24
- async function o(e) {
25
- let r = i(e);
25
+ async function o(t) {
26
+ let r = i(t);
26
27
  try {
27
28
  return {
28
29
  orgId: (await n({
@@ -32,12 +33,12 @@ async function o(e) {
32
33
  }))?.org_id ?? null,
33
34
  isLegacyKey: !1
34
35
  };
35
- } catch (e) {
36
- if (t.isAxiosError(e) && e.response?.status === 400) return {
36
+ } catch (t) {
37
+ if (t instanceof e && t.status === 400) return {
37
38
  orgId: null,
38
39
  isLegacyKey: !0
39
40
  };
40
- throw e;
41
+ throw t;
41
42
  }
42
43
  }
43
44
  async function s(e, t) {
@@ -1 +1 @@
1
- {"version":3,"file":"organization-service.api.js","names":[],"sources":["../../../src/api/cloud/organization-service.api.ts"],"sourcesContent":["import axios from \"axios\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { callCloudProxy } from \"./proxy\";\nimport type {\n CloudApiKeyMetadata,\n CloudOrganization,\n CloudOrganizationsResponse,\n} from \"./types\";\n\ninterface OrganizationsResult {\n items: CloudOrganization[];\n currentOrgId: string | null;\n}\n\nfunction normalizeResult(\n data: CloudOrganizationsResponse | undefined | null,\n): OrganizationsResult {\n return {\n items: data?.items ?? [],\n currentOrgId: data?.current_org_id ?? null,\n };\n}\n\nfunction resolveBackend(backend?: Backend): Backend {\n if (backend) return backend;\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\n \"Cloud organization calls require a cloud backend. Active backend is local.\",\n );\n }\n return active;\n}\n\n/**\n * Fetch the org list for a cloud backend. With no argument, uses the active\n * cloud backend; pass `backend` explicitly to fetch for an inactive cloud\n * (used by the selector to flatten all cloud rows).\n *\n * Calls the cloud API directly with the backend's bearer token.\n */\nexport async function getCloudOrganizations(\n backend?: Backend,\n): Promise<OrganizationsResult> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<CloudOrganizationsResponse>({\n backend: target,\n method: \"GET\",\n path: \"/api/organizations\",\n });\n return normalizeResult(data);\n}\n\n/**\n * Fetch metadata for the API key used to authenticate this cloud backend.\n * The returned `orgId` is the single org the key is authorized to act on\n * (the cloud contract: one key → one org).\n *\n * Legacy keys minted before per-key org binding existed cause the upstream\n * to return HTTP 400 — we surface that as `isLegacyKey: true` with a null\n * `orgId` so the caller can fall back to the unfiltered behavior. Other\n * statuses (401 revoked, 5xx outage) propagate so React Query can mark\n * the query as failed and the selector can render the no-org-known row.\n */\nexport async function getCurrentCloudApiKey(\n backend?: Backend,\n): Promise<{ orgId: string | null; isLegacyKey: boolean }> {\n const target = resolveBackend(backend);\n try {\n const data = await callCloudProxy<CloudApiKeyMetadata>({\n backend: target,\n method: \"GET\",\n path: \"/api/keys/current\",\n });\n return { orgId: data?.org_id ?? null, isLegacyKey: false };\n } catch (e) {\n if (axios.isAxiosError(e) && e.response?.status === 400) {\n return { orgId: null, isLegacyKey: true };\n }\n throw e;\n }\n}\n\n/**\n * Fetch `GET /api/organizations/{orgId}/me`. Identifies the calling user as\n * a member of `orgId`. The GUI uses `me.org_id === me.user_id` to decide\n * whether `orgId` is the user's personal workspace — that's the cloud\n * contract (the auto-generated personal-workspace org has the same id as\n * the user).\n *\n * `role` is the caller's role in the org (`owner` | `admin` | `member`, or\n * `null` if the upstream omits it). `permissions` is the server-defined\n * permission set for that role (e.g. `edit_org_settings`); it is `null` on\n * older app-servers that don't return it, so callers fall back to the role.\n * See `useCanManageOrgProfiles`.\n */\nexport async function getCloudOrganizationMe(\n orgId: string,\n backend?: Backend,\n): Promise<{\n orgId: string;\n userId: string;\n role: string | null;\n permissions?: string[] | null;\n}> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<{\n org_id: string;\n user_id: string;\n role?: string;\n permissions?: string[];\n }>({\n backend: target,\n method: \"GET\",\n path: `/api/organizations/${encodeURIComponent(orgId)}/me`,\n });\n return {\n orgId: data?.org_id ?? orgId,\n userId: data?.user_id ?? \"\",\n role: data?.role ?? null,\n // `null` when the field is absent (older app-server) so callers can fall\n // back to a role check; a present array is the server's source of truth.\n permissions: Array.isArray(data?.permissions) ? data.permissions : null,\n };\n}\n"],"mappings":";;;;AAeA,SAAS,EACP,GACqB;AACrB,QAAO;EACL,OAAO,GAAM,SAAS,EAAE;EACxB,cAAc,GAAM,kBAAkB;EACvC;;AAGH,SAAS,EAAe,GAA4B;AAClD,KAAI,EAAS,QAAO;CACpB,IAAM,IAAS,GAAkB,CAAC;AAClC,KAAI,EAAO,SAAS,QAClB,OAAU,MACR,6EACD;AAEH,QAAO;;AAUT,eAAsB,EACpB,GAC8B;AAO9B,QAAO,EAAgB,MALJ,EAA2C;EAC5D,SAFa,EAAe,EAEnB;EACT,QAAQ;EACR,MAAM;EACP,CAAC,CAC0B;;AAc9B,eAAsB,EACpB,GACyD;CACzD,IAAM,IAAS,EAAe,EAAQ;AACtC,KAAI;AAMF,SAAO;GAAE,QAAO,MALG,EAAoC;IACrD,SAAS;IACT,QAAQ;IACR,MAAM;IACP,CAAC,GACoB,UAAU;GAAM,aAAa;GAAO;UACnD,GAAG;AACV,MAAI,EAAM,aAAa,EAAE,IAAI,EAAE,UAAU,WAAW,IAClD,QAAO;GAAE,OAAO;GAAM,aAAa;GAAM;AAE3C,QAAM;;;AAiBV,eAAsB,EACpB,GACA,GAMC;CAED,IAAM,IAAO,MAAM,EAKhB;EACD,SAPa,EAAe,EAOnB;EACT,QAAQ;EACR,MAAM,sBAAsB,mBAAmB,EAAM,CAAC;EACvD,CAAC;AACF,QAAO;EACL,OAAO,GAAM,UAAU;EACvB,QAAQ,GAAM,WAAW;EACzB,MAAM,GAAM,QAAQ;EAGpB,aAAa,MAAM,QAAQ,GAAM,YAAY,GAAG,EAAK,cAAc;EACpE"}
1
+ {"version":3,"file":"organization-service.api.js","names":[],"sources":["../../../src/api/cloud/organization-service.api.ts"],"sourcesContent":["import { HttpError } from \"@openhands/typescript-client\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { callCloudProxy } from \"./proxy\";\nimport type {\n CloudApiKeyMetadata,\n CloudOrganization,\n CloudOrganizationsResponse,\n} from \"./types\";\n\ninterface OrganizationsResult {\n items: CloudOrganization[];\n currentOrgId: string | null;\n}\n\nfunction normalizeResult(\n data: CloudOrganizationsResponse | undefined | null,\n): OrganizationsResult {\n return {\n items: data?.items ?? [],\n currentOrgId: data?.current_org_id ?? null,\n };\n}\n\nfunction resolveBackend(backend?: Backend): Backend {\n if (backend) return backend;\n const active = getActiveBackend().backend;\n if (active.kind !== \"cloud\") {\n throw new Error(\n \"Cloud organization calls require a cloud backend. Active backend is local.\",\n );\n }\n return active;\n}\n\n/**\n * Fetch the org list for a cloud backend. With no argument, uses the active\n * cloud backend; pass `backend` explicitly to fetch for an inactive cloud\n * (used by the selector to flatten all cloud rows).\n *\n * Calls the cloud API directly with the backend's bearer token.\n */\nexport async function getCloudOrganizations(\n backend?: Backend,\n): Promise<OrganizationsResult> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<CloudOrganizationsResponse>({\n backend: target,\n method: \"GET\",\n path: \"/api/organizations\",\n });\n return normalizeResult(data);\n}\n\n/**\n * Fetch metadata for the API key used to authenticate this cloud backend.\n * The returned `orgId` is the single org the key is authorized to act on\n * (the cloud contract: one key → one org).\n *\n * Legacy keys minted before per-key org binding existed cause the upstream\n * to return HTTP 400 — we surface that as `isLegacyKey: true` with a null\n * `orgId` so the caller can fall back to the unfiltered behavior. Other\n * statuses (401 revoked, 5xx outage) propagate so React Query can mark\n * the query as failed and the selector can render the no-org-known row.\n */\nexport async function getCurrentCloudApiKey(\n backend?: Backend,\n): Promise<{ orgId: string | null; isLegacyKey: boolean }> {\n const target = resolveBackend(backend);\n try {\n const data = await callCloudProxy<CloudApiKeyMetadata>({\n backend: target,\n method: \"GET\",\n path: \"/api/keys/current\",\n });\n return { orgId: data?.org_id ?? null, isLegacyKey: false };\n } catch (e) {\n if (e instanceof HttpError && e.status === 400) {\n return { orgId: null, isLegacyKey: true };\n }\n throw e;\n }\n}\n\n/**\n * Fetch `GET /api/organizations/{orgId}/me`. Identifies the calling user as\n * a member of `orgId`. The GUI uses `me.org_id === me.user_id` to decide\n * whether `orgId` is the user's personal workspace — that's the cloud\n * contract (the auto-generated personal-workspace org has the same id as\n * the user).\n *\n * `role` is the caller's role in the org (`owner` | `admin` | `member`, or\n * `null` if the upstream omits it). `permissions` is the server-defined\n * permission set for that role (e.g. `edit_org_settings`); it is `null` on\n * older app-servers that don't return it, so callers fall back to the role.\n * See `useCanManageOrgProfiles`.\n */\nexport async function getCloudOrganizationMe(\n orgId: string,\n backend?: Backend,\n): Promise<{\n orgId: string;\n userId: string;\n role: string | null;\n permissions?: string[] | null;\n}> {\n const target = resolveBackend(backend);\n const data = await callCloudProxy<{\n org_id: string;\n user_id: string;\n role?: string;\n permissions?: string[];\n }>({\n backend: target,\n method: \"GET\",\n path: `/api/organizations/${encodeURIComponent(orgId)}/me`,\n });\n return {\n orgId: data?.org_id ?? orgId,\n userId: data?.user_id ?? \"\",\n role: data?.role ?? null,\n // `null` when the field is absent (older app-server) so callers can fall\n // back to a role check; a present array is the server's source of truth.\n permissions: Array.isArray(data?.permissions) ? data.permissions : null,\n };\n}\n"],"mappings":";;;;;AAeA,SAAS,EACP,GACqB;AACrB,QAAO;EACL,OAAO,GAAM,SAAS,EAAE;EACxB,cAAc,GAAM,kBAAkB;EACvC;;AAGH,SAAS,EAAe,GAA4B;AAClD,KAAI,EAAS,QAAO;CACpB,IAAM,IAAS,GAAkB,CAAC;AAClC,KAAI,EAAO,SAAS,QAClB,OAAU,MACR,6EACD;AAEH,QAAO;;AAUT,eAAsB,EACpB,GAC8B;AAO9B,QAAO,EAAgB,MALJ,EAA2C;EAC5D,SAFa,EAAe,EAEnB;EACT,QAAQ;EACR,MAAM;EACP,CAAC,CAC0B;;AAc9B,eAAsB,EACpB,GACyD;CACzD,IAAM,IAAS,EAAe,EAAQ;AACtC,KAAI;AAMF,SAAO;GAAE,QAAO,MALG,EAAoC;IACrD,SAAS;IACT,QAAQ;IACR,MAAM;IACP,CAAC,GACoB,UAAU;GAAM,aAAa;GAAO;UACnD,GAAG;AACV,MAAI,aAAa,KAAa,EAAE,WAAW,IACzC,QAAO;GAAE,OAAO;GAAM,aAAa;GAAM;AAE3C,QAAM;;;AAiBV,eAAsB,EACpB,GACA,GAMC;CAED,IAAM,IAAO,MAAM,EAKhB;EACD,SAPa,EAAe,EAOnB;EACT,QAAQ;EACR,MAAM,sBAAsB,mBAAmB,EAAM,CAAC;EACvD,CAAC;AACF,QAAO;EACL,OAAO,GAAM,UAAU;EACvB,QAAQ,GAAM,WAAW;EACzB,MAAM,GAAM,QAAQ;EAGpB,aAAa,MAAM,QAAQ,GAAM,YAAY,GAAG,EAAK,cAAc;EACpE"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../agent-server-config.cjs`),t=require(`../backend-registry/active-store.cjs`),n=require(`../agent-server-client-options.cjs`),r=require(`../../node_modules/axios/lib/axios.cjs`),i=require(`../backend-registry/auth.cjs`);function a(e){let t=e.authMode??`bearer`;return t===`bearer`?i.buildAuthHeaders(e.backend):t===`session-api-key`&&e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}}async function o(i){let o=t.getActiveBackend(),s=o.backend.id===i.backend.id&&o.orgId?{"X-Org-Id":o.orgId}:{},c={...a(i),...s,...i.headers??{}},l=i.hostOverride??i.backend.host;if(!i.hostOverride)return(await r.default.request({url:`${l.replace(/\/+$/,``)}${i.path}`,method:i.method,headers:c,...i.body===void 0?{}:{data:i.body},timeout:(i.timeoutSeconds??30)*1e3,...i.responseType?{responseType:i.responseType}:{}})).data;let u=e.getAgentServerBaseUrl();if(!u)throw new n.NoBackendAvailableError;let d=e.getAgentServerHeaders();return(await r.default.post(`${u.replace(/\/+$/,``)}/api/cloud-proxy`,{host:l,method:i.method,path:i.path,headers:c,body:i.body??null,...i.timeoutSeconds?{timeout_seconds:i.timeoutSeconds}:{}},{headers:d,timeout:3e4,...i.responseType?{responseType:i.responseType}:{}})).data}exports.callCloudProxy=o;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./client.cjs`);async function t(t){return(t.hostOverride?e.createCloudClientForRuntime(t.backend):e.createCloudClient(t.backend)).request({method:t.method,path:t.path,body:t.body,headers:t.headers,timeoutSeconds:t.timeoutSeconds,hostOverride:t.hostOverride,authMode:t.authMode===void 0||t.authMode===`bearer`?`bearer`:t.authMode,sessionApiKey:t.sessionApiKey,responseType:t.responseType})}exports.callCloudProxy=t;
2
2
  //# sourceMappingURL=proxy.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.cjs","names":[],"sources":["../../../src/api/cloud/proxy.ts"],"sourcesContent":["import axios from \"axios\";\nimport {\n getAgentServerBaseUrl,\n getAgentServerHeaders,\n} from \"../agent-server-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport { NoBackendAvailableError } from \"../agent-server-client-options\";\nimport { buildAuthHeaders } from \"../backend-registry/auth\";\nimport type { Backend } from \"../backend-registry/types\";\n\nexport interface CloudProxyRequest {\n /**\n * Cloud backend whose bearer token authenticates the upstream call.\n * `backend.host` is also the default upstream host unless `hostOverride`\n * is set.\n */\n backend: Backend;\n /** HTTP method against the upstream host. */\n method: \"GET\" | \"POST\" | \"PATCH\" | \"PUT\" | \"DELETE\";\n /** Path on the upstream host, e.g. \"/api/v1/conversation/123/events/search\". */\n path: string;\n /** Optional JSON body for non-GET methods. */\n body?: unknown;\n /** Extra headers merged with the auth header for the upstream call. */\n headers?: Record<string, string>;\n /** Override the upstream timeout, in seconds. */\n timeoutSeconds?: number;\n /**\n * Override the upstream host. When set, the proxy targets this host\n * instead of `backend.host`. Used for runtime-sandbox calls where the\n * upstream lives at the conversation's runtime URL (e.g.\n * `http://<id>.prod-runtime.all-hands.dev`) rather than the cloud API.\n * The host must still pass the proxy's allowlist server-side.\n */\n hostOverride?: string;\n /**\n * Auth strategy for the upstream call. Defaults to \"bearer\" (uses the\n * cloud backend's bearer token via `buildAuthHeaders`). For\n * runtime-sandbox calls, set to \"session-api-key\" and pass\n * `sessionApiKey` — those endpoints don't accept bearer tokens, only\n * `X-Session-API-Key`. \"none\" sends no auth header.\n */\n authMode?: \"bearer\" | \"session-api-key\" | \"none\";\n /** Required when `authMode === \"session-api-key\"`. */\n sessionApiKey?: string | null;\n /**\n * Axios responseType for the inner POST to the bundled agent-server.\n * Set to \"blob\" when the upstream cloud endpoint returns a binary\n * payload (e.g. ZIP downloads); leave undefined for default JSON.\n */\n responseType?: \"blob\";\n}\n\nfunction buildUpstreamAuthHeaders(\n req: CloudProxyRequest,\n): Record<string, string> {\n const mode = req.authMode ?? \"bearer\";\n if (mode === \"bearer\") return buildAuthHeaders(req.backend);\n if (mode === \"session-api-key\") {\n return req.sessionApiKey ? { \"X-Session-API-Key\": req.sessionApiKey } : {};\n }\n return {};\n}\n\n/**\n * Send a cloud request. App-host calls (`backend.host`) go directly to the\n * cloud API with the cloud backend's auth headers. Runtime-sandbox calls\n * pass `hostOverride`, and those go through `/api/cloud-proxy` because the\n * per-conversation runtime hosts are not the configured cloud app origin.\n *\n * App-host auth headers are sent directly to the cloud host. Proxied auth\n * headers are carried in the proxy envelope and attached server-side.\n */\nexport async function callCloudProxy<TResponse = unknown>(\n req: CloudProxyRequest,\n): Promise<TResponse> {\n // Send `X-Org-Id` so the upstream scopes per-request to the org the user\n // selected locally, instead of the user's globally-shared\n // `current_org_id` on the cloud backend. Restricted to calls against the active\n // backend: the selector also fans out per-backend bookkeeping calls\n // (e.g. `getCloudOrganizations(b)`) that would otherwise carry the\n // active backend's orgId across an unrelated API key, which the cloud backend\n // rejects when api_key_org_id and X-Org-Id disagree.\n const active = getActiveBackend();\n const orgIdHeader =\n active.backend.id === req.backend.id && active.orgId\n ? { \"X-Org-Id\": active.orgId }\n : {};\n const upstreamHeaders = {\n ...buildUpstreamAuthHeaders(req),\n ...orgIdHeader,\n ...(req.headers ?? {}),\n };\n const upstreamHost = req.hostOverride ?? req.backend.host;\n\n if (!req.hostOverride) {\n const response = await axios.request<TResponse>({\n url: `${upstreamHost.replace(/\\/+$/, \"\")}${req.path}`,\n method: req.method,\n headers: upstreamHeaders,\n ...(req.body !== undefined ? { data: req.body } : {}),\n timeout: (req.timeoutSeconds ?? 30) * 1000,\n ...(req.responseType ? { responseType: req.responseType } : {}),\n });\n\n return response.data;\n }\n\n const proxyBaseUrl = getAgentServerBaseUrl();\n if (!proxyBaseUrl) throw new NoBackendAvailableError();\n const localAuthHeaders = getAgentServerHeaders();\n\n // Talk to the configured app/ingress origin that exposes /api/cloud-proxy.\n // Do not resolve this through the backend registry: when the active backend\n // is cloud, borrowing some other registered local backend would silently\n // route cloud traffic through the wrong user-configured server.\n const response = await axios.post<TResponse>(\n `${proxyBaseUrl.replace(/\\/+$/, \"\")}/api/cloud-proxy`,\n {\n host: upstreamHost,\n method: req.method,\n path: req.path,\n headers: upstreamHeaders,\n body: req.body ?? null,\n ...(req.timeoutSeconds ? { timeout_seconds: req.timeoutSeconds } : {}),\n },\n {\n headers: localAuthHeaders,\n timeout: 30_000,\n ...(req.responseType ? { responseType: req.responseType } : {}),\n },\n );\n\n return response.data;\n}\n"],"mappings":"8RAqDA,SAAS,EACP,EACwB,CACxB,IAAM,EAAO,EAAI,UAAY,SAK7B,OAJI,IAAS,SAAiB,EAAA,iBAAiB,EAAI,QAAQ,CACvD,IAAS,mBACJ,EAAI,cAAgB,CAAE,oBAAqB,EAAI,cAAe,CAAG,EAAE,CAc9E,eAAsB,EACpB,EACoB,CAQpB,IAAM,EAAS,EAAA,kBAAkB,CAC3B,EACJ,EAAO,QAAQ,KAAO,EAAI,QAAQ,IAAM,EAAO,MAC3C,CAAE,WAAY,EAAO,MAAO,CAC5B,EAAE,CACF,EAAkB,CACtB,GAAG,EAAyB,EAAI,CAChC,GAAG,EACH,GAAI,EAAI,SAAW,EAAE,CACtB,CACK,EAAe,EAAI,cAAgB,EAAI,QAAQ,KAErD,GAAI,CAAC,EAAI,aAUP,OAAO,MATgB,EAAA,QAAM,QAAmB,CAC9C,IAAK,GAAG,EAAa,QAAQ,OAAQ,GAAG,GAAG,EAAI,OAC/C,OAAQ,EAAI,OACZ,QAAS,EACT,GAAI,EAAI,OAAS,IAAA,GAAiC,EAAE,CAAvB,CAAE,KAAM,EAAI,KAAM,CAC/C,SAAU,EAAI,gBAAkB,IAAM,IACtC,GAAI,EAAI,aAAe,CAAE,aAAc,EAAI,aAAc,CAAG,EAAE,CAC/D,CAAC,EAEc,KAGlB,IAAM,EAAe,EAAA,uBAAuB,CAC5C,GAAI,CAAC,EAAc,MAAM,IAAI,EAAA,wBAC7B,IAAM,EAAmB,EAAA,uBAAuB,CAuBhD,OAAO,MAjBgB,EAAA,QAAM,KAC3B,GAAG,EAAa,QAAQ,OAAQ,GAAG,CAAC,kBACpC,CACE,KAAM,EACN,OAAQ,EAAI,OACZ,KAAM,EAAI,KACV,QAAS,EACT,KAAM,EAAI,MAAQ,KAClB,GAAI,EAAI,eAAiB,CAAE,gBAAiB,EAAI,eAAgB,CAAG,EAAE,CACtE,CACD,CACE,QAAS,EACT,QAAS,IACT,GAAI,EAAI,aAAe,CAAE,aAAc,EAAI,aAAc,CAAG,EAAE,CAC/D,CACF,EAEe"}
1
+ {"version":3,"file":"proxy.cjs","names":[],"sources":["../../../src/api/cloud/proxy.ts"],"sourcesContent":["import type { CloudRequestOptions } from \"@openhands/typescript-client/clients\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { createCloudClientForRuntime, createCloudClient } from \"./client\";\n\nexport interface CloudProxyRequest {\n backend: Backend;\n method: CloudRequestOptions[\"method\"];\n path: string;\n body?: unknown;\n headers?: Record<string, string>;\n timeoutSeconds?: number;\n hostOverride?: string;\n authMode?: \"bearer\" | \"session-api-key\" | \"none\";\n sessionApiKey?: string | null;\n responseType?: \"blob\";\n}\n\nexport async function callCloudProxy<TResponse = unknown>(\n req: CloudProxyRequest,\n): Promise<TResponse> {\n const client = req.hostOverride\n ? createCloudClientForRuntime(req.backend)\n : createCloudClient(req.backend);\n\n return client.request<TResponse>({\n method: req.method,\n path: req.path,\n body: req.body,\n headers: req.headers,\n timeoutSeconds: req.timeoutSeconds,\n hostOverride: req.hostOverride,\n authMode:\n req.authMode === undefined || req.authMode === \"bearer\"\n ? \"bearer\"\n : req.authMode,\n sessionApiKey: req.sessionApiKey,\n responseType: req.responseType,\n });\n}\n"],"mappings":"gFAiBA,eAAsB,EACpB,EACoB,CAKpB,OAJe,EAAI,aACf,EAAA,4BAA4B,EAAI,QAAQ,CACxC,EAAA,kBAAkB,EAAI,QAAQ,EAEpB,QAAmB,CAC/B,OAAQ,EAAI,OACZ,KAAM,EAAI,KACV,KAAM,EAAI,KACV,QAAS,EAAI,QACb,eAAgB,EAAI,eACpB,aAAc,EAAI,aAClB,SACE,EAAI,WAAa,IAAA,IAAa,EAAI,WAAa,SAC3C,SACA,EAAI,SACV,cAAe,EAAI,cACnB,aAAc,EAAI,aACnB,CAAC"}
@@ -1,53 +1,15 @@
1
+ import type { CloudRequestOptions } from "@openhands/typescript-client/clients";
1
2
  import type { Backend } from "../backend-registry/types";
2
3
  export interface CloudProxyRequest {
3
- /**
4
- * Cloud backend whose bearer token authenticates the upstream call.
5
- * `backend.host` is also the default upstream host unless `hostOverride`
6
- * is set.
7
- */
8
4
  backend: Backend;
9
- /** HTTP method against the upstream host. */
10
- method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
11
- /** Path on the upstream host, e.g. "/api/v1/conversation/123/events/search". */
5
+ method: CloudRequestOptions["method"];
12
6
  path: string;
13
- /** Optional JSON body for non-GET methods. */
14
7
  body?: unknown;
15
- /** Extra headers merged with the auth header for the upstream call. */
16
8
  headers?: Record<string, string>;
17
- /** Override the upstream timeout, in seconds. */
18
9
  timeoutSeconds?: number;
19
- /**
20
- * Override the upstream host. When set, the proxy targets this host
21
- * instead of `backend.host`. Used for runtime-sandbox calls where the
22
- * upstream lives at the conversation's runtime URL (e.g.
23
- * `http://<id>.prod-runtime.all-hands.dev`) rather than the cloud API.
24
- * The host must still pass the proxy's allowlist server-side.
25
- */
26
10
  hostOverride?: string;
27
- /**
28
- * Auth strategy for the upstream call. Defaults to "bearer" (uses the
29
- * cloud backend's bearer token via `buildAuthHeaders`). For
30
- * runtime-sandbox calls, set to "session-api-key" and pass
31
- * `sessionApiKey` — those endpoints don't accept bearer tokens, only
32
- * `X-Session-API-Key`. "none" sends no auth header.
33
- */
34
11
  authMode?: "bearer" | "session-api-key" | "none";
35
- /** Required when `authMode === "session-api-key"`. */
36
12
  sessionApiKey?: string | null;
37
- /**
38
- * Axios responseType for the inner POST to the bundled agent-server.
39
- * Set to "blob" when the upstream cloud endpoint returns a binary
40
- * payload (e.g. ZIP downloads); leave undefined for default JSON.
41
- */
42
13
  responseType?: "blob";
43
14
  }
44
- /**
45
- * Send a cloud request. App-host calls (`backend.host`) go directly to the
46
- * cloud API with the cloud backend's auth headers. Runtime-sandbox calls
47
- * pass `hostOverride`, and those go through `/api/cloud-proxy` because the
48
- * per-conversation runtime hosts are not the configured cloud app origin.
49
- *
50
- * App-host auth headers are sent directly to the cloud host. Proxied auth
51
- * headers are carried in the proxy envelope and attached server-side.
52
- */
53
15
  export declare function callCloudProxy<TResponse = unknown>(req: CloudProxyRequest): Promise<TResponse>;
@@ -1,44 +1,19 @@
1
- import { getAgentServerBaseUrl as e, getAgentServerHeaders as t } from "../agent-server-config.js";
2
- import { getActiveBackend as n } from "../backend-registry/active-store.js";
3
- import { NoBackendAvailableError as r } from "../agent-server-client-options.js";
4
- import i from "../../node_modules/axios/lib/axios.js";
5
- import { buildAuthHeaders as a } from "../backend-registry/auth.js";
1
+ import { createCloudClient as e, createCloudClientForRuntime as t } from "./client.js";
6
2
  //#region src/api/cloud/proxy.ts
7
- function o(e) {
8
- let t = e.authMode ?? "bearer";
9
- return t === "bearer" ? a(e.backend) : t === "session-api-key" && e.sessionApiKey ? { "X-Session-API-Key": e.sessionApiKey } : {};
10
- }
11
- async function s(a) {
12
- let s = n(), c = s.backend.id === a.backend.id && s.orgId ? { "X-Org-Id": s.orgId } : {}, l = {
13
- ...o(a),
14
- ...c,
15
- ...a.headers ?? {}
16
- }, u = a.hostOverride ?? a.backend.host;
17
- if (!a.hostOverride) return (await i.request({
18
- url: `${u.replace(/\/+$/, "")}${a.path}`,
19
- method: a.method,
20
- headers: l,
21
- ...a.body === void 0 ? {} : { data: a.body },
22
- timeout: (a.timeoutSeconds ?? 30) * 1e3,
23
- ...a.responseType ? { responseType: a.responseType } : {}
24
- })).data;
25
- let d = e();
26
- if (!d) throw new r();
27
- let f = t();
28
- return (await i.post(`${d.replace(/\/+$/, "")}/api/cloud-proxy`, {
29
- host: u,
30
- method: a.method,
31
- path: a.path,
32
- headers: l,
33
- body: a.body ?? null,
34
- ...a.timeoutSeconds ? { timeout_seconds: a.timeoutSeconds } : {}
35
- }, {
36
- headers: f,
37
- timeout: 3e4,
38
- ...a.responseType ? { responseType: a.responseType } : {}
39
- })).data;
3
+ async function n(n) {
4
+ return (n.hostOverride ? t(n.backend) : e(n.backend)).request({
5
+ method: n.method,
6
+ path: n.path,
7
+ body: n.body,
8
+ headers: n.headers,
9
+ timeoutSeconds: n.timeoutSeconds,
10
+ hostOverride: n.hostOverride,
11
+ authMode: n.authMode === void 0 || n.authMode === "bearer" ? "bearer" : n.authMode,
12
+ sessionApiKey: n.sessionApiKey,
13
+ responseType: n.responseType
14
+ });
40
15
  }
41
16
  //#endregion
42
- export { s as callCloudProxy };
17
+ export { n as callCloudProxy };
43
18
 
44
19
  //# sourceMappingURL=proxy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.js","names":[],"sources":["../../../src/api/cloud/proxy.ts"],"sourcesContent":["import axios from \"axios\";\nimport {\n getAgentServerBaseUrl,\n getAgentServerHeaders,\n} from \"../agent-server-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport { NoBackendAvailableError } from \"../agent-server-client-options\";\nimport { buildAuthHeaders } from \"../backend-registry/auth\";\nimport type { Backend } from \"../backend-registry/types\";\n\nexport interface CloudProxyRequest {\n /**\n * Cloud backend whose bearer token authenticates the upstream call.\n * `backend.host` is also the default upstream host unless `hostOverride`\n * is set.\n */\n backend: Backend;\n /** HTTP method against the upstream host. */\n method: \"GET\" | \"POST\" | \"PATCH\" | \"PUT\" | \"DELETE\";\n /** Path on the upstream host, e.g. \"/api/v1/conversation/123/events/search\". */\n path: string;\n /** Optional JSON body for non-GET methods. */\n body?: unknown;\n /** Extra headers merged with the auth header for the upstream call. */\n headers?: Record<string, string>;\n /** Override the upstream timeout, in seconds. */\n timeoutSeconds?: number;\n /**\n * Override the upstream host. When set, the proxy targets this host\n * instead of `backend.host`. Used for runtime-sandbox calls where the\n * upstream lives at the conversation's runtime URL (e.g.\n * `http://<id>.prod-runtime.all-hands.dev`) rather than the cloud API.\n * The host must still pass the proxy's allowlist server-side.\n */\n hostOverride?: string;\n /**\n * Auth strategy for the upstream call. Defaults to \"bearer\" (uses the\n * cloud backend's bearer token via `buildAuthHeaders`). For\n * runtime-sandbox calls, set to \"session-api-key\" and pass\n * `sessionApiKey` — those endpoints don't accept bearer tokens, only\n * `X-Session-API-Key`. \"none\" sends no auth header.\n */\n authMode?: \"bearer\" | \"session-api-key\" | \"none\";\n /** Required when `authMode === \"session-api-key\"`. */\n sessionApiKey?: string | null;\n /**\n * Axios responseType for the inner POST to the bundled agent-server.\n * Set to \"blob\" when the upstream cloud endpoint returns a binary\n * payload (e.g. ZIP downloads); leave undefined for default JSON.\n */\n responseType?: \"blob\";\n}\n\nfunction buildUpstreamAuthHeaders(\n req: CloudProxyRequest,\n): Record<string, string> {\n const mode = req.authMode ?? \"bearer\";\n if (mode === \"bearer\") return buildAuthHeaders(req.backend);\n if (mode === \"session-api-key\") {\n return req.sessionApiKey ? { \"X-Session-API-Key\": req.sessionApiKey } : {};\n }\n return {};\n}\n\n/**\n * Send a cloud request. App-host calls (`backend.host`) go directly to the\n * cloud API with the cloud backend's auth headers. Runtime-sandbox calls\n * pass `hostOverride`, and those go through `/api/cloud-proxy` because the\n * per-conversation runtime hosts are not the configured cloud app origin.\n *\n * App-host auth headers are sent directly to the cloud host. Proxied auth\n * headers are carried in the proxy envelope and attached server-side.\n */\nexport async function callCloudProxy<TResponse = unknown>(\n req: CloudProxyRequest,\n): Promise<TResponse> {\n // Send `X-Org-Id` so the upstream scopes per-request to the org the user\n // selected locally, instead of the user's globally-shared\n // `current_org_id` on the cloud backend. Restricted to calls against the active\n // backend: the selector also fans out per-backend bookkeeping calls\n // (e.g. `getCloudOrganizations(b)`) that would otherwise carry the\n // active backend's orgId across an unrelated API key, which the cloud backend\n // rejects when api_key_org_id and X-Org-Id disagree.\n const active = getActiveBackend();\n const orgIdHeader =\n active.backend.id === req.backend.id && active.orgId\n ? { \"X-Org-Id\": active.orgId }\n : {};\n const upstreamHeaders = {\n ...buildUpstreamAuthHeaders(req),\n ...orgIdHeader,\n ...(req.headers ?? {}),\n };\n const upstreamHost = req.hostOverride ?? req.backend.host;\n\n if (!req.hostOverride) {\n const response = await axios.request<TResponse>({\n url: `${upstreamHost.replace(/\\/+$/, \"\")}${req.path}`,\n method: req.method,\n headers: upstreamHeaders,\n ...(req.body !== undefined ? { data: req.body } : {}),\n timeout: (req.timeoutSeconds ?? 30) * 1000,\n ...(req.responseType ? { responseType: req.responseType } : {}),\n });\n\n return response.data;\n }\n\n const proxyBaseUrl = getAgentServerBaseUrl();\n if (!proxyBaseUrl) throw new NoBackendAvailableError();\n const localAuthHeaders = getAgentServerHeaders();\n\n // Talk to the configured app/ingress origin that exposes /api/cloud-proxy.\n // Do not resolve this through the backend registry: when the active backend\n // is cloud, borrowing some other registered local backend would silently\n // route cloud traffic through the wrong user-configured server.\n const response = await axios.post<TResponse>(\n `${proxyBaseUrl.replace(/\\/+$/, \"\")}/api/cloud-proxy`,\n {\n host: upstreamHost,\n method: req.method,\n path: req.path,\n headers: upstreamHeaders,\n body: req.body ?? null,\n ...(req.timeoutSeconds ? { timeout_seconds: req.timeoutSeconds } : {}),\n },\n {\n headers: localAuthHeaders,\n timeout: 30_000,\n ...(req.responseType ? { responseType: req.responseType } : {}),\n },\n );\n\n return response.data;\n}\n"],"mappings":";;;;;;AAqDA,SAAS,EACP,GACwB;CACxB,IAAM,IAAO,EAAI,YAAY;AAK7B,QAJI,MAAS,WAAiB,EAAiB,EAAI,QAAQ,GACvD,MAAS,qBACJ,EAAI,gBAAgB,EAAE,qBAAqB,EAAI,eAAe,GAAG,EAAE;;AAc9E,eAAsB,EACpB,GACoB;CAQpB,IAAM,IAAS,GAAkB,EAC3B,IACJ,EAAO,QAAQ,OAAO,EAAI,QAAQ,MAAM,EAAO,QAC3C,EAAE,YAAY,EAAO,OAAO,GAC5B,EAAE,EACF,IAAkB;EACtB,GAAG,EAAyB,EAAI;EAChC,GAAG;EACH,GAAI,EAAI,WAAW,EAAE;EACtB,EACK,IAAe,EAAI,gBAAgB,EAAI,QAAQ;AAErD,KAAI,CAAC,EAAI,aAUP,SAAO,MATgB,EAAM,QAAmB;EAC9C,KAAK,GAAG,EAAa,QAAQ,QAAQ,GAAG,GAAG,EAAI;EAC/C,QAAQ,EAAI;EACZ,SAAS;EACT,GAAI,EAAI,SAAS,KAAA,IAAiC,EAAE,GAAvB,EAAE,MAAM,EAAI,MAAM;EAC/C,UAAU,EAAI,kBAAkB,MAAM;EACtC,GAAI,EAAI,eAAe,EAAE,cAAc,EAAI,cAAc,GAAG,EAAE;EAC/D,CAAC,EAEc;CAGlB,IAAM,IAAe,GAAuB;AAC5C,KAAI,CAAC,EAAc,OAAM,IAAI,GAAyB;CACtD,IAAM,IAAmB,GAAuB;AAuBhD,SAAO,MAjBgB,EAAM,KAC3B,GAAG,EAAa,QAAQ,QAAQ,GAAG,CAAC,mBACpC;EACE,MAAM;EACN,QAAQ,EAAI;EACZ,MAAM,EAAI;EACV,SAAS;EACT,MAAM,EAAI,QAAQ;EAClB,GAAI,EAAI,iBAAiB,EAAE,iBAAiB,EAAI,gBAAgB,GAAG,EAAE;EACtE,EACD;EACE,SAAS;EACT,SAAS;EACT,GAAI,EAAI,eAAe,EAAE,cAAc,EAAI,cAAc,GAAG,EAAE;EAC/D,CACF,EAEe"}
1
+ {"version":3,"file":"proxy.js","names":[],"sources":["../../../src/api/cloud/proxy.ts"],"sourcesContent":["import type { CloudRequestOptions } from \"@openhands/typescript-client/clients\";\nimport type { Backend } from \"../backend-registry/types\";\nimport { createCloudClientForRuntime, createCloudClient } from \"./client\";\n\nexport interface CloudProxyRequest {\n backend: Backend;\n method: CloudRequestOptions[\"method\"];\n path: string;\n body?: unknown;\n headers?: Record<string, string>;\n timeoutSeconds?: number;\n hostOverride?: string;\n authMode?: \"bearer\" | \"session-api-key\" | \"none\";\n sessionApiKey?: string | null;\n responseType?: \"blob\";\n}\n\nexport async function callCloudProxy<TResponse = unknown>(\n req: CloudProxyRequest,\n): Promise<TResponse> {\n const client = req.hostOverride\n ? createCloudClientForRuntime(req.backend)\n : createCloudClient(req.backend);\n\n return client.request<TResponse>({\n method: req.method,\n path: req.path,\n body: req.body,\n headers: req.headers,\n timeoutSeconds: req.timeoutSeconds,\n hostOverride: req.hostOverride,\n authMode:\n req.authMode === undefined || req.authMode === \"bearer\"\n ? \"bearer\"\n : req.authMode,\n sessionApiKey: req.sessionApiKey,\n responseType: req.responseType,\n });\n}\n"],"mappings":";;AAiBA,eAAsB,EACpB,GACoB;AAKpB,SAJe,EAAI,eACf,EAA4B,EAAI,QAAQ,GACxC,EAAkB,EAAI,QAAQ,EAEpB,QAAmB;EAC/B,QAAQ,EAAI;EACZ,MAAM,EAAI;EACV,MAAM,EAAI;EACV,SAAS,EAAI;EACb,gBAAgB,EAAI;EACpB,cAAc,EAAI;EAClB,UACE,EAAI,aAAa,KAAA,KAAa,EAAI,aAAa,WAC3C,WACA,EAAI;EACV,eAAe,EAAI;EACnB,cAAc,EAAI;EACnB,CAAC"}
@@ -1,2 +1,2 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);var e=`openhands-agent-server-conversation-metadata`,t=()=>{if(typeof window>`u`)return{};try{let t=window.localStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return!n||typeof n!=`object`?{}:n}catch{return{}}},n=t=>{if(!(typeof window>`u`)){if(Object.keys(t).length===0){window.localStorage.removeItem(e);return}window.localStorage.setItem(e,JSON.stringify(t))}},r=e=>t()[e]??null,i=(e,r)=>{let i=t();i[e]=r,n(i)},a=e=>{let r=t();e in r&&(delete r[e],n(r))};exports.getStoredConversationMetadata=r,exports.removeStoredConversationMetadata=a,exports.setStoredConversationMetadata=i;
1
+ require(`../_virtual/_rolldown/runtime.cjs`);var e=`openhands-agent-server-conversation-metadata`,t=e=>({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}),n=()=>{if(typeof window>`u`)return{};try{let t=window.localStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return!n||typeof n!=`object`?{}:n}catch{return{}}},r=t=>{if(!(typeof window>`u`)){if(Object.keys(t).length===0){window.localStorage.removeItem(e);return}window.localStorage.setItem(e,JSON.stringify(t))}},i=e=>n()[e]??null,a=(e,t)=>{let i=n();i[e]=t,r(i)},o=e=>{let t=n();e in t&&(delete t[e],r(t))};exports.getStoredConversationMetadata=i,exports.removeStoredConversationMetadata=o,exports.setStoredConversationMetadata=a,exports.toPluginCoordinates=t;
2
2
  //# sourceMappingURL=conversation-metadata-store.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-metadata-store.cjs","names":[],"sources":["../../src/api/conversation-metadata-store.ts"],"sourcesContent":["import { Provider } from \"#/types/settings\";\nimport type { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\n\nconst STORAGE_KEY = \"openhands-agent-server-conversation-metadata\";\n\nexport type WorkspaceMode = \"local_repo\" | \"new_worktree\";\n\nexport interface ConversationMetadata {\n selected_repository: string | null;\n selected_branch: string | null;\n git_provider: Provider | null;\n /**\n * The local workspace path the user explicitly attached at conversation\n * creation time. Distinct from `selected_repository` (which is set by\n * the repo picker on the home page). Used by the Files tab to decide\n * whether to default to diff view: if the user attached *anything*\n * (repo or local workspace), we lean diff-first because there's a real\n * git baseline to compare against.\n */\n selected_workspace?: string | null;\n /**\n * How the conversation should use `selected_workspace`.\n *\n * `local_repo` means the runtime should operate directly in the selected\n * folder, even when it is not a git checkout. `new_worktree` preserves the\n * historical agent-server behavior for conversations that should start in a\n * generated per-conversation worktree.\n */\n workspace_mode?: WorkspaceMode | null;\n /**\n * The LLM profile the conversation was created with (or last switched to).\n * Client-side only. Lets the chat-header switcher show the exact profile\n * name even when several profiles share the same underlying model — the\n * agent-server only round-trips the model string, so matching on it alone\n * is ambiguous (issue #1082).\n */\n active_profile?: string | null;\n /**\n * Snapshot of the plugins loaded into the conversation, captured at creation\n * (coordinates only — `parameters` are stripped): plugins explicitly attached\n * at creation plus the enabled installed plugins the SDK auto-loads into new\n * local conversations. The agent-server doesn't expose a live conversation's\n * loaded plugins, so this is the client-side source for the in-conversation\n * plugins view. Local + forward-only: only set for conversations created\n * after this shipped, and only when `app_conversation_id` is known.\n */\n plugins?: PluginSpec[] | null;\n}\n\ntype StoredMetadata = Record<string, ConversationMetadata>;\n\nconst readAll = (): StoredMetadata => {\n if (typeof window === \"undefined\") return {};\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY);\n if (!raw) return {};\n const parsed = JSON.parse(raw) as unknown;\n if (!parsed || typeof parsed !== \"object\") return {};\n return parsed as StoredMetadata;\n } catch {\n return {};\n }\n};\n\nconst writeAll = (next: StoredMetadata): void => {\n if (typeof window === \"undefined\") return;\n if (Object.keys(next).length === 0) {\n window.localStorage.removeItem(STORAGE_KEY);\n return;\n }\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(next));\n};\n\nexport const getStoredConversationMetadata = (\n conversationId: string,\n): ConversationMetadata | null => readAll()[conversationId] ?? null;\n\nexport const setStoredConversationMetadata = (\n conversationId: string,\n metadata: ConversationMetadata,\n): void => {\n const all = readAll();\n all[conversationId] = metadata;\n writeAll(all);\n};\n\nexport const removeStoredConversationMetadata = (\n conversationId: string,\n): void => {\n const all = readAll();\n if (!(conversationId in all)) return;\n delete all[conversationId];\n writeAll(all);\n};\n"],"mappings":"6CAGA,IAAM,EAAc,+CAgDd,MAAgC,CACpC,GAAI,OAAO,OAAW,IAAa,MAAO,EAAE,CAC5C,GAAI,CACF,IAAM,EAAM,OAAO,aAAa,QAAQ,EAAY,CACpD,GAAI,CAAC,EAAK,MAAO,EAAE,CACnB,IAAM,EAAS,KAAK,MAAM,EAAI,CAE9B,MADI,CAAC,GAAU,OAAO,GAAW,SAAiB,EAAE,CAC7C,OACD,CACN,MAAO,EAAE,GAIP,EAAY,GAA+B,CAC3C,YAAO,OAAW,KACtB,IAAI,OAAO,KAAK,EAAK,CAAC,SAAW,EAAG,CAClC,OAAO,aAAa,WAAW,EAAY,CAC3C,OAEF,OAAO,aAAa,QAAQ,EAAa,KAAK,UAAU,EAAK,CAAC,GAGnD,EACX,GACgC,GAAS,CAAC,IAAmB,KAElD,GACX,EACA,IACS,CACT,IAAM,EAAM,GAAS,CACrB,EAAI,GAAkB,EACtB,EAAS,EAAI,EAGF,EACX,GACS,CACT,IAAM,EAAM,GAAS,CACf,KAAkB,IACxB,OAAO,EAAI,GACX,EAAS,EAAI"}
1
+ {"version":3,"file":"conversation-metadata-store.cjs","names":[],"sources":["../../src/api/conversation-metadata-store.ts"],"sourcesContent":["import { Provider } from \"#/types/settings\";\nimport type { PluginSpec } from \"#/api/conversation-service/agent-server-conversation-service.types\";\n\nconst STORAGE_KEY = \"openhands-agent-server-conversation-metadata\";\n\nexport type WorkspaceMode = \"local_repo\" | \"new_worktree\";\n\nexport interface ConversationMetadata {\n selected_repository: string | null;\n selected_branch: string | null;\n git_provider: Provider | null;\n /**\n * The local workspace path the user explicitly attached at conversation\n * creation time. Distinct from `selected_repository` (which is set by\n * the repo picker on the home page). Used by the Files tab to decide\n * whether to default to diff view: if the user attached *anything*\n * (repo or local workspace), we lean diff-first because there's a real\n * git baseline to compare against.\n */\n selected_workspace?: string | null;\n /**\n * How the conversation should use `selected_workspace`.\n *\n * `local_repo` means the runtime should operate directly in the selected\n * folder, even when it is not a git checkout. `new_worktree` preserves the\n * historical agent-server behavior for conversations that should start in a\n * generated per-conversation worktree.\n */\n workspace_mode?: WorkspaceMode | null;\n /**\n * The LLM profile the conversation was created with (or last switched to).\n * Client-side only. Lets the chat-header switcher show the exact profile\n * name even when several profiles share the same underlying model — the\n * agent-server only round-trips the model string, so matching on it alone\n * is ambiguous (issue #1082).\n */\n active_profile?: string | null;\n /** Store plugin coordinates only; parameters may contain secrets. */\n plugins?: PluginSpec[] | null;\n}\n\nexport const toPluginCoordinates = (plugin: PluginSpec): PluginSpec => ({\n source: plugin.source,\n ref: plugin.ref ?? null,\n repo_path: plugin.repo_path ?? null,\n});\n\ntype StoredMetadata = Record<string, ConversationMetadata>;\n\nconst readAll = (): StoredMetadata => {\n if (typeof window === \"undefined\") return {};\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY);\n if (!raw) return {};\n const parsed = JSON.parse(raw) as unknown;\n if (!parsed || typeof parsed !== \"object\") return {};\n return parsed as StoredMetadata;\n } catch {\n return {};\n }\n};\n\nconst writeAll = (next: StoredMetadata): void => {\n if (typeof window === \"undefined\") return;\n if (Object.keys(next).length === 0) {\n window.localStorage.removeItem(STORAGE_KEY);\n return;\n }\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(next));\n};\n\nexport const getStoredConversationMetadata = (\n conversationId: string,\n): ConversationMetadata | null => readAll()[conversationId] ?? null;\n\nexport const setStoredConversationMetadata = (\n conversationId: string,\n metadata: ConversationMetadata,\n): void => {\n const all = readAll();\n all[conversationId] = metadata;\n writeAll(all);\n};\n\nexport const removeStoredConversationMetadata = (\n conversationId: string,\n): void => {\n const all = readAll();\n if (!(conversationId in all)) return;\n delete all[conversationId];\n writeAll(all);\n};\n"],"mappings":"6CAGA,IAAM,EAAc,+CAsCP,EAAuB,IAAoC,CACtE,OAAQ,EAAO,OACf,IAAK,EAAO,KAAO,KACnB,UAAW,EAAO,WAAa,KAChC,EAIK,MAAgC,CACpC,GAAI,OAAO,OAAW,IAAa,MAAO,EAAE,CAC5C,GAAI,CACF,IAAM,EAAM,OAAO,aAAa,QAAQ,EAAY,CACpD,GAAI,CAAC,EAAK,MAAO,EAAE,CACnB,IAAM,EAAS,KAAK,MAAM,EAAI,CAE9B,MADI,CAAC,GAAU,OAAO,GAAW,SAAiB,EAAE,CAC7C,OACD,CACN,MAAO,EAAE,GAIP,EAAY,GAA+B,CAC3C,YAAO,OAAW,KACtB,IAAI,OAAO,KAAK,EAAK,CAAC,SAAW,EAAG,CAClC,OAAO,aAAa,WAAW,EAAY,CAC3C,OAEF,OAAO,aAAa,QAAQ,EAAa,KAAK,UAAU,EAAK,CAAC,GAGnD,EACX,GACgC,GAAS,CAAC,IAAmB,KAElD,GACX,EACA,IACS,CACT,IAAM,EAAM,GAAS,CACrB,EAAI,GAAkB,EACtB,EAAS,EAAI,EAGF,EACX,GACS,CACT,IAAM,EAAM,GAAS,CACf,KAAkB,IACxB,OAAO,EAAI,GACX,EAAS,EAAI"}
@@ -31,17 +31,10 @@ export interface ConversationMetadata {
31
31
  * is ambiguous (issue #1082).
32
32
  */
33
33
  active_profile?: string | null;
34
- /**
35
- * Snapshot of the plugins loaded into the conversation, captured at creation
36
- * (coordinates only — `parameters` are stripped): plugins explicitly attached
37
- * at creation plus the enabled installed plugins the SDK auto-loads into new
38
- * local conversations. The agent-server doesn't expose a live conversation's
39
- * loaded plugins, so this is the client-side source for the in-conversation
40
- * plugins view. Local + forward-only: only set for conversations created
41
- * after this shipped, and only when `app_conversation_id` is known.
42
- */
34
+ /** Store plugin coordinates only; parameters may contain secrets. */
43
35
  plugins?: PluginSpec[] | null;
44
36
  }
37
+ export declare const toPluginCoordinates: (plugin: PluginSpec) => PluginSpec;
45
38
  export declare const getStoredConversationMetadata: (conversationId: string) => ConversationMetadata | null;
46
39
  export declare const setStoredConversationMetadata: (conversationId: string, metadata: ConversationMetadata) => void;
47
40
  export declare const removeStoredConversationMetadata: (conversationId: string) => void;
@@ -1,5 +1,9 @@
1
1
  //#region src/api/conversation-metadata-store.ts
2
- var e = "openhands-agent-server-conversation-metadata", t = () => {
2
+ var e = "openhands-agent-server-conversation-metadata", t = (e) => ({
3
+ source: e.source,
4
+ ref: e.ref ?? null,
5
+ repo_path: e.repo_path ?? null
6
+ }), n = () => {
3
7
  if (typeof window > "u") return {};
4
8
  try {
5
9
  let t = window.localStorage.getItem(e);
@@ -9,7 +13,7 @@ var e = "openhands-agent-server-conversation-metadata", t = () => {
9
13
  } catch {
10
14
  return {};
11
15
  }
12
- }, n = (t) => {
16
+ }, r = (t) => {
13
17
  if (!(typeof window > "u")) {
14
18
  if (Object.keys(t).length === 0) {
15
19
  window.localStorage.removeItem(e);
@@ -17,14 +21,14 @@ var e = "openhands-agent-server-conversation-metadata", t = () => {
17
21
  }
18
22
  window.localStorage.setItem(e, JSON.stringify(t));
19
23
  }
20
- }, r = (e) => t()[e] ?? null, i = (e, r) => {
21
- let i = t();
22
- i[e] = r, n(i);
23
- }, a = (e) => {
24
- let r = t();
25
- e in r && (delete r[e], n(r));
24
+ }, i = (e) => n()[e] ?? null, a = (e, t) => {
25
+ let i = n();
26
+ i[e] = t, r(i);
27
+ }, o = (e) => {
28
+ let t = n();
29
+ e in t && (delete t[e], r(t));
26
30
  };
27
31
  //#endregion
28
- export { r as getStoredConversationMetadata, a as removeStoredConversationMetadata, i as setStoredConversationMetadata };
32
+ export { i as getStoredConversationMetadata, o as removeStoredConversationMetadata, a as setStoredConversationMetadata, t as toPluginCoordinates };
29
33
 
30
34
  //# sourceMappingURL=conversation-metadata-store.js.map