@openhands/agent-canvas 1.14.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1855) hide show
  1. package/README.md +15 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/acp-providers-CX3Lh9gj.js +1 -0
  4. package/build/assets/active-backend-context-CrHTlgvN.js +2 -0
  5. package/build/assets/agent-context-settings-DSZlXrLj.js +1 -0
  6. package/build/assets/agent-profiles-settings-Dzgb7G9z.js +1 -0
  7. package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +86 -0
  8. package/build/assets/agent-settings-DLtsqaOs.js +2 -0
  9. package/build/assets/agent-settings-fFvR-XC2.js +1 -0
  10. package/build/assets/alert-banner-HP6mX-Vr.js +1 -0
  11. package/build/assets/api-error-message-B-XdSk3b.js +1 -0
  12. package/build/assets/api-key-entry-screen-qTzrmJcr.js +1 -0
  13. package/build/assets/app-settings-dbnneVaV.js +1 -0
  14. package/build/assets/automation-detail-BmwlCUAB.js +3 -0
  15. package/build/assets/automation-export-D3a3of4G.js +2 -0
  16. package/build/assets/automation-git-sync-CprN5DcU.js +1 -0
  17. package/build/assets/automation-setup-route-C40kXjMY.js +1 -0
  18. package/build/assets/automation-templates-BRppNh99.js +1 -0
  19. package/build/assets/automations-list-DuNcRawl.js +1 -0
  20. package/build/assets/back-nav-button-Cjl_hoxq.js +1 -0
  21. package/build/assets/backend-form-modal-lhGwzXFI.js +1 -0
  22. package/build/assets/backend-synced-settings-badge-DPkz30BE.js +1 -0
  23. package/build/assets/badge-BU3S0VtE.js +1 -0
  24. package/build/assets/base-modal-D_L0oEbG.js +1 -0
  25. package/build/assets/bot-dMYHVfYM.js +1 -0
  26. package/build/assets/brand-button-BAfk4wGP.js +1 -0
  27. package/build/assets/browser-DSAo0tz1.js +46 -0
  28. package/build/assets/browser-tab-C9vy56R5.js +1 -0
  29. package/build/assets/canvas-extension-page-dx1gFrfW.js +1 -0
  30. package/build/assets/canvas-extensions-8A-XhpgP.js +1 -0
  31. package/build/assets/canvas-extensions-runtime-2_x5Ezmi.js +1 -0
  32. package/build/assets/chat-send-button-MUQqCZCS.js +1 -0
  33. package/build/assets/check-CS0vmpQQ.js +1 -0
  34. package/build/assets/chevron-down-e1QBpjVy.js +1 -0
  35. package/build/assets/chevron-right-ZG4R5G4Q.js +1 -0
  36. package/build/assets/circle-check-DzWLNsbE.js +1 -0
  37. package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +1 -0
  38. package/build/assets/cloud-funnel-analytics-CztBCCPp.js +1 -0
  39. package/build/assets/cog-D-MPQW6G.js +1 -0
  40. package/build/assets/command-menu--UIlGL72.js +1 -0
  41. package/build/assets/commits-tab-AnZwLvh-.js +1 -0
  42. package/build/assets/condenser-settings-DmEOje-7.js +1 -0
  43. package/build/assets/confirmation-modal-Dv1ktp8K.js +1 -0
  44. package/build/assets/context-menu-list-item-I86vKcmM.js +1 -0
  45. package/build/assets/conversation-BbGrAO4Z.js +93 -0
  46. package/build/assets/conversation-mYT6NAoj.js +1 -0
  47. package/build/assets/conversation-panel-mYT6NAoj.js +1 -0
  48. package/build/assets/conversation-state-store-B0ImPLHO.js +1 -0
  49. package/build/assets/conversation-store-Ca3ghXap.js +6 -0
  50. package/build/assets/conversation-tab-empty-state-FIbh_lc8.js +1 -0
  51. package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +1 -0
  52. package/build/assets/device-verify-Bhn2e_Ye.js +1 -0
  53. package/build/assets/dropdown-classes-Bc1djN0-.js +1 -0
  54. package/build/assets/edit-automation-modal-DadGbJ2u.js +1 -0
  55. package/build/assets/empty-state-BoGVDecT.js +1 -0
  56. package/build/assets/entry.client-CqyPPjOq.js +2 -0
  57. package/build/assets/enum-filter-dropdown-Bgca129f.js +1 -0
  58. package/build/assets/environment-switch-overlay-BmBRT7gv.js +1 -0
  59. package/build/assets/error-state-Body8Ngd.js +1 -0
  60. package/build/assets/extension-module-card-classes-DpeaYhYo.js +1 -0
  61. package/build/assets/extensions-hub-CcDqq_vR.js +1 -0
  62. package/build/assets/extensions-navigation-Cr4yzYk4.js +1 -0
  63. package/build/assets/external-link-DKUlnCQV.js +1 -0
  64. package/build/assets/files-tab-D4o2VyE_.js +1 -0
  65. package/build/assets/form-control-classes-Bkh5FGrD.js +1 -0
  66. package/build/assets/format-model-name-CasAP3nd.js +1 -0
  67. package/build/assets/get-git-path-ChKDVHZp.js +1 -0
  68. package/build/assets/git-repo-dropdown-4ROKl2cB.js +1 -0
  69. package/build/assets/git-repo-dropdown-BkqzkMmM.js +1 -0
  70. package/build/assets/highlighted-source-view-BFRxGT_Q.js +1 -0
  71. package/build/assets/home-ChpSuepX.js +1 -0
  72. package/build/assets/home-DIsB440S.js +1 -0
  73. package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +1 -0
  74. package/build/assets/home-store-CY9Ej0ux.js +1 -0
  75. package/build/assets/index-home-BdlrFIif.js +1 -0
  76. package/build/assets/info-B6RQawoW.js +1 -0
  77. package/build/assets/install-server-modal-Dpy89p4g.js +1 -0
  78. package/build/assets/kebab-menu-item-content-D8hSNGmm.js +1 -0
  79. package/build/assets/key-BmVyxs-2.js +1 -0
  80. package/build/assets/launch-IrTDEFCs.js +1 -0
  81. package/build/assets/list-filter-DsEK7NFC.js +1 -0
  82. package/build/assets/list-todo-apgLVjMw.js +1 -0
  83. package/build/assets/llm-not-configured-banner-CIFABh3K.js +27 -0
  84. package/build/assets/llm-settings-B9juXhIa.js +1 -0
  85. package/build/assets/llm-settings-De1d5dfr.js +1 -0
  86. package/build/assets/llm-subscription-service-BpJ0ouQo.js +1 -0
  87. package/build/assets/loader-circle-CC1au6hc.js +1 -0
  88. package/build/assets/loading-spinner-BY9N3pOe.js +1 -0
  89. package/build/assets/manage-backends-modal-BrPV3oB-.js +1 -0
  90. package/build/assets/manifest-80fb1c29.js +1 -0
  91. package/build/assets/manifest-subpage-layout-CAOYzrYp.js +1 -0
  92. package/build/assets/map-provider-Cu3Zgumb.js +1 -0
  93. package/build/assets/markdown-renderer-BzTlxI8x.js +8 -0
  94. package/build/assets/mcp-BTs_SXfZ.js +1 -0
  95. package/build/assets/mcp-marketplace-utils-AIBzzHTO.js +1 -0
  96. package/build/assets/mcp-page-BEBYqH_K.js +9 -0
  97. package/build/assets/messages-DKV9cRc2.js +41 -0
  98. package/build/assets/modal-body-BxZjsju9.js +1 -0
  99. package/build/assets/modal-classes-C8eycCwG.js +1 -0
  100. package/build/assets/modal-close-button-DDzdRvCs.js +1 -0
  101. package/build/assets/mouse-pointer-click-Co2uyaPA.js +1 -0
  102. package/build/assets/onboarding-DV_OXoeP.js +1 -0
  103. package/build/assets/onboarding-modal-rkyBYkeQ.js +1 -0
  104. package/build/assets/organization-service.api-DrYNkEN_.js +1 -0
  105. package/build/assets/parse-git-remote-url-DpDM9bK6.js +1 -0
  106. package/build/assets/pencil-47jAZH_V.js +1 -0
  107. package/build/assets/pin-By41Vl5J.js +1 -0
  108. package/build/assets/planner-tab-C9uZmhme.js +1 -0
  109. package/build/assets/plug-CG5HFcNG.js +1 -0
  110. package/build/assets/plugins-management-service-BMJgC3Ga.js +1 -0
  111. package/build/assets/plus-C7Slq-0I.js +1 -0
  112. package/build/assets/profiles-service.api-ChoKrL0l.js +1 -0
  113. package/build/assets/providers-BhMcY5nv.js +1 -0
  114. package/build/assets/proxy-9Fe1v5na.js +1 -0
  115. package/build/assets/puzzle-JM_QaRm0.js +1 -0
  116. package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +1 -0
  117. package/build/assets/refresh-cw-3q3Frrii.js +1 -0
  118. package/build/assets/root-Dc8YmC9F.js +2 -0
  119. package/build/assets/root-VDaypvK4.css +1 -0
  120. package/build/assets/root-layout-CXkhSPYh.js +2 -0
  121. package/build/assets/schema-field-D-y9-LDb.js +1 -0
  122. package/build/assets/scroll-fade-state-Dw-i4SGq.js +1 -0
  123. package/build/assets/sdk-section-page-BlFiizlG.js +1 -0
  124. package/build/assets/secret-form-BB7the8W.js +1 -0
  125. package/build/assets/secrets-service-ByZVENbp.js +1 -0
  126. package/build/assets/secrets-settings-B_GpxKW2.js +1 -0
  127. package/build/assets/server-process-C9RKzd1x.js +1 -0
  128. package/build/assets/settings-C0EWuBtA.js +1 -0
  129. package/build/assets/settings-CKqk8ZnH.js +1 -0
  130. package/build/assets/settings-dropdown-input-BcwylHs2.js +1 -0
  131. package/build/assets/settings-index-5w5UW2K3.js +1 -0
  132. package/build/assets/settings-input-Db-1g8Ql.js +1 -0
  133. package/build/assets/settings-list-classes-BzeSZbF2.js +1 -0
  134. package/build/assets/settings-modal-DfJ3tcJQ.js +1 -0
  135. package/build/assets/settings-service.api-DJ1r62Zr.js +1 -0
  136. package/build/assets/settings-switch-CS-dJDmA.js +1 -0
  137. package/build/assets/settings-utils-UYpEdPuD.js +1 -0
  138. package/build/assets/shared-conversation-CA5ISEDy.js +1 -0
  139. package/build/assets/shield-check-D2aCRd16.js +1 -0
  140. package/build/assets/sidebar-layout-D6fS8-Gl.js +1 -0
  141. package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +1 -0
  142. package/build/assets/sidebar-nav-link-DQQcMf1A.js +1 -0
  143. package/build/assets/sidebar-onboarding-checklist-storage-BBkeI6Bp.js +1 -0
  144. package/build/assets/sidebar-store-DGqHkVLw.js +1 -0
  145. package/build/assets/skill-card-pill-row-B27-xyig.js +1 -0
  146. package/build/assets/skill-enablement-DXeaImBz.js +1 -0
  147. package/build/assets/skill-filter-w__3UCEE.js +2 -0
  148. package/build/assets/skill-icon-badge-RQkq8wvl.js +1 -0
  149. package/build/assets/skill-scope-B42H-XOc.js +1 -0
  150. package/build/assets/skills-plugins-tgF8EiXC.js +1 -0
  151. package/build/assets/skills-settings-BgJ9PaOe.js +1 -0
  152. package/build/assets/styled-tooltip-C4jf5Fv9.js +1 -0
  153. package/build/assets/task-list-tab-C5zcaktH.js +1 -0
  154. package/build/assets/terminal-CNElN42a.js +3 -0
  155. package/build/assets/toggle-switch-ChOLXv2n.js +1 -0
  156. package/build/assets/trash-2-D7K26eDO.js +1 -0
  157. package/build/assets/trash-D-HYiVYM.js +1 -0
  158. package/build/assets/triangle-alert-CtdXWHUI.js +1 -0
  159. package/build/assets/typography-v1KN0tzi.js +1 -0
  160. package/build/assets/usage-tab-CVDffLPt.js +1 -0
  161. package/build/assets/use-acp-credential-form-XIQmpX6M.js +1 -0
  162. package/build/assets/use-activate-agent-profile-BLfmvDiG.js +1 -0
  163. package/build/assets/use-agent-profiles-Bd9Bvvp1.js +1 -0
  164. package/build/assets/use-automation-health-E6NZi9rb.js +1 -0
  165. package/build/assets/use-automations-xijQKIl9.js +1 -0
  166. package/build/assets/use-can-manage-org-profiles-CrJP5262.js +1 -0
  167. package/build/assets/use-canvas-extensions-Bi693ujJ.js +1 -0
  168. package/build/assets/use-cloud-current-user-id-CDfAHpPX.js +1 -0
  169. package/build/assets/use-config-A9QovgXO.js +1 -0
  170. package/build/assets/use-create-conversation-Dx3l7mFZ.js +1 -0
  171. package/build/assets/use-create-secret-B9cUFWRG.js +1 -0
  172. package/build/assets/use-get-secrets-K3jmk-LH.js +1 -0
  173. package/build/assets/use-has-permission-B3C8rQmR.js +1 -0
  174. package/build/assets/use-is-authed-nTBcM7dE.js +1 -0
  175. package/build/assets/use-launch-skill-in-chat-BYjYihBP.js +1 -0
  176. package/build/assets/use-llm-configured-BV9nZ1_j.js +1 -0
  177. package/build/assets/use-llm-profiles-BO-P4Oyo.js +1 -0
  178. package/build/assets/use-manifest-capabilities-Cw_flwEz.js +1 -0
  179. package/build/assets/use-onboarding-completion-D8U7k4Qb.js +1 -0
  180. package/build/assets/use-pinned-home-route-CckOZrmb.js +1 -0
  181. package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +1 -0
  182. package/build/assets/use-save-agent-profile-BUjSsDXK.js +1 -0
  183. package/build/assets/use-save-settings-DYqkKv7T.js +1 -0
  184. package/build/assets/use-settings-DSXLbvBl.js +1 -0
  185. package/build/assets/use-settings-nav-items-CwRw-CmX.js +16 -0
  186. package/build/assets/use-tracking-D53y3TH9.js +3 -0
  187. package/build/assets/use-user-conversation-B9Gebw_g.js +1 -0
  188. package/build/assets/useInfiniteQuery-C926xzY4.js +1 -0
  189. package/build/assets/useMutation-B-qc391N.js +1 -0
  190. package/build/assets/useQueries-DlbhlH9I.js +1 -0
  191. package/build/assets/useQuery-BSTgq1rl.js +1 -0
  192. package/build/assets/utils-CN5ZfZy1.js +1 -0
  193. package/build/assets/vendor~browser-hbU4u2Ag.js +47 -0
  194. package/build/assets/vendor~commits-tab-BaO2Ce3e.js +11 -0
  195. package/build/assets/vendor~conversation-panel~conversation-C8Fn4XOf.js +1 -0
  196. package/build/assets/vendor~entry.client-CoCfUXUF.js +1 -0
  197. package/build/assets/vendor~entry.client-DA2izTjq.js +9 -0
  198. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +186 -0
  199. package/build/assets/vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js +13 -0
  200. package/build/assets/vendor~root-layout-C9Ju9DQg.js +1 -0
  201. package/build/assets/vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js +1 -0
  202. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +1 -0
  203. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js +1 -0
  204. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +1 -0
  205. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js +1 -0
  206. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +1 -0
  207. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js +48 -0
  208. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js +5053 -0
  209. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js +8459 -0
  210. package/build/assets/verification-settings-gw_q6vkL.js +1 -0
  211. package/build/assets/wrench-CUEI1krB.js +1 -0
  212. package/build/assets/x-DJdhbdmt.js +1 -0
  213. package/build/index.html +4 -4
  214. package/build/locales/ar/openhands.json +156 -59
  215. package/build/locales/ca/openhands.json +156 -59
  216. package/build/locales/de/openhands.json +156 -59
  217. package/build/locales/en/openhands.json +156 -59
  218. package/build/locales/es/openhands.json +156 -59
  219. package/build/locales/fr/openhands.json +156 -59
  220. package/build/locales/it/openhands.json +156 -59
  221. package/build/locales/ja/openhands.json +156 -59
  222. package/build/locales/ko-KR/openhands.json +156 -59
  223. package/build/locales/no/openhands.json +156 -59
  224. package/build/locales/pt/openhands.json +156 -59
  225. package/build/locales/tr/openhands.json +156 -59
  226. package/build/locales/uk/openhands.json +156 -59
  227. package/build/locales/zh-CN/openhands.json +156 -59
  228. package/build/locales/zh-TW/openhands.json +156 -59
  229. package/config/defaults.json +9 -5
  230. package/dist/api/agent-profiles-service/profile-field-support.d.ts +26 -0
  231. package/dist/api/agent-server-adapter.cjs +3 -3
  232. package/dist/api/agent-server-adapter.cjs.map +1 -1
  233. package/dist/api/agent-server-adapter.d.ts +10 -1
  234. package/dist/api/agent-server-adapter.js +139 -132
  235. package/dist/api/agent-server-adapter.js.map +1 -1
  236. package/dist/api/agent-server-compatibility.cjs +1 -1
  237. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  238. package/dist/api/agent-server-compatibility.d.ts +21 -0
  239. package/dist/api/agent-server-compatibility.js +52 -38
  240. package/dist/api/agent-server-compatibility.js.map +1 -1
  241. package/dist/api/agent-server-config.cjs +1 -1
  242. package/dist/api/agent-server-config.cjs.map +1 -1
  243. package/dist/api/agent-server-config.d.ts +26 -0
  244. package/dist/api/agent-server-config.js +18 -5
  245. package/dist/api/agent-server-config.js.map +1 -1
  246. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  247. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  248. package/dist/api/automation-service/automation-service.api.d.ts +13 -2
  249. package/dist/api/automation-service/automation-service.api.js +99 -84
  250. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  251. package/dist/api/backend-registry/url-selection.cjs +1 -1
  252. package/dist/api/backend-registry/url-selection.cjs.map +1 -1
  253. package/dist/api/backend-registry/url-selection.d.ts +2 -1
  254. package/dist/api/backend-registry/url-selection.js +2 -2
  255. package/dist/api/backend-registry/url-selection.js.map +1 -1
  256. package/dist/api/canvas-extensions-service.cjs +1 -0
  257. package/dist/api/canvas-extensions-service.d.ts +22 -0
  258. package/dist/api/canvas-extensions-service.js +4 -0
  259. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  260. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  261. package/dist/api/cloud/conversation-service.api.d.ts +6 -0
  262. package/dist/api/cloud/conversation-service.api.js +14 -6
  263. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  264. package/dist/api/conversation-file-upload.api.cjs +1 -1
  265. package/dist/api/conversation-file-upload.api.js +10 -10
  266. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  267. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  268. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +11 -0
  269. package/dist/api/conversation-service/agent-server-conversation-service.api.js +138 -122
  270. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  271. package/dist/api/event-service/event-service.api.cjs +1 -1
  272. package/dist/api/event-service/event-service.api.js +12 -12
  273. package/dist/api/git-provider-items-service.cjs +2 -0
  274. package/dist/api/git-provider-items-service.cjs.map +1 -0
  275. package/dist/api/git-provider-items-service.d.ts +25 -0
  276. package/dist/api/git-provider-items-service.js +127 -0
  277. package/dist/api/git-provider-items-service.js.map +1 -0
  278. package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
  279. package/dist/api/git-service/agent-server-git-service.api.js +8 -8
  280. package/dist/api/mcp-health/probe-mcp-server-health.cjs +1 -1
  281. package/dist/api/mcp-health/probe-mcp-server-health.js +31 -31
  282. package/dist/api/open-hands.types.d.ts +0 -19
  283. package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
  284. package/dist/api/profiles-service/profiles-service.api.d.ts +16 -2
  285. package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
  286. package/dist/api/provider-connections-service/provider-connections-service.api.cjs +2 -0
  287. package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -0
  288. package/dist/api/provider-connections-service/provider-connections-service.api.d.ts +34 -0
  289. package/dist/api/provider-connections-service/provider-connections-service.api.js +50 -0
  290. package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -0
  291. package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
  292. package/dist/api/runtime-service/agent-server-runtime-service.js +8 -8
  293. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  294. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  295. package/dist/api/settings-service/settings-service.api.d.ts +3 -2
  296. package/dist/api/settings-service/settings-service.api.js +2 -1
  297. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  298. package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.cjs +1 -1
  299. package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.cjs.map +1 -1
  300. package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.js +1 -1
  301. package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.js.map +1 -1
  302. package/dist/components/conversation-events/chat/event-message-components/event-group.cjs +1 -1
  303. package/dist/components/conversation-events/chat/event-message-components/event-group.cjs.map +1 -1
  304. package/dist/components/conversation-events/chat/event-message-components/event-group.js +40 -36
  305. package/dist/components/conversation-events/chat/event-message-components/event-group.js.map +1 -1
  306. package/dist/components/conversation-events/chat/event-message.cjs +1 -1
  307. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  308. package/dist/components/conversation-events/chat/event-message.js +1 -1
  309. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  310. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  311. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  312. package/dist/components/features/automations/add-automation-menu.d.ts +7 -0
  313. package/dist/components/features/automations/add-automation-modal.cjs +2 -0
  314. package/dist/components/features/automations/add-automation-modal.cjs.map +1 -0
  315. package/dist/components/features/automations/add-automation-modal.js +42 -0
  316. package/dist/components/features/automations/add-automation-modal.js.map +1 -0
  317. package/dist/components/features/automations/automation-action-button-classes.cjs +2 -0
  318. package/dist/components/features/automations/automation-action-button-classes.cjs.map +1 -0
  319. package/dist/components/features/automations/automation-action-button-classes.d.ts +0 -2
  320. package/dist/components/features/automations/automation-action-button-classes.js +8 -0
  321. package/dist/components/features/automations/automation-action-button-classes.js.map +1 -0
  322. package/dist/components/features/automations/automation-card-skeleton.cjs +2 -0
  323. package/dist/components/features/automations/automation-card-skeleton.cjs.map +1 -0
  324. package/dist/components/features/automations/automation-card-skeleton.js +33 -0
  325. package/dist/components/features/automations/automation-card-skeleton.js.map +1 -0
  326. package/dist/components/features/automations/automation-card.cjs +2 -0
  327. package/dist/components/features/automations/automation-card.cjs.map +1 -0
  328. package/dist/components/features/automations/automation-card.d.ts +1 -1
  329. package/dist/components/features/automations/automation-card.js +170 -0
  330. package/dist/components/features/automations/automation-card.js.map +1 -0
  331. package/dist/components/features/automations/automation-group.cjs +2 -0
  332. package/dist/components/features/automations/automation-group.cjs.map +1 -0
  333. package/dist/components/features/automations/automation-group.js +54 -0
  334. package/dist/components/features/automations/automation-group.js.map +1 -0
  335. package/dist/components/features/automations/automation-list-row.cjs +2 -0
  336. package/dist/components/features/automations/automation-list-row.cjs.map +1 -0
  337. package/dist/components/features/automations/automation-list-row.js +152 -0
  338. package/dist/components/features/automations/automation-list-row.js.map +1 -0
  339. package/dist/components/features/automations/automation-run-insights.cjs +2 -0
  340. package/dist/components/features/automations/automation-run-insights.cjs.map +1 -0
  341. package/dist/components/features/automations/automation-run-insights.js +46 -0
  342. package/dist/components/features/automations/automation-run-insights.js.map +1 -0
  343. package/dist/components/features/automations/automation-view-mode.cjs +2 -0
  344. package/dist/components/features/automations/automation-view-mode.cjs.map +1 -0
  345. package/dist/components/features/automations/automation-view-mode.d.ts +5 -1
  346. package/dist/components/features/automations/automation-view-mode.js +6 -0
  347. package/dist/components/features/automations/automation-view-mode.js.map +1 -0
  348. package/dist/components/features/automations/backend-not-configured.cjs +2 -0
  349. package/dist/components/features/automations/backend-not-configured.cjs.map +1 -0
  350. package/dist/components/features/automations/backend-not-configured.js +34 -0
  351. package/dist/components/features/automations/backend-not-configured.js.map +1 -0
  352. package/dist/components/features/automations/build-automation-menu-items.cjs +2 -0
  353. package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -0
  354. package/dist/components/features/automations/build-automation-menu-items.js +53 -0
  355. package/dist/components/features/automations/build-automation-menu-items.js.map +1 -0
  356. package/dist/components/features/automations/build-automation-pills.cjs +2 -0
  357. package/dist/components/features/automations/build-automation-pills.cjs.map +1 -0
  358. package/dist/components/features/automations/build-automation-pills.js +71 -0
  359. package/dist/components/features/automations/build-automation-pills.js.map +1 -0
  360. package/dist/components/features/automations/create-instructions.cjs +2 -0
  361. package/dist/components/features/automations/create-instructions.cjs.map +1 -0
  362. package/dist/components/features/automations/create-instructions.js +102 -0
  363. package/dist/components/features/automations/create-instructions.js.map +1 -0
  364. package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +4 -3
  365. package/dist/components/features/automations/detail/run-phase.cjs +2 -0
  366. package/dist/components/features/automations/detail/run-phase.cjs.map +1 -0
  367. package/dist/components/features/automations/detail/run-phase.d.ts +89 -0
  368. package/dist/components/features/automations/detail/run-phase.js +72 -0
  369. package/dist/components/features/automations/detail/run-phase.js.map +1 -0
  370. package/dist/components/features/automations/detail/run-status-badge.cjs +2 -0
  371. package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -0
  372. package/dist/components/features/automations/detail/run-status-badge.js +102 -0
  373. package/dist/components/features/automations/detail/run-status-badge.js.map +1 -0
  374. package/dist/components/features/automations/empty-state.cjs +2 -0
  375. package/dist/components/features/automations/empty-state.cjs.map +1 -0
  376. package/dist/components/features/automations/empty-state.js +35 -0
  377. package/dist/components/features/automations/empty-state.js.map +1 -0
  378. package/dist/components/features/automations/error-state.cjs +2 -0
  379. package/dist/components/features/automations/error-state.cjs.map +1 -0
  380. package/dist/components/features/automations/error-state.js +28 -0
  381. package/dist/components/features/automations/error-state.js.map +1 -0
  382. package/dist/components/features/automations/import-automation-modal.d.ts +2 -1
  383. package/dist/components/features/automations/kebab-menu-item-content.cjs +2 -0
  384. package/dist/components/features/automations/kebab-menu-item-content.cjs.map +1 -0
  385. package/dist/components/features/automations/kebab-menu-item-content.js +21 -0
  386. package/dist/components/features/automations/kebab-menu-item-content.js.map +1 -0
  387. package/dist/components/features/automations/kebab-menu.cjs +2 -0
  388. package/dist/components/features/automations/kebab-menu.cjs.map +1 -0
  389. package/dist/components/features/automations/kebab-menu.d.ts +2 -1
  390. package/dist/components/features/automations/kebab-menu.js +76 -0
  391. package/dist/components/features/automations/kebab-menu.js.map +1 -0
  392. package/dist/components/features/automations/recommended-automations-launcher.cjs +2 -0
  393. package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -0
  394. package/dist/components/features/automations/recommended-automations-launcher.d.ts +7 -1
  395. package/dist/components/features/automations/recommended-automations-launcher.js +134 -0
  396. package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -0
  397. package/dist/components/features/automations/recommended-automations-rail.cjs +2 -0
  398. package/dist/components/features/automations/recommended-automations-rail.cjs.map +1 -0
  399. package/dist/components/features/automations/recommended-automations-rail.d.ts +9 -0
  400. package/dist/components/features/automations/recommended-automations-rail.js +127 -0
  401. package/dist/components/features/automations/recommended-automations-rail.js.map +1 -0
  402. package/dist/components/features/automations/recommended-automations-section.cjs +2 -0
  403. package/dist/components/features/automations/recommended-automations-section.cjs.map +1 -0
  404. package/dist/components/features/automations/recommended-automations-section.d.ts +2 -2
  405. package/dist/components/features/automations/recommended-automations-section.js +198 -0
  406. package/dist/components/features/automations/recommended-automations-section.js.map +1 -0
  407. package/dist/components/features/automations/responder-deployment-modal.cjs +2 -0
  408. package/dist/components/features/automations/responder-deployment-modal.cjs.map +1 -0
  409. package/dist/components/features/automations/responder-deployment-modal.js +75 -0
  410. package/dist/components/features/automations/responder-deployment-modal.js.map +1 -0
  411. package/dist/components/features/automations/status-badge.cjs +2 -0
  412. package/dist/components/features/automations/status-badge.cjs.map +1 -0
  413. package/dist/components/features/automations/status-badge.js +12 -0
  414. package/dist/components/features/automations/status-badge.js.map +1 -0
  415. package/dist/components/features/automations/to-latest-run-state.cjs +2 -0
  416. package/dist/components/features/automations/to-latest-run-state.cjs.map +1 -0
  417. package/dist/components/features/automations/to-latest-run-state.d.ts +6 -0
  418. package/dist/components/features/automations/to-latest-run-state.js +21 -0
  419. package/dist/components/features/automations/to-latest-run-state.js.map +1 -0
  420. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  421. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  422. package/dist/components/features/backends/backend-form-modal.js +15 -21
  423. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  424. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  425. package/dist/components/features/backends/manage-backends-modal.js +5 -5
  426. package/dist/components/features/canvas-extensions/add-canvas-extension-modal.d.ts +6 -0
  427. package/dist/components/features/canvas-extensions/canvas-extension-card.d.ts +9 -0
  428. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs +2 -0
  429. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs.map +1 -0
  430. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.d.ts +23 -0
  431. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js +19 -0
  432. package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js.map +1 -0
  433. package/dist/components/features/chat/chat-interface.cjs +2 -2
  434. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  435. package/dist/components/features/chat/chat-interface.js +138 -133
  436. package/dist/components/features/chat/chat-interface.js.map +1 -1
  437. package/dist/components/features/chat/chat-markdown-path-code.cjs +3 -0
  438. package/dist/components/features/chat/chat-markdown-path-code.cjs.map +1 -0
  439. package/dist/components/features/chat/chat-markdown-path-code.d.ts +27 -0
  440. package/dist/components/features/chat/chat-markdown-path-code.js +72 -0
  441. package/dist/components/features/chat/chat-markdown-path-code.js.map +1 -0
  442. package/dist/components/features/chat/path-component.cjs +1 -1
  443. package/dist/components/features/chat/path-component.cjs.map +1 -1
  444. package/dist/components/features/chat/path-component.d.ts +8 -2
  445. package/dist/components/features/chat/path-component.js +33 -21
  446. package/dist/components/features/chat/path-component.js.map +1 -1
  447. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
  448. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
  449. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +38 -43
  450. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
  451. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
  452. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
  453. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +8 -5
  454. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +22 -16
  455. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
  456. package/dist/components/features/chat/user-message-body.cjs +1 -1
  457. package/dist/components/features/chat/user-message-body.cjs.map +1 -1
  458. package/dist/components/features/chat/user-message-body.d.ts +4 -0
  459. package/dist/components/features/chat/user-message-body.js +30 -24
  460. package/dist/components/features/chat/user-message-body.js.map +1 -1
  461. package/dist/components/features/command-menu/command-menu-items.d.ts +10 -4
  462. package/dist/components/features/conversation/conversation-git-actions-menu.cjs +2 -0
  463. package/dist/components/features/conversation/conversation-git-actions-menu.cjs.map +1 -0
  464. package/dist/components/features/conversation/conversation-git-actions-menu.d.ts +15 -0
  465. package/dist/components/features/conversation/conversation-git-actions-menu.js +123 -0
  466. package/dist/components/features/conversation/conversation-git-actions-menu.js.map +1 -0
  467. package/dist/components/features/conversation/conversation-git-actions-toggle.cjs +2 -0
  468. package/dist/components/features/conversation/conversation-git-actions-toggle.cjs.map +1 -0
  469. package/dist/components/features/conversation/conversation-git-actions-toggle.d.ts +10 -0
  470. package/dist/components/features/conversation/conversation-git-actions-toggle.js +60 -0
  471. package/dist/components/features/conversation/conversation-git-actions-toggle.js.map +1 -0
  472. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.cjs +1 -1
  473. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.cjs.map +1 -1
  474. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.js +46 -10
  475. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.js.map +1 -1
  476. package/dist/components/features/conversation/conversation-main/conversation-main.cjs +1 -1
  477. package/dist/components/features/conversation/conversation-main/conversation-main.cjs.map +1 -1
  478. package/dist/components/features/conversation/conversation-main/conversation-main.js +49 -43
  479. package/dist/components/features/conversation/conversation-main/conversation-main.js.map +1 -1
  480. package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
  481. package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
  482. package/dist/components/features/conversation/conversation-name-with-status.js +49 -40
  483. package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
  484. package/dist/components/features/conversation/conversation-name.cjs +1 -1
  485. package/dist/components/features/conversation/conversation-name.js +4 -4
  486. package/dist/components/features/conversation/conversation-overview-automations-panel.cjs +2 -0
  487. package/dist/components/features/conversation/conversation-overview-automations-panel.cjs.map +1 -0
  488. package/dist/components/features/conversation/conversation-overview-automations-panel.d.ts +6 -0
  489. package/dist/components/features/conversation/conversation-overview-automations-panel.js +48 -0
  490. package/dist/components/features/conversation/conversation-overview-automations-panel.js.map +1 -0
  491. package/dist/components/features/conversation/conversation-overview-context-menu.cjs +2 -0
  492. package/dist/components/features/conversation/conversation-overview-context-menu.cjs.map +1 -0
  493. package/dist/components/features/conversation/conversation-overview-context-menu.d.ts +10 -0
  494. package/dist/components/features/conversation/conversation-overview-context-menu.js +221 -0
  495. package/dist/components/features/conversation/conversation-overview-context-menu.js.map +1 -0
  496. package/dist/components/features/conversation/conversation-overview-diffs-row.cjs +2 -0
  497. package/dist/components/features/conversation/conversation-overview-diffs-row.cjs.map +1 -0
  498. package/dist/components/features/conversation/conversation-overview-diffs-row.d.ts +2 -0
  499. package/dist/components/features/conversation/conversation-overview-diffs-row.js +88 -0
  500. package/dist/components/features/conversation/conversation-overview-diffs-row.js.map +1 -0
  501. package/dist/components/features/conversation/conversation-overview-drawer-content.cjs +2 -0
  502. package/dist/components/features/conversation/conversation-overview-drawer-content.cjs.map +1 -0
  503. package/dist/components/features/conversation/conversation-overview-drawer-content.d.ts +6 -0
  504. package/dist/components/features/conversation/conversation-overview-drawer-content.js +138 -0
  505. package/dist/components/features/conversation/conversation-overview-drawer-content.js.map +1 -0
  506. package/dist/components/features/conversation/conversation-overview-drawer-context.cjs +2 -0
  507. package/dist/components/features/conversation/conversation-overview-drawer-context.cjs.map +1 -0
  508. package/dist/components/features/conversation/conversation-overview-drawer-context.d.ts +17 -0
  509. package/dist/components/features/conversation/conversation-overview-drawer-context.js +43 -0
  510. package/dist/components/features/conversation/conversation-overview-drawer-context.js.map +1 -0
  511. package/dist/components/features/conversation/conversation-overview-drawer.cjs +2 -0
  512. package/dist/components/features/conversation/conversation-overview-drawer.cjs.map +1 -0
  513. package/dist/components/features/conversation/conversation-overview-drawer.constants.cjs +2 -0
  514. package/dist/components/features/conversation/conversation-overview-drawer.constants.cjs.map +1 -0
  515. package/dist/components/features/conversation/conversation-overview-drawer.constants.d.ts +6 -0
  516. package/dist/components/features/conversation/conversation-overview-drawer.constants.js +6 -0
  517. package/dist/components/features/conversation/conversation-overview-drawer.constants.js.map +1 -0
  518. package/dist/components/features/conversation/conversation-overview-drawer.d.ts +7 -0
  519. package/dist/components/features/conversation/conversation-overview-drawer.js +45 -0
  520. package/dist/components/features/conversation/conversation-overview-drawer.js.map +1 -0
  521. package/dist/components/features/conversation/conversation-overview-drawer.types.cjs +2 -0
  522. package/dist/components/features/conversation/conversation-overview-drawer.types.cjs.map +1 -0
  523. package/dist/components/features/conversation/conversation-overview-drawer.types.d.ts +12 -0
  524. package/dist/components/features/conversation/conversation-overview-drawer.types.js +13 -0
  525. package/dist/components/features/conversation/conversation-overview-drawer.types.js.map +1 -0
  526. package/dist/components/features/conversation/conversation-overview-git-items-panel.cjs +2 -0
  527. package/dist/components/features/conversation/conversation-overview-git-items-panel.cjs.map +1 -0
  528. package/dist/components/features/conversation/conversation-overview-git-items-panel.d.ts +7 -0
  529. package/dist/components/features/conversation/conversation-overview-git-items-panel.js +81 -0
  530. package/dist/components/features/conversation/conversation-overview-git-items-panel.js.map +1 -0
  531. package/dist/components/features/conversation/conversation-overview-git-section.cjs +2 -0
  532. package/dist/components/features/conversation/conversation-overview-git-section.cjs.map +1 -0
  533. package/dist/components/features/conversation/conversation-overview-git-section.d.ts +6 -0
  534. package/dist/components/features/conversation/conversation-overview-git-section.js +143 -0
  535. package/dist/components/features/conversation/conversation-overview-git-section.js.map +1 -0
  536. package/dist/components/features/conversation/conversation-overview-mcp-panel.cjs +2 -0
  537. package/dist/components/features/conversation/conversation-overview-mcp-panel.cjs.map +1 -0
  538. package/dist/components/features/conversation/conversation-overview-mcp-panel.d.ts +6 -0
  539. package/dist/components/features/conversation/conversation-overview-mcp-panel.js +108 -0
  540. package/dist/components/features/conversation/conversation-overview-mcp-panel.js.map +1 -0
  541. package/dist/components/features/conversation/conversation-overview-panel.cjs +2 -0
  542. package/dist/components/features/conversation/conversation-overview-panel.cjs.map +1 -0
  543. package/dist/components/features/conversation/conversation-overview-panel.constants.cjs +2 -0
  544. package/dist/components/features/conversation/conversation-overview-panel.constants.cjs.map +1 -0
  545. package/dist/components/features/conversation/conversation-overview-panel.constants.d.ts +24 -0
  546. package/dist/components/features/conversation/conversation-overview-panel.constants.js +12 -0
  547. package/dist/components/features/conversation/conversation-overview-panel.constants.js.map +1 -0
  548. package/dist/components/features/conversation/conversation-overview-panel.d.ts +2 -0
  549. package/dist/components/features/conversation/conversation-overview-panel.js +102 -0
  550. package/dist/components/features/conversation/conversation-overview-panel.js.map +1 -0
  551. package/dist/components/features/conversation/conversation-overview-project-scope-toggle.cjs +2 -0
  552. package/dist/components/features/conversation/conversation-overview-project-scope-toggle.cjs.map +1 -0
  553. package/dist/components/features/conversation/conversation-overview-project-scope-toggle.d.ts +8 -0
  554. package/dist/components/features/conversation/conversation-overview-project-scope-toggle.js +29 -0
  555. package/dist/components/features/conversation/conversation-overview-project-scope-toggle.js.map +1 -0
  556. package/dist/components/features/conversation/conversation-overview-secrets-panel.cjs +2 -0
  557. package/dist/components/features/conversation/conversation-overview-secrets-panel.cjs.map +1 -0
  558. package/dist/components/features/conversation/conversation-overview-secrets-panel.d.ts +6 -0
  559. package/dist/components/features/conversation/conversation-overview-secrets-panel.js +89 -0
  560. package/dist/components/features/conversation/conversation-overview-secrets-panel.js.map +1 -0
  561. package/dist/components/features/conversation/conversation-overview-sections.cjs +2 -0
  562. package/dist/components/features/conversation/conversation-overview-sections.cjs.map +1 -0
  563. package/dist/components/features/conversation/conversation-overview-sections.d.ts +43 -0
  564. package/dist/components/features/conversation/conversation-overview-sections.js +27 -0
  565. package/dist/components/features/conversation/conversation-overview-sections.js.map +1 -0
  566. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +2 -0
  567. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs.map +1 -0
  568. package/dist/components/features/conversation/conversation-overview-skills-panel.d.ts +6 -0
  569. package/dist/components/features/conversation/conversation-overview-skills-panel.js +120 -0
  570. package/dist/components/features/conversation/conversation-overview-skills-panel.js.map +1 -0
  571. package/dist/components/features/conversation/conversation-overview-toggle.cjs +2 -0
  572. package/dist/components/features/conversation/conversation-overview-toggle.cjs.map +1 -0
  573. package/dist/components/features/conversation/conversation-overview-toggle.d.ts +11 -0
  574. package/dist/components/features/conversation/conversation-overview-toggle.js +99 -0
  575. package/dist/components/features/conversation/conversation-overview-toggle.js.map +1 -0
  576. package/dist/components/features/conversation/conversation-secondary-drawer.classes.cjs +2 -0
  577. package/dist/components/features/conversation/conversation-secondary-drawer.classes.cjs.map +1 -0
  578. package/dist/components/features/conversation/conversation-secondary-drawer.classes.d.ts +4 -0
  579. package/dist/components/features/conversation/conversation-secondary-drawer.classes.js +7 -0
  580. package/dist/components/features/conversation/conversation-secondary-drawer.classes.js.map +1 -0
  581. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
  582. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
  583. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +10 -9
  584. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
  585. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  586. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  587. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +68 -62
  588. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  589. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  590. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  591. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +89 -79
  592. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  593. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs +1 -1
  594. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs.map +1 -1
  595. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
  596. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js +3 -3
  597. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js.map +1 -1
  598. package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
  599. package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
  600. package/dist/components/features/conversation/right-panel-toggle.d.ts +3 -2
  601. package/dist/components/features/conversation/right-panel-toggle.js +34 -33
  602. package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
  603. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  604. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  605. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +2 -1
  606. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +14 -7
  607. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  608. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  609. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  610. package/dist/components/features/conversation-panel/conversation-panel.js +252 -225
  611. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  612. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
  613. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
  614. package/dist/components/features/conversation-panel/local-new-conversation-menu.js +4 -4
  615. package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
  616. package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
  617. package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
  618. package/dist/components/features/conversation-panel/skills-modal.js +29 -28
  619. package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
  620. package/dist/components/features/diff-viewer/accordion-panel.cjs +2 -0
  621. package/dist/components/features/diff-viewer/accordion-panel.cjs.map +1 -0
  622. package/dist/components/features/diff-viewer/accordion-panel.d.ts +13 -0
  623. package/dist/components/features/diff-viewer/accordion-panel.js +41 -0
  624. package/dist/components/features/diff-viewer/accordion-panel.js.map +1 -0
  625. package/dist/components/features/diff-viewer/commit-list.cjs +1 -1
  626. package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -1
  627. package/dist/components/features/diff-viewer/commit-list.d.ts +5 -1
  628. package/dist/components/features/diff-viewer/commit-list.js +30 -16
  629. package/dist/components/features/diff-viewer/commit-list.js.map +1 -1
  630. package/dist/components/features/diff-viewer/commit-row.cjs +1 -1
  631. package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -1
  632. package/dist/components/features/diff-viewer/commit-row.d.ts +1 -2
  633. package/dist/components/features/diff-viewer/commit-row.js +38 -34
  634. package/dist/components/features/diff-viewer/commit-row.js.map +1 -1
  635. package/dist/components/features/diff-viewer/diff-change-list.cjs +2 -0
  636. package/dist/components/features/diff-viewer/diff-change-list.cjs.map +1 -0
  637. package/dist/components/features/diff-viewer/diff-change-list.d.ts +18 -0
  638. package/dist/components/features/diff-viewer/diff-change-list.js +22 -0
  639. package/dist/components/features/diff-viewer/diff-change-list.js.map +1 -0
  640. package/dist/components/features/diff-viewer/editor-container.cjs +1 -1
  641. package/dist/components/features/diff-viewer/editor-container.cjs.map +1 -1
  642. package/dist/components/features/diff-viewer/editor-container.d.ts +2 -1
  643. package/dist/components/features/diff-viewer/editor-container.js +8 -7
  644. package/dist/components/features/diff-viewer/editor-container.js.map +1 -1
  645. package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
  646. package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
  647. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +10 -1
  648. package/dist/components/features/diff-viewer/file-diff-viewer.js +138 -112
  649. package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
  650. package/dist/components/features/diff-viewer/uncommitted-changes-row.cjs +2 -0
  651. package/dist/components/features/diff-viewer/uncommitted-changes-row.cjs.map +1 -0
  652. package/dist/components/features/diff-viewer/uncommitted-changes-row.d.ts +12 -0
  653. package/dist/components/features/diff-viewer/uncommitted-changes-row.js +51 -0
  654. package/dist/components/features/diff-viewer/uncommitted-changes-row.js.map +1 -0
  655. package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
  656. package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
  657. package/dist/components/features/files-tab/file-content-viewer.js +5 -6
  658. package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
  659. package/dist/components/features/files-tab/file-quick-row.cjs +1 -1
  660. package/dist/components/features/files-tab/file-quick-row.cjs.map +1 -1
  661. package/dist/components/features/files-tab/file-quick-row.d.ts +9 -7
  662. package/dist/components/features/files-tab/file-quick-row.js +63 -34
  663. package/dist/components/features/files-tab/file-quick-row.js.map +1 -1
  664. package/dist/components/features/files-tab/files-tab-tree.constants.cjs +2 -0
  665. package/dist/components/features/files-tab/files-tab-tree.constants.cjs.map +1 -0
  666. package/dist/components/features/files-tab/files-tab-tree.constants.d.ts +7 -0
  667. package/dist/components/features/files-tab/files-tab-tree.constants.js +6 -0
  668. package/dist/components/features/files-tab/files-tab-tree.constants.js.map +1 -0
  669. package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
  670. package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
  671. package/dist/components/features/files-tab/segmented-toggle.d.ts +5 -3
  672. package/dist/components/features/files-tab/segmented-toggle.js +10 -13
  673. package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
  674. package/dist/components/features/files-tab/tree-node.cjs +1 -1
  675. package/dist/components/features/files-tab/tree-node.cjs.map +1 -1
  676. package/dist/components/features/files-tab/tree-node.js +34 -32
  677. package/dist/components/features/files-tab/tree-node.js.map +1 -1
  678. package/dist/components/features/files-tab/workspace-path.cjs +2 -0
  679. package/dist/components/features/files-tab/workspace-path.cjs.map +1 -0
  680. package/dist/components/features/files-tab/workspace-path.d.ts +6 -0
  681. package/dist/components/features/files-tab/workspace-path.js +41 -0
  682. package/dist/components/features/files-tab/workspace-path.js.map +1 -0
  683. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +2 -0
  684. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -0
  685. package/dist/components/features/home/featured-automations/automation-health-indicator.js +22 -0
  686. package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -0
  687. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +2 -0
  688. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -0
  689. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +45 -0
  690. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -0
  691. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +2 -0
  692. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -0
  693. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +108 -0
  694. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -0
  695. package/dist/components/features/home/featured-automations/automation-run-health.cjs +2 -0
  696. package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -0
  697. package/dist/components/features/home/featured-automations/automation-run-health.js +75 -0
  698. package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -0
  699. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +2 -0
  700. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -0
  701. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +96 -0
  702. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -0
  703. package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +3 -3
  704. package/dist/components/features/home/git-repo-dropdown/use-url-search.cjs +1 -1
  705. package/dist/components/features/home/git-repo-dropdown/use-url-search.cjs.map +1 -1
  706. package/dist/components/features/home/git-repo-dropdown/use-url-search.js +1 -1
  707. package/dist/components/features/home/git-repo-dropdown/use-url-search.js.map +1 -1
  708. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
  709. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +6 -6
  710. package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs +1 -1
  711. package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js +6 -6
  712. package/dist/components/features/manifest/manifest-form-field.d.ts +4 -3
  713. package/dist/components/features/manifest/manifest-icons.cjs +2 -0
  714. package/dist/components/features/manifest/manifest-icons.cjs.map +1 -0
  715. package/dist/components/features/manifest/manifest-icons.d.ts +1 -0
  716. package/dist/components/features/manifest/manifest-icons.js +21 -0
  717. package/dist/components/features/manifest/manifest-icons.js.map +1 -0
  718. package/dist/components/features/manifest/manifest-repository-list.d.ts +25 -0
  719. package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
  720. package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
  721. package/dist/components/features/markdown/markdown-table-scroll.d.ts +2 -6
  722. package/dist/components/features/markdown/markdown-table-scroll.js +15 -21
  723. package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
  724. package/dist/components/features/mcp-logo-badge.cjs +1 -1
  725. package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
  726. package/dist/components/features/mcp-logo-badge.d.ts +1 -1
  727. package/dist/components/features/mcp-logo-badge.js +1 -0
  728. package/dist/components/features/mcp-logo-badge.js.map +1 -1
  729. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  730. package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
  731. package/dist/components/features/mcp-page/index.cjs +1 -1
  732. package/dist/components/features/mcp-page/index.js +2 -2
  733. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  734. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  735. package/dist/components/features/mcp-page/install-server-modal.js +25 -25
  736. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  737. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  738. package/dist/components/features/mcp-page/installed-server-card.js +5 -5
  739. package/dist/components/features/mcp-page/marketplace-card.cjs +1 -1
  740. package/dist/components/features/mcp-page/marketplace-card.js +4 -4
  741. package/dist/components/features/mcp-page/marketplace-section.cjs +1 -1
  742. package/dist/components/features/mcp-page/marketplace-section.js +3 -3
  743. package/dist/components/features/mcp-page/mcp-logo-stack-badge.cjs +2 -0
  744. package/dist/components/features/mcp-page/mcp-logo-stack-badge.cjs.map +1 -0
  745. package/dist/components/features/mcp-page/mcp-logo-stack-badge.js +60 -0
  746. package/dist/components/features/mcp-page/mcp-logo-stack-badge.js.map +1 -0
  747. package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
  748. package/dist/components/features/mcp-page/mcp-server-health.js +18 -18
  749. package/dist/components/features/onboarding/onboarding-host.d.ts +3 -4
  750. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +5 -9
  751. package/dist/components/features/onboarding/use-onboarding-completion.cjs +2 -0
  752. package/dist/components/features/onboarding/use-onboarding-completion.cjs.map +1 -0
  753. package/dist/components/features/onboarding/use-onboarding-completion.js +32 -0
  754. package/dist/components/features/onboarding/use-onboarding-completion.js.map +1 -0
  755. package/dist/components/features/settings/acp-auth-status-banner.d.ts +23 -6
  756. package/dist/components/features/settings/app-settings/getting-started-checklist-switch.cjs +2 -0
  757. package/dist/components/features/settings/app-settings/getting-started-checklist-switch.cjs.map +1 -0
  758. package/dist/components/features/settings/app-settings/getting-started-checklist-switch.d.ts +1 -0
  759. package/dist/components/features/settings/app-settings/getting-started-checklist-switch.js +22 -0
  760. package/dist/components/features/settings/app-settings/getting-started-checklist-switch.js.map +1 -0
  761. package/dist/components/features/settings/brand-button.cjs +1 -1
  762. package/dist/components/features/settings/brand-button.cjs.map +1 -1
  763. package/dist/components/features/settings/brand-button.d.ts +2 -0
  764. package/dist/components/features/settings/brand-button.js +4 -2
  765. package/dist/components/features/settings/brand-button.js.map +1 -1
  766. package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.cjs +1 -0
  767. package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.d.ts +7 -0
  768. package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.js +7 -0
  769. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.cjs +1 -1
  770. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.js +3 -0
  771. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  772. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -0
  773. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +20 -1
  774. package/dist/components/features/settings/llm-profiles/provider-connection-modal.cjs +1 -0
  775. package/dist/components/features/settings/llm-profiles/provider-connection-modal.d.ts +19 -0
  776. package/dist/components/features/settings/llm-profiles/provider-connection-modal.js +13 -0
  777. package/dist/components/features/settings/llm-profiles/provider-connection-row.cjs +1 -0
  778. package/dist/components/features/settings/llm-profiles/provider-connection-row.d.ts +10 -0
  779. package/dist/components/features/settings/llm-profiles/provider-connection-row.js +6 -0
  780. package/dist/components/features/settings/llm-profiles/provider-connections-manager.cjs +1 -0
  781. package/dist/components/features/settings/llm-profiles/provider-connections-manager.d.ts +15 -0
  782. package/dist/components/features/settings/llm-profiles/provider-connections-manager.js +8 -0
  783. package/dist/components/features/settings/sdk-settings/field-help.cjs +1 -1
  784. package/dist/components/features/settings/sdk-settings/field-help.cjs.map +1 -1
  785. package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
  786. package/dist/components/features/settings/sdk-settings/field-help.js +1 -1
  787. package/dist/components/features/settings/sdk-settings/field-help.js.map +1 -1
  788. package/dist/components/features/settings/sdk-settings/schema-field.cjs +1 -1
  789. package/dist/components/features/settings/sdk-settings/schema-field.js +6 -6
  790. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
  791. package/dist/components/features/settings/sdk-settings/sdk-section-page.js +9 -9
  792. package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
  793. package/dist/components/features/settings/secrets-settings/secret-form.js +7 -7
  794. package/dist/components/features/settings/settings-input.cjs +1 -1
  795. package/dist/components/features/settings/settings-input.cjs.map +1 -1
  796. package/dist/components/features/settings/settings-input.d.ts +6 -0
  797. package/dist/components/features/settings/settings-input.js +14 -13
  798. package/dist/components/features/settings/settings-input.js.map +1 -1
  799. package/dist/components/features/sidebar/sidebar-nav-link.cjs +1 -1
  800. package/dist/components/features/sidebar/sidebar-nav-link.cjs.map +1 -1
  801. package/dist/components/features/sidebar/sidebar-nav-link.d.ts +10 -1
  802. package/dist/components/features/sidebar/sidebar-nav-link.js +54 -36
  803. package/dist/components/features/sidebar/sidebar-nav-link.js.map +1 -1
  804. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.cjs +2 -0
  805. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.cjs.map +1 -0
  806. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.d.ts +7 -0
  807. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.js +102 -0
  808. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.js.map +1 -0
  809. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.cjs +2 -0
  810. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.cjs.map +1 -0
  811. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.d.ts +8 -0
  812. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.js +66 -0
  813. package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.js.map +1 -0
  814. package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.cjs +2 -0
  815. package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.cjs.map +1 -0
  816. package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.d.ts +3 -0
  817. package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.js +15 -0
  818. package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.js.map +1 -0
  819. package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.cjs +2 -0
  820. package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.cjs.map +1 -0
  821. package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.d.ts +10 -0
  822. package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.js +39 -0
  823. package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.js.map +1 -0
  824. package/dist/components/features/sidebar/sidebar-onboarding-checklist.cjs +2 -0
  825. package/dist/components/features/sidebar/sidebar-onboarding-checklist.cjs.map +1 -0
  826. package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.cjs +2 -0
  827. package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.cjs.map +1 -0
  828. package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.d.ts +26 -0
  829. package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.js +78 -0
  830. package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.js.map +1 -0
  831. package/dist/components/features/sidebar/sidebar-onboarding-checklist.d.ts +5 -0
  832. package/dist/components/features/sidebar/sidebar-onboarding-checklist.js +127 -0
  833. package/dist/components/features/sidebar/sidebar-onboarding-checklist.js.map +1 -0
  834. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  835. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  836. package/dist/components/features/sidebar/sidebar-rail-body.js +137 -110
  837. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  838. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  839. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  840. package/dist/components/features/sidebar/sidebar.js +1 -1
  841. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  842. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.cjs +2 -0
  843. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.cjs.map +1 -0
  844. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.d.ts +1 -0
  845. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.js +10 -0
  846. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.js.map +1 -0
  847. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +2 -0
  848. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs.map +1 -0
  849. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.d.ts +15 -0
  850. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +75 -0
  851. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js.map +1 -0
  852. package/dist/components/features/skills/add-skill-modal.cjs +2 -0
  853. package/dist/components/features/skills/add-skill-modal.cjs.map +1 -0
  854. package/dist/components/features/skills/add-skill-modal.js +164 -0
  855. package/dist/components/features/skills/add-skill-modal.js.map +1 -0
  856. package/dist/components/features/skills/build-skill-pills.cjs +2 -0
  857. package/dist/components/features/skills/build-skill-pills.cjs.map +1 -0
  858. package/dist/components/features/skills/build-skill-pills.js +96 -0
  859. package/dist/components/features/skills/build-skill-pills.js.map +1 -0
  860. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  861. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  862. package/dist/components/features/skills/extensions-navigation.js +54 -43
  863. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  864. package/dist/components/features/skills/get-skill-card-description.cjs +2 -0
  865. package/dist/components/features/skills/get-skill-card-description.cjs.map +1 -0
  866. package/dist/components/features/skills/get-skill-card-description.js +34 -0
  867. package/dist/components/features/skills/get-skill-card-description.js.map +1 -0
  868. package/dist/components/features/skills/get-skill-chat-launch-message.cjs +2 -0
  869. package/dist/components/features/skills/get-skill-chat-launch-message.cjs.map +1 -0
  870. package/dist/components/features/skills/get-skill-chat-launch-message.js +9 -0
  871. package/dist/components/features/skills/get-skill-chat-launch-message.js.map +1 -0
  872. package/dist/components/features/skills/is-copyable-skill-source.cjs +2 -0
  873. package/dist/components/features/skills/is-copyable-skill-source.cjs.map +1 -0
  874. package/dist/components/features/skills/is-copyable-skill-source.js +9 -0
  875. package/dist/components/features/skills/is-copyable-skill-source.js.map +1 -0
  876. package/dist/components/features/skills/skill-card-pill-row.cjs +2 -0
  877. package/dist/components/features/skills/skill-card-pill-row.cjs.map +1 -0
  878. package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
  879. package/dist/components/features/skills/skill-card-pill-row.js +137 -0
  880. package/dist/components/features/skills/skill-card-pill-row.js.map +1 -0
  881. package/dist/components/features/skills/skill-card.cjs +2 -0
  882. package/dist/components/features/skills/skill-card.cjs.map +1 -0
  883. package/dist/components/features/skills/skill-card.js +93 -0
  884. package/dist/components/features/skills/skill-card.js.map +1 -0
  885. package/dist/components/features/skills/skill-detail-modal.cjs +3 -0
  886. package/dist/components/features/skills/skill-detail-modal.cjs.map +1 -0
  887. package/dist/components/features/skills/skill-detail-modal.js +150 -0
  888. package/dist/components/features/skills/skill-detail-modal.js.map +1 -0
  889. package/dist/components/features/skills/skill-facet-rail.cjs +2 -0
  890. package/dist/components/features/skills/skill-facet-rail.cjs.map +1 -0
  891. package/dist/components/features/skills/skill-facet-rail.js +42 -0
  892. package/dist/components/features/skills/skill-facet-rail.js.map +1 -0
  893. package/dist/components/features/skills/skill-facet-row.cjs +2 -0
  894. package/dist/components/features/skills/skill-facet-row.cjs.map +1 -0
  895. package/dist/components/features/skills/skill-facet-row.js +44 -0
  896. package/dist/components/features/skills/skill-facet-row.js.map +1 -0
  897. package/dist/components/features/skills/skill-filter.cjs +2 -0
  898. package/dist/components/features/skills/skill-filter.cjs.map +1 -0
  899. package/dist/components/features/skills/skill-filter.d.ts +8 -3
  900. package/dist/components/features/skills/skill-filter.js +183 -0
  901. package/dist/components/features/skills/skill-filter.js.map +1 -0
  902. package/dist/components/features/skills/skill-filters-modal.cjs +2 -0
  903. package/dist/components/features/skills/skill-filters-modal.cjs.map +1 -0
  904. package/dist/components/features/skills/skill-filters-modal.js +53 -0
  905. package/dist/components/features/skills/skill-filters-modal.js.map +1 -0
  906. package/dist/components/features/skills/skill-icon-badge.cjs +2 -0
  907. package/dist/components/features/skills/skill-icon-badge.cjs.map +1 -0
  908. package/dist/components/features/skills/skill-icon-badge.js +17 -0
  909. package/dist/components/features/skills/skill-icon-badge.js.map +1 -0
  910. package/dist/components/features/skills/skill-type-badge.cjs +2 -0
  911. package/dist/components/features/skills/skill-type-badge.cjs.map +1 -0
  912. package/dist/components/features/skills/skill-type-badge.js +21 -0
  913. package/dist/components/features/skills/skill-type-badge.js.map +1 -0
  914. package/dist/components/features/skills/skills-toolbar.cjs +2 -0
  915. package/dist/components/features/skills/skills-toolbar.cjs.map +1 -0
  916. package/dist/components/features/skills/skills-toolbar.js +63 -0
  917. package/dist/components/features/skills/skills-toolbar.js.map +1 -0
  918. package/dist/components/shared/buttons/circle-plus-check-toggle.cjs +1 -1
  919. package/dist/components/shared/buttons/circle-plus-check-toggle.cjs.map +1 -1
  920. package/dist/components/shared/buttons/circle-plus-check-toggle.js +19 -6
  921. package/dist/components/shared/buttons/circle-plus-check-toggle.js.map +1 -1
  922. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  923. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  924. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +4 -1
  925. package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
  926. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  927. package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
  928. package/dist/components/shared/modals/settings/settings-form.js +6 -6
  929. package/dist/components/ui/resize-handle.cjs +1 -1
  930. package/dist/components/ui/resize-handle.cjs.map +1 -1
  931. package/dist/components/ui/resize-handle.d.ts +2 -1
  932. package/dist/components/ui/resize-handle.js +6 -5
  933. package/dist/components/ui/resize-handle.js.map +1 -1
  934. package/dist/config/defaults.cjs +1 -1
  935. package/dist/config/defaults.cjs.map +1 -1
  936. package/dist/config/defaults.js +9 -5
  937. package/dist/config/defaults.js.map +1 -1
  938. package/dist/constants/skills-docs.cjs +2 -0
  939. package/dist/constants/skills-docs.cjs.map +1 -0
  940. package/dist/constants/skills-docs.js +6 -0
  941. package/dist/constants/skills-docs.js.map +1 -0
  942. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  943. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  944. package/dist/contexts/conversation-websocket-context.js +174 -149
  945. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  946. package/dist/extensions/canvas-extension-module-loader.d.ts +11 -0
  947. package/dist/fixtures/home-automations-demo.cjs +2 -0
  948. package/dist/fixtures/home-automations-demo.cjs.map +1 -0
  949. package/dist/fixtures/home-automations-demo.d.ts +1 -3
  950. package/dist/fixtures/home-automations-demo.js +384 -0
  951. package/dist/fixtures/home-automations-demo.js.map +1 -0
  952. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  953. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  954. package/dist/hooks/chat/use-slash-command.d.ts +1 -2
  955. package/dist/hooks/chat/use-slash-command.js +1 -0
  956. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  957. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  958. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  959. package/dist/hooks/mutation/use-create-conversation.js +27 -30
  960. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  961. package/dist/hooks/mutation/use-create-provider-connection.cjs +1 -0
  962. package/dist/hooks/mutation/use-create-provider-connection.d.ts +2 -0
  963. package/dist/hooks/mutation/use-create-provider-connection.js +1 -0
  964. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  965. package/dist/hooks/mutation/use-delete-mcp-server.js +3 -3
  966. package/dist/hooks/mutation/use-delete-provider-connection.cjs +1 -0
  967. package/dist/hooks/mutation/use-delete-provider-connection.d.ts +1 -0
  968. package/dist/hooks/mutation/use-delete-provider-connection.js +1 -0
  969. package/dist/hooks/mutation/use-manage-canvas-extensions.d.ts +12 -0
  970. package/dist/hooks/mutation/use-switch-acp-model.cjs +1 -1
  971. package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
  972. package/dist/hooks/mutation/use-switch-acp-model.d.ts +5 -3
  973. package/dist/hooks/mutation/use-switch-acp-model.js +9 -13
  974. package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
  975. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  976. package/dist/hooks/mutation/use-update-mcp-server.js +6 -6
  977. package/dist/hooks/mutation/use-update-provider-connection.cjs +1 -0
  978. package/dist/hooks/mutation/use-update-provider-connection.d.ts +7 -0
  979. package/dist/hooks/mutation/use-update-provider-connection.js +1 -0
  980. package/dist/hooks/query/concurrency-limiter.cjs +2 -0
  981. package/dist/hooks/query/concurrency-limiter.cjs.map +1 -0
  982. package/dist/hooks/query/concurrency-limiter.d.ts +22 -0
  983. package/dist/hooks/query/concurrency-limiter.js +29 -0
  984. package/dist/hooks/query/concurrency-limiter.js.map +1 -0
  985. package/dist/hooks/query/query-keys.cjs +1 -1
  986. package/dist/hooks/query/query-keys.cjs.map +1 -1
  987. package/dist/hooks/query/query-keys.d.ts +7 -0
  988. package/dist/hooks/query/query-keys.js +4 -4
  989. package/dist/hooks/query/query-keys.js.map +1 -1
  990. package/dist/hooks/query/use-active-conversation.cjs +1 -1
  991. package/dist/hooks/query/use-active-conversation.js +4 -4
  992. package/dist/hooks/query/use-automation-detail.cjs +1 -0
  993. package/dist/hooks/query/use-automation-detail.js +2 -0
  994. package/dist/hooks/query/use-automation-health.cjs +2 -0
  995. package/dist/hooks/query/use-automation-health.cjs.map +1 -0
  996. package/dist/hooks/query/use-automation-health.js +22 -0
  997. package/dist/hooks/query/use-automation-health.js.map +1 -0
  998. package/dist/hooks/query/use-automations.cjs +2 -0
  999. package/dist/hooks/query/use-automations.cjs.map +1 -0
  1000. package/dist/hooks/query/use-automations.js +28 -0
  1001. package/dist/hooks/query/use-automations.js.map +1 -0
  1002. package/dist/hooks/query/use-backends-health.cjs +1 -1
  1003. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  1004. package/dist/hooks/query/use-backends-health.d.ts +1 -1
  1005. package/dist/hooks/query/use-backends-health.js +50 -64
  1006. package/dist/hooks/query/use-backends-health.js.map +1 -1
  1007. package/dist/hooks/query/use-canvas-extensions.cjs +1 -0
  1008. package/dist/hooks/query/use-canvas-extensions.d.ts +5 -0
  1009. package/dist/hooks/query/use-canvas-extensions.js +3 -0
  1010. package/dist/hooks/query/use-conversation-history.cjs +1 -1
  1011. package/dist/hooks/query/use-conversation-history.cjs.map +1 -1
  1012. package/dist/hooks/query/use-conversation-history.js +3 -1
  1013. package/dist/hooks/query/use-conversation-history.js.map +1 -1
  1014. package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
  1015. package/dist/hooks/query/use-conversation-metrics.js +3 -3
  1016. package/dist/hooks/query/use-latest-automation-runs.cjs +1 -0
  1017. package/dist/hooks/query/use-latest-automation-runs.d.ts +2 -0
  1018. package/dist/hooks/query/use-latest-automation-runs.js +4 -0
  1019. package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
  1020. package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
  1021. package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
  1022. package/dist/hooks/query/use-paginated-conversations.js +19 -16
  1023. package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
  1024. package/dist/hooks/query/use-provider-connections.cjs +2 -0
  1025. package/dist/hooks/query/use-provider-connections.cjs.map +1 -0
  1026. package/dist/hooks/query/use-provider-connections.d.ts +8 -0
  1027. package/dist/hooks/query/use-provider-connections.js +19 -0
  1028. package/dist/hooks/query/use-provider-connections.js.map +1 -0
  1029. package/dist/hooks/query/use-repository-git-items.cjs +2 -0
  1030. package/dist/hooks/query/use-repository-git-items.cjs.map +1 -0
  1031. package/dist/hooks/query/use-repository-git-items.d.ts +3 -0
  1032. package/dist/hooks/query/use-repository-git-items.js +33 -0
  1033. package/dist/hooks/query/use-repository-git-items.js.map +1 -0
  1034. package/dist/hooks/query/use-search-providers.cjs +1 -1
  1035. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  1036. package/dist/hooks/query/use-search-providers.js +17 -10
  1037. package/dist/hooks/query/use-search-providers.js.map +1 -1
  1038. package/dist/hooks/query/use-unified-vscode-url.cjs +1 -1
  1039. package/dist/hooks/query/use-unified-vscode-url.cjs.map +1 -1
  1040. package/dist/hooks/query/use-unified-vscode-url.d.ts +1 -0
  1041. package/dist/hooks/query/use-unified-vscode-url.js +40 -26
  1042. package/dist/hooks/query/use-unified-vscode-url.js.map +1 -1
  1043. package/dist/hooks/query/use-workspace-file-content.cjs +1 -1
  1044. package/dist/hooks/query/use-workspace-file-content.js +5 -5
  1045. package/dist/hooks/use-acp-credential-form.d.ts +6 -0
  1046. package/dist/hooks/use-bash-command-runner.cjs +1 -1
  1047. package/dist/hooks/use-bash-command-runner.cjs.map +1 -1
  1048. package/dist/hooks/use-bash-command-runner.js +45 -42
  1049. package/dist/hooks/use-bash-command-runner.js.map +1 -1
  1050. package/dist/hooks/use-conversation-overview-column-space.cjs +2 -0
  1051. package/dist/hooks/use-conversation-overview-column-space.cjs.map +1 -0
  1052. package/dist/hooks/use-conversation-overview-column-space.d.ts +2 -0
  1053. package/dist/hooks/use-conversation-overview-column-space.js +25 -0
  1054. package/dist/hooks/use-conversation-overview-column-space.js.map +1 -0
  1055. package/dist/hooks/use-conversation-overview-git-diff-stats.cjs +2 -0
  1056. package/dist/hooks/use-conversation-overview-git-diff-stats.cjs.map +1 -0
  1057. package/dist/hooks/use-conversation-overview-git-diff-stats.d.ts +7 -0
  1058. package/dist/hooks/use-conversation-overview-git-diff-stats.js +37 -0
  1059. package/dist/hooks/use-conversation-overview-git-diff-stats.js.map +1 -0
  1060. package/dist/hooks/use-conversation-overview-panel-peek.cjs +2 -0
  1061. package/dist/hooks/use-conversation-overview-panel-peek.cjs.map +1 -0
  1062. package/dist/hooks/use-conversation-overview-panel-peek.d.ts +9 -0
  1063. package/dist/hooks/use-conversation-overview-panel-peek.js +32 -0
  1064. package/dist/hooks/use-conversation-overview-panel-peek.js.map +1 -0
  1065. package/dist/hooks/use-conversation-overview-stats.cjs +2 -0
  1066. package/dist/hooks/use-conversation-overview-stats.cjs.map +1 -0
  1067. package/dist/hooks/use-conversation-overview-stats.d.ts +4 -0
  1068. package/dist/hooks/use-conversation-overview-stats.js +15 -0
  1069. package/dist/hooks/use-conversation-overview-stats.js.map +1 -0
  1070. package/dist/hooks/use-conversation-primary-repository.cjs +2 -0
  1071. package/dist/hooks/use-conversation-primary-repository.cjs.map +1 -0
  1072. package/dist/hooks/use-conversation-primary-repository.d.ts +11 -0
  1073. package/dist/hooks/use-conversation-primary-repository.js +17 -0
  1074. package/dist/hooks/use-conversation-primary-repository.js.map +1 -0
  1075. package/dist/hooks/use-drag-scroll.cjs +2 -0
  1076. package/dist/hooks/use-drag-scroll.cjs.map +1 -0
  1077. package/dist/hooks/use-drag-scroll.d.ts +12 -0
  1078. package/dist/hooks/use-drag-scroll.js +41 -0
  1079. package/dist/hooks/use-drag-scroll.js.map +1 -0
  1080. package/dist/hooks/use-has-permission.cjs +2 -0
  1081. package/dist/hooks/use-has-permission.cjs.map +1 -0
  1082. package/dist/hooks/use-has-permission.js +8 -0
  1083. package/dist/hooks/use-has-permission.js.map +1 -0
  1084. package/dist/hooks/use-home-automation-actions.cjs +2 -0
  1085. package/dist/hooks/use-home-automation-actions.cjs.map +1 -0
  1086. package/dist/hooks/use-home-automation-actions.js +15 -0
  1087. package/dist/hooks/use-home-automation-actions.js.map +1 -0
  1088. package/dist/hooks/use-launch-skill-in-chat.cjs +2 -0
  1089. package/dist/hooks/use-launch-skill-in-chat.cjs.map +1 -0
  1090. package/dist/hooks/use-launch-skill-in-chat.js +16 -0
  1091. package/dist/hooks/use-launch-skill-in-chat.js.map +1 -0
  1092. package/dist/hooks/use-mcp-server-health.cjs +1 -1
  1093. package/dist/hooks/use-mcp-server-health.js +3 -3
  1094. package/dist/hooks/use-pinned-home-route.cjs +2 -0
  1095. package/dist/hooks/use-pinned-home-route.cjs.map +1 -0
  1096. package/dist/hooks/use-pinned-home-route.d.ts +33 -0
  1097. package/dist/hooks/use-pinned-home-route.js +34 -0
  1098. package/dist/hooks/use-pinned-home-route.js.map +1 -0
  1099. package/dist/hooks/use-resizable-drawer-width.cjs +2 -0
  1100. package/dist/hooks/use-resizable-drawer-width.cjs.map +1 -0
  1101. package/dist/hooks/use-resizable-drawer-width.d.ts +22 -0
  1102. package/dist/hooks/use-resizable-drawer-width.js +46 -0
  1103. package/dist/hooks/use-resizable-drawer-width.js.map +1 -0
  1104. package/dist/hooks/use-responder-url-secret.cjs +2 -0
  1105. package/dist/hooks/use-responder-url-secret.cjs.map +1 -0
  1106. package/dist/hooks/use-responder-url-secret.js +51 -0
  1107. package/dist/hooks/use-responder-url-secret.js.map +1 -0
  1108. package/dist/hooks/use-select-conversation-tab.cjs +1 -1
  1109. package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
  1110. package/dist/hooks/use-select-conversation-tab.d.ts +2 -0
  1111. package/dist/hooks/use-select-conversation-tab.js +15 -7
  1112. package/dist/hooks/use-select-conversation-tab.js.map +1 -1
  1113. package/dist/hooks/use-skill-enablement.cjs +2 -0
  1114. package/dist/hooks/use-skill-enablement.cjs.map +1 -0
  1115. package/dist/hooks/use-skill-enablement.d.ts +14 -0
  1116. package/dist/hooks/use-skill-enablement.js +80 -0
  1117. package/dist/hooks/use-skill-enablement.js.map +1 -0
  1118. package/dist/hooks/use-tracking.cjs +1 -1
  1119. package/dist/hooks/use-tracking.cjs.map +1 -1
  1120. package/dist/hooks/use-tracking.d.ts +17 -0
  1121. package/dist/hooks/use-tracking.js +10 -0
  1122. package/dist/hooks/use-tracking.js.map +1 -1
  1123. package/dist/hooks/use-websocket.cjs +1 -1
  1124. package/dist/hooks/use-websocket.cjs.map +1 -1
  1125. package/dist/hooks/use-websocket.d.ts +1 -2
  1126. package/dist/hooks/use-websocket.js +58 -51
  1127. package/dist/hooks/use-websocket.js.map +1 -1
  1128. package/dist/i18n/declaration.cjs +1 -1
  1129. package/dist/i18n/declaration.cjs.map +1 -1
  1130. package/dist/i18n/declaration.d.ts +153 -56
  1131. package/dist/i18n/declaration.js +1 -1
  1132. package/dist/i18n/declaration.js.map +1 -1
  1133. package/dist/i18n/translation.cjs +3 -3
  1134. package/dist/i18n/translation.cjs.map +1 -1
  1135. package/dist/i18n/translation.js +2629 -980
  1136. package/dist/i18n/translation.js.map +1 -1
  1137. package/dist/icons/check-circle.cjs +2 -0
  1138. package/dist/icons/check-circle.cjs.map +1 -0
  1139. package/dist/icons/check-circle.js +20 -0
  1140. package/dist/icons/check-circle.js.map +1 -0
  1141. package/dist/icons/chevron-down.cjs +2 -0
  1142. package/dist/icons/chevron-down.cjs.map +1 -0
  1143. package/dist/icons/chevron-down.js +20 -0
  1144. package/dist/icons/chevron-down.js.map +1 -0
  1145. package/dist/icons/clock.cjs +2 -0
  1146. package/dist/icons/clock.cjs.map +1 -0
  1147. package/dist/icons/clock.js +20 -0
  1148. package/dist/icons/clock.js.map +1 -0
  1149. package/dist/icons/exclamation-circle.cjs +2 -0
  1150. package/dist/icons/exclamation-circle.cjs.map +1 -0
  1151. package/dist/icons/exclamation-circle.js +20 -0
  1152. package/dist/icons/exclamation-circle.js.map +1 -0
  1153. package/dist/icons/kebab-vertical.cjs +2 -0
  1154. package/dist/icons/kebab-vertical.cjs.map +1 -0
  1155. package/dist/icons/kebab-vertical.js +14 -0
  1156. package/dist/icons/kebab-vertical.js.map +1 -0
  1157. package/dist/icons/key.cjs +2 -0
  1158. package/dist/icons/key.cjs.map +1 -0
  1159. package/dist/icons/key.js +21 -0
  1160. package/dist/icons/key.js.map +1 -0
  1161. package/dist/icons/message-square-share.cjs +2 -0
  1162. package/dist/icons/message-square-share.cjs.map +1 -0
  1163. package/dist/icons/message-square-share.js +22 -0
  1164. package/dist/icons/message-square-share.js.map +1 -0
  1165. package/dist/icons/play.cjs +2 -0
  1166. package/dist/icons/play.cjs.map +1 -0
  1167. package/dist/icons/play.js +19 -0
  1168. package/dist/icons/play.js.map +1 -0
  1169. package/dist/icons/power.cjs +2 -0
  1170. package/dist/icons/power.cjs.map +1 -0
  1171. package/dist/icons/power.js +20 -0
  1172. package/dist/icons/power.js.map +1 -0
  1173. package/dist/icons/sparkle.cjs +2 -0
  1174. package/dist/icons/sparkle.cjs.map +1 -0
  1175. package/dist/icons/sparkle.js +20 -0
  1176. package/dist/icons/sparkle.js.map +1 -0
  1177. package/dist/icons/trash.cjs +2 -0
  1178. package/dist/icons/trash.cjs.map +1 -0
  1179. package/dist/icons/trash.js +20 -0
  1180. package/dist/icons/trash.js.map +1 -0
  1181. package/dist/icons/x-circle.cjs +2 -0
  1182. package/dist/icons/x-circle.cjs.map +1 -0
  1183. package/dist/icons/x-circle.js +20 -0
  1184. package/dist/icons/x-circle.js.map +1 -0
  1185. package/dist/index.cjs +1 -1
  1186. package/dist/index.js +15 -14
  1187. package/dist/lib/index.cjs +1 -1
  1188. package/dist/lib/index.d.ts +1 -0
  1189. package/dist/lib/index.js +1 -0
  1190. package/dist/locales/ar/openhands.json +156 -59
  1191. package/dist/locales/ca/openhands.json +156 -59
  1192. package/dist/locales/de/openhands.json +156 -59
  1193. package/dist/locales/en/openhands.json +156 -59
  1194. package/dist/locales/es/openhands.json +156 -59
  1195. package/dist/locales/fr/openhands.json +156 -59
  1196. package/dist/locales/it/openhands.json +156 -59
  1197. package/dist/locales/ja/openhands.json +156 -59
  1198. package/dist/locales/ko-KR/openhands.json +156 -59
  1199. package/dist/locales/no/openhands.json +156 -59
  1200. package/dist/locales/pt/openhands.json +156 -59
  1201. package/dist/locales/tr/openhands.json +156 -59
  1202. package/dist/locales/uk/openhands.json +156 -59
  1203. package/dist/locales/zh-CN/openhands.json +156 -59
  1204. package/dist/locales/zh-TW/openhands.json +156 -59
  1205. package/dist/manifests/automation-insights.cjs +2 -0
  1206. package/dist/manifests/automation-insights.cjs.map +1 -0
  1207. package/dist/manifests/automation-insights.d.ts +2 -0
  1208. package/dist/manifests/automation-insights.js +9 -0
  1209. package/dist/manifests/automation-insights.js.map +1 -0
  1210. package/dist/manifests/automation-interface.cjs +1 -1
  1211. package/dist/manifests/automation-interface.cjs.map +1 -1
  1212. package/dist/manifests/automation-interface.d.ts +53 -31
  1213. package/dist/manifests/automation-interface.js +56 -59
  1214. package/dist/manifests/automation-interface.js.map +1 -1
  1215. package/dist/manifests/automation-setup.cjs +1 -1
  1216. package/dist/manifests/automation-setup.cjs.map +1 -1
  1217. package/dist/manifests/automation-setup.d.ts +37 -3
  1218. package/dist/manifests/automation-setup.js +16 -2
  1219. package/dist/manifests/automation-setup.js.map +1 -1
  1220. package/dist/manifests/interface-validation.cjs +1 -1
  1221. package/dist/manifests/interface-validation.cjs.map +1 -1
  1222. package/dist/manifests/interface-validation.js +56 -52
  1223. package/dist/manifests/interface-validation.js.map +1 -1
  1224. package/dist/manifests/manifest-actions.d.ts +5 -0
  1225. package/dist/manifests/manifest-bundle.d.ts +30 -0
  1226. package/dist/manifests/manifest-local-validation.d.ts +10 -1
  1227. package/dist/manifests/manifest-sources.cjs +1 -1
  1228. package/dist/manifests/manifest-sources.cjs.map +1 -1
  1229. package/dist/manifests/manifest-sources.js +3 -3
  1230. package/dist/manifests/manifest-sources.js.map +1 -1
  1231. package/dist/manifests/manifest-template.d.ts +14 -0
  1232. package/dist/manifests/manifest-validation.cjs +1 -1
  1233. package/dist/manifests/manifest-validation.cjs.map +1 -1
  1234. package/dist/manifests/manifest-validation.js +78 -45
  1235. package/dist/manifests/manifest-validation.js.map +1 -1
  1236. package/dist/manifests/types.cjs +1 -1
  1237. package/dist/manifests/types.cjs.map +1 -1
  1238. package/dist/manifests/types.d.ts +64 -3
  1239. package/dist/manifests/types.js +7 -6
  1240. package/dist/manifests/types.js.map +1 -1
  1241. package/dist/node_modules/@heroui/popover/dist/chunk-NW7HJLND.cjs +1 -1
  1242. package/dist/node_modules/@heroui/popover/dist/chunk-NW7HJLND.js +10 -10
  1243. package/dist/node_modules/@heroui/ripple/dist/chunk-UIQI3AYJ.cjs +1 -1
  1244. package/dist/node_modules/@heroui/ripple/dist/chunk-UIQI3AYJ.js +8 -8
  1245. package/dist/node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs +1 -1
  1246. package/dist/node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.js +9 -9
  1247. package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +4884 -0
  1248. package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -0
  1249. package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +11 -0
  1250. package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -0
  1251. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +13 -0
  1252. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -0
  1253. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +92 -0
  1254. package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -0
  1255. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +12 -0
  1256. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -0
  1257. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +103 -0
  1258. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -0
  1259. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -7
  1260. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
  1261. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +37 -13
  1262. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
  1263. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +2 -2
  1264. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -1
  1265. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +34 -34
  1266. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -1
  1267. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs +9 -0
  1268. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
  1269. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js +21 -0
  1270. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js.map +1 -0
  1271. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs +9 -0
  1272. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs.map +1 -0
  1273. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js +21 -0
  1274. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js.map +1 -0
  1275. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +3 -3
  1276. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -1
  1277. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +2 -2
  1278. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -1
  1279. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs +9 -0
  1280. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
  1281. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js +21 -0
  1282. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js.map +1 -0
  1283. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs +9 -0
  1284. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs.map +1 -0
  1285. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js +21 -0
  1286. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js.map +1 -0
  1287. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs +9 -0
  1288. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs.map +1 -0
  1289. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js +21 -0
  1290. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js.map +1 -0
  1291. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs +14 -0
  1292. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs.map +1 -0
  1293. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js +77 -0
  1294. package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js.map +1 -0
  1295. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +30 -0
  1296. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -0
  1297. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +65 -0
  1298. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -0
  1299. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
  1300. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
  1301. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +28 -10
  1302. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
  1303. package/dist/node_modules/@openhands/extensions/automations/index.cjs +1 -1
  1304. package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -1
  1305. package/dist/node_modules/@openhands/extensions/automations/index.js +18 -13
  1306. package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -1
  1307. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
  1308. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
  1309. package/dist/node_modules/@openhands/extensions/automations/interface.js +6 -2
  1310. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
  1311. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
  1312. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
  1313. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +2 -2
  1314. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
  1315. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +2 -0
  1316. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -0
  1317. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +40 -0
  1318. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -0
  1319. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  1320. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  1321. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -1
  1322. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  1323. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs +1 -1
  1324. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs.map +1 -1
  1325. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js +36 -3
  1326. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js.map +1 -1
  1327. package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.cjs +2 -0
  1328. package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.cjs.map +1 -0
  1329. package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.js +75 -0
  1330. package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.js.map +1 -0
  1331. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  1332. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  1333. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +75 -71
  1334. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  1335. package/dist/node_modules/@openhands/extensions/skills/index.cjs +1043 -49
  1336. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  1337. package/dist/node_modules/@openhands/extensions/skills/index.js +78 -17
  1338. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  1339. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
  1340. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +1 -1
  1341. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
  1342. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
  1343. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +8 -7
  1344. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
  1345. package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
  1346. package/dist/node_modules/@openhands/typescript-client/dist/index.js +2 -2
  1347. package/dist/node_modules/lucide-react/dist/esm/icons/activity.cjs +2 -0
  1348. package/dist/node_modules/lucide-react/dist/esm/icons/activity.cjs.map +1 -0
  1349. package/dist/node_modules/lucide-react/dist/esm/icons/activity.js +9 -0
  1350. package/dist/node_modules/lucide-react/dist/esm/icons/activity.js.map +1 -0
  1351. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs +2 -0
  1352. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs.map +1 -0
  1353. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js +16 -0
  1354. package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js.map +1 -0
  1355. package/dist/node_modules/lucide-react/dist/esm/icons/book-open.cjs +2 -0
  1356. package/dist/node_modules/lucide-react/dist/esm/icons/book-open.cjs.map +1 -0
  1357. package/dist/node_modules/lucide-react/dist/esm/icons/book-open.js +12 -0
  1358. package/dist/node_modules/lucide-react/dist/esm/icons/book-open.js.map +1 -0
  1359. package/dist/node_modules/lucide-react/dist/esm/icons/download.cjs +2 -0
  1360. package/dist/node_modules/lucide-react/dist/esm/icons/download.cjs.map +1 -0
  1361. package/dist/node_modules/lucide-react/dist/esm/icons/download.js +19 -0
  1362. package/dist/node_modules/lucide-react/dist/esm/icons/download.js.map +1 -0
  1363. package/dist/node_modules/lucide-react/dist/esm/icons/file-text.cjs +2 -0
  1364. package/dist/node_modules/lucide-react/dist/esm/icons/file-text.cjs.map +1 -0
  1365. package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +27 -0
  1366. package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js.map +1 -0
  1367. package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.cjs +2 -0
  1368. package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.cjs.map +1 -0
  1369. package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.js +27 -0
  1370. package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.js.map +1 -0
  1371. package/dist/node_modules/lucide-react/dist/esm/icons/laptop.cjs +2 -0
  1372. package/dist/node_modules/lucide-react/dist/esm/icons/laptop.cjs.map +1 -0
  1373. package/dist/node_modules/lucide-react/dist/esm/icons/laptop.js +12 -0
  1374. package/dist/node_modules/lucide-react/dist/esm/icons/laptop.js.map +1 -0
  1375. package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.cjs +2 -0
  1376. package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.cjs.map +1 -0
  1377. package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.js +39 -0
  1378. package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.js.map +1 -0
  1379. package/dist/node_modules/lucide-react/dist/esm/icons/library.cjs +2 -0
  1380. package/dist/node_modules/lucide-react/dist/esm/icons/library.cjs.map +1 -0
  1381. package/dist/node_modules/lucide-react/dist/esm/icons/library.js +23 -0
  1382. package/dist/node_modules/lucide-react/dist/esm/icons/library.js.map +1 -0
  1383. package/dist/node_modules/lucide-react/dist/esm/icons/package.cjs +2 -0
  1384. package/dist/node_modules/lucide-react/dist/esm/icons/package.cjs.map +1 -0
  1385. package/dist/node_modules/lucide-react/dist/esm/icons/package.js +23 -0
  1386. package/dist/node_modules/lucide-react/dist/esm/icons/package.js.map +1 -0
  1387. package/dist/node_modules/lucide-react/dist/esm/icons/palette.cjs +2 -0
  1388. package/dist/node_modules/lucide-react/dist/esm/icons/palette.cjs.map +1 -0
  1389. package/dist/node_modules/lucide-react/dist/esm/icons/palette.js +39 -0
  1390. package/dist/node_modules/lucide-react/dist/esm/icons/palette.js.map +1 -0
  1391. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs +2 -0
  1392. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs.map +1 -0
  1393. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +23 -0
  1394. package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js.map +1 -0
  1395. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.cjs +2 -0
  1396. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.cjs.map +1 -0
  1397. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js +12 -0
  1398. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js.map +1 -0
  1399. package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.cjs +2 -0
  1400. package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.cjs.map +1 -0
  1401. package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.js +12 -0
  1402. package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.js.map +1 -0
  1403. package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.cjs +2 -0
  1404. package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.cjs.map +1 -0
  1405. package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.js +25 -0
  1406. package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.js.map +1 -0
  1407. package/dist/node_modules/lucide-react/dist/esm/icons/timer.cjs +2 -0
  1408. package/dist/node_modules/lucide-react/dist/esm/icons/timer.cjs.map +1 -0
  1409. package/dist/node_modules/lucide-react/dist/esm/icons/timer.js +27 -0
  1410. package/dist/node_modules/lucide-react/dist/esm/icons/timer.js.map +1 -0
  1411. package/dist/package.cjs +1 -1
  1412. package/dist/package.cjs.map +1 -1
  1413. package/dist/package.js +3 -3
  1414. package/dist/package.js.map +1 -1
  1415. package/dist/routes/agent-settings.d.ts +10 -0
  1416. package/dist/routes/app-settings.cjs +1 -1
  1417. package/dist/routes/app-settings.cjs.map +1 -1
  1418. package/dist/routes/app-settings.js +88 -86
  1419. package/dist/routes/app-settings.js.map +1 -1
  1420. package/dist/routes/commits-tab.cjs +1 -1
  1421. package/dist/routes/commits-tab.cjs.map +1 -1
  1422. package/dist/routes/commits-tab.js +27 -21
  1423. package/dist/routes/commits-tab.js.map +1 -1
  1424. package/dist/routes/conversation.cjs +1 -1
  1425. package/dist/routes/conversation.cjs.map +1 -1
  1426. package/dist/routes/conversation.js +56 -55
  1427. package/dist/routes/conversation.js.map +1 -1
  1428. package/dist/routes/files-tab.cjs +1 -1
  1429. package/dist/routes/files-tab.cjs.map +1 -1
  1430. package/dist/routes/files-tab.d.ts +4 -0
  1431. package/dist/routes/files-tab.js +119 -149
  1432. package/dist/routes/files-tab.js.map +1 -1
  1433. package/dist/routes/llm-settings.cjs +1 -1
  1434. package/dist/routes/llm-settings.cjs.map +1 -1
  1435. package/dist/routes/llm-settings.d.ts +9 -1
  1436. package/dist/routes/llm-settings.js +141 -103
  1437. package/dist/routes/llm-settings.js.map +1 -1
  1438. package/dist/routes/mcp.cjs +1 -1
  1439. package/dist/routes/mcp.cjs.map +1 -1
  1440. package/dist/routes/mcp.js +20 -20
  1441. package/dist/routes/secrets-settings.cjs +1 -1
  1442. package/dist/routes/secrets-settings.js +15 -15
  1443. package/dist/services/canvas-ui.cjs +1 -1
  1444. package/dist/services/canvas-ui.cjs.map +1 -1
  1445. package/dist/services/canvas-ui.d.ts +5 -0
  1446. package/dist/services/canvas-ui.js +24 -10
  1447. package/dist/services/canvas-ui.js.map +1 -1
  1448. package/dist/services/settings.cjs +1 -1
  1449. package/dist/services/settings.cjs.map +1 -1
  1450. package/dist/services/settings.js +3 -2
  1451. package/dist/services/settings.js.map +1 -1
  1452. package/dist/stores/conversation-store.cjs +1 -1
  1453. package/dist/stores/conversation-store.cjs.map +1 -1
  1454. package/dist/stores/conversation-store.d.ts +8 -1
  1455. package/dist/stores/conversation-store.js +9 -0
  1456. package/dist/stores/conversation-store.js.map +1 -1
  1457. package/dist/stores/files-tab-store.cjs +1 -1
  1458. package/dist/stores/files-tab-store.cjs.map +1 -1
  1459. package/dist/stores/files-tab-store.d.ts +13 -0
  1460. package/dist/stores/files-tab-store.js +49 -5
  1461. package/dist/stores/files-tab-store.js.map +1 -1
  1462. package/dist/stores/use-event-store.cjs +1 -1
  1463. package/dist/stores/use-event-store.cjs.map +1 -1
  1464. package/dist/stores/use-event-store.js +11 -11
  1465. package/dist/stores/use-event-store.js.map +1 -1
  1466. package/dist/types/agent-server/core/events/message-event.d.ts +2 -2
  1467. package/dist/types/automation.cjs +2 -0
  1468. package/dist/types/automation.cjs.map +1 -0
  1469. package/dist/types/automation.d.ts +20 -0
  1470. package/dist/types/automation.js +8 -0
  1471. package/dist/types/automation.js.map +1 -0
  1472. package/dist/types/canvas-extension.cjs +2 -0
  1473. package/dist/types/canvas-extension.cjs.map +1 -0
  1474. package/dist/types/canvas-extension.d.ts +77 -0
  1475. package/dist/types/canvas-extension.js +6 -0
  1476. package/dist/types/canvas-extension.js.map +1 -0
  1477. package/dist/types/settings.d.ts +7 -0
  1478. package/dist/ui/help-link.cjs +1 -1
  1479. package/dist/ui/help-link.cjs.map +1 -1
  1480. package/dist/ui/help-link.d.ts +6 -1
  1481. package/dist/ui/help-link.js +32 -18
  1482. package/dist/ui/help-link.js.map +1 -1
  1483. package/dist/utils/acp-auth-display.d.ts +35 -0
  1484. package/dist/utils/automation-catalog.cjs +1 -1
  1485. package/dist/utils/automation-catalog.cjs.map +1 -1
  1486. package/dist/utils/automation-catalog.d.ts +12 -0
  1487. package/dist/utils/automation-catalog.js +20 -1
  1488. package/dist/utils/automation-catalog.js.map +1 -1
  1489. package/dist/utils/automation-schedule.cjs +2 -0
  1490. package/dist/utils/automation-schedule.cjs.map +1 -0
  1491. package/dist/utils/automation-schedule.js +8 -0
  1492. package/dist/utils/automation-schedule.js.map +1 -0
  1493. package/dist/utils/automation-stack-section.cjs +2 -0
  1494. package/dist/utils/automation-stack-section.cjs.map +1 -0
  1495. package/dist/utils/automation-stack-section.d.ts +2 -0
  1496. package/dist/utils/automation-stack-section.js +6 -0
  1497. package/dist/utils/automation-stack-section.js.map +1 -0
  1498. package/dist/utils/cache-utils.cjs +1 -1
  1499. package/dist/utils/cache-utils.js +5 -5
  1500. package/dist/utils/constants.cjs +1 -1
  1501. package/dist/utils/constants.cjs.map +1 -1
  1502. package/dist/utils/constants.js +4 -0
  1503. package/dist/utils/constants.js.map +1 -1
  1504. package/dist/utils/conversation-local-storage.cjs +1 -1
  1505. package/dist/utils/conversation-local-storage.cjs.map +1 -1
  1506. package/dist/utils/conversation-local-storage.d.ts +17 -4
  1507. package/dist/utils/conversation-local-storage.js +111 -63
  1508. package/dist/utils/conversation-local-storage.js.map +1 -1
  1509. package/dist/utils/conversation-metrics.cjs +1 -1
  1510. package/dist/utils/conversation-metrics.cjs.map +1 -1
  1511. package/dist/utils/conversation-metrics.d.ts +3 -2
  1512. package/dist/utils/conversation-metrics.js +16 -14
  1513. package/dist/utils/conversation-metrics.js.map +1 -1
  1514. package/dist/utils/conversation-overview-project-scope.cjs +2 -0
  1515. package/dist/utils/conversation-overview-project-scope.cjs.map +1 -0
  1516. package/dist/utils/conversation-overview-project-scope.d.ts +16 -0
  1517. package/dist/utils/conversation-overview-project-scope.js +22 -0
  1518. package/dist/utils/conversation-overview-project-scope.js.map +1 -0
  1519. package/dist/utils/extension-module-card-classes.cjs +1 -1
  1520. package/dist/utils/extension-module-card-classes.cjs.map +1 -1
  1521. package/dist/utils/extension-module-card-classes.d.ts +1 -1
  1522. package/dist/utils/extension-module-card-classes.js +2 -2
  1523. package/dist/utils/extension-module-card-classes.js.map +1 -1
  1524. package/dist/utils/format-model-name.cjs +1 -1
  1525. package/dist/utils/format-model-name.cjs.map +1 -1
  1526. package/dist/utils/format-model-name.d.ts +7 -3
  1527. package/dist/utils/format-model-name.js +6 -11
  1528. package/dist/utils/format-model-name.js.map +1 -1
  1529. package/dist/utils/format-relative-time.cjs +2 -0
  1530. package/dist/utils/format-relative-time.cjs.map +1 -0
  1531. package/dist/utils/format-relative-time.d.ts +7 -0
  1532. package/dist/utils/format-relative-time.js +22 -0
  1533. package/dist/utils/format-relative-time.js.map +1 -0
  1534. package/dist/utils/git-diff-stats.cjs +5 -0
  1535. package/dist/utils/git-diff-stats.cjs.map +1 -0
  1536. package/dist/utils/git-diff-stats.d.ts +9 -0
  1537. package/dist/utils/git-diff-stats.js +53 -0
  1538. package/dist/utils/git-diff-stats.js.map +1 -0
  1539. package/dist/utils/handle-event-for-ui.cjs +1 -1
  1540. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  1541. package/dist/utils/handle-event-for-ui.js +13 -11
  1542. package/dist/utils/handle-event-for-ui.js.map +1 -1
  1543. package/dist/utils/mcp-credential-validation.cjs +1 -1
  1544. package/dist/utils/mcp-credential-validation.js +3 -3
  1545. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  1546. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  1547. package/dist/utils/mcp-marketplace-utils.js +22 -9
  1548. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  1549. package/dist/utils/parse-git-remote-url.cjs +1 -1
  1550. package/dist/utils/parse-git-remote-url.cjs.map +1 -1
  1551. package/dist/utils/parse-git-remote-url.js +6 -7
  1552. package/dist/utils/parse-git-remote-url.js.map +1 -1
  1553. package/dist/utils/path-utils.cjs +1 -1
  1554. package/dist/utils/path-utils.cjs.map +1 -1
  1555. package/dist/utils/path-utils.d.ts +15 -3
  1556. package/dist/utils/path-utils.js +29 -3
  1557. package/dist/utils/path-utils.js.map +1 -1
  1558. package/dist/utils/recommended-automation-rail.cjs +2 -0
  1559. package/dist/utils/recommended-automation-rail.cjs.map +1 -0
  1560. package/dist/utils/recommended-automation-rail.d.ts +22 -0
  1561. package/dist/utils/recommended-automation-rail.js +44 -0
  1562. package/dist/utils/recommended-automation-rail.js.map +1 -0
  1563. package/dist/utils/responder-deployment.cjs +2 -0
  1564. package/dist/utils/responder-deployment.cjs.map +1 -0
  1565. package/dist/utils/responder-deployment.js +42 -0
  1566. package/dist/utils/responder-deployment.js.map +1 -0
  1567. package/dist/utils/scroll-fade-state.cjs +2 -0
  1568. package/dist/utils/scroll-fade-state.cjs.map +1 -0
  1569. package/dist/utils/scroll-fade-state.d.ts +6 -0
  1570. package/dist/utils/scroll-fade-state.js +13 -0
  1571. package/dist/utils/scroll-fade-state.js.map +1 -0
  1572. package/dist/utils/skill-category.cjs +2 -0
  1573. package/dist/utils/skill-category.cjs.map +1 -0
  1574. package/dist/utils/skill-category.js +51 -0
  1575. package/dist/utils/skill-category.js.map +1 -0
  1576. package/dist/utils/skill-enablement.cjs +2 -0
  1577. package/dist/utils/skill-enablement.cjs.map +1 -0
  1578. package/dist/utils/skill-enablement.d.ts +51 -0
  1579. package/dist/utils/skill-enablement.js +31 -0
  1580. package/dist/utils/skill-enablement.js.map +1 -0
  1581. package/dist/utils/skill-scope.cjs +1 -1
  1582. package/dist/utils/skill-scope.cjs.map +1 -1
  1583. package/dist/utils/skill-scope.js +1 -1
  1584. package/dist/utils/skill-scope.js.map +1 -1
  1585. package/dist/utils/streaming-delta-batcher.cjs +2 -0
  1586. package/dist/utils/streaming-delta-batcher.cjs.map +1 -0
  1587. package/dist/utils/streaming-delta-batcher.d.ts +21 -0
  1588. package/dist/utils/streaming-delta-batcher.js +31 -0
  1589. package/dist/utils/streaming-delta-batcher.js.map +1 -0
  1590. package/dist/utils/tar-gzip.d.ts +26 -0
  1591. package/dist/utils/utils.cjs +1 -1
  1592. package/dist/utils/utils.cjs.map +1 -1
  1593. package/dist/utils/utils.d.ts +1 -41
  1594. package/dist/utils/utils.js +27 -6
  1595. package/dist/utils/utils.js.map +1 -1
  1596. package/dist/utils/vscode-origin.cjs +2 -0
  1597. package/dist/utils/vscode-origin.cjs.map +1 -0
  1598. package/dist/utils/vscode-origin.d.ts +55 -0
  1599. package/dist/utils/vscode-origin.js +27 -0
  1600. package/dist/utils/vscode-origin.js.map +1 -0
  1601. package/dist/utils/websocket-handshake.cjs +2 -0
  1602. package/dist/utils/websocket-handshake.cjs.map +1 -0
  1603. package/dist/utils/websocket-handshake.d.ts +11 -0
  1604. package/dist/utils/websocket-handshake.js +12 -0
  1605. package/dist/utils/websocket-handshake.js.map +1 -0
  1606. package/dist/utils/workspace-mode.d.ts +4 -0
  1607. package/package.json +3 -3
  1608. package/scripts/check-sdk-version-sync.mjs +6 -6
  1609. package/scripts/check-translation-completeness.cjs +5 -0
  1610. package/scripts/dev-extra-backend.mjs +28 -9
  1611. package/scripts/dev-safe.mjs +81 -8
  1612. package/scripts/dev-static.mjs +48 -44
  1613. package/scripts/dev-with-automation.mjs +95 -6
  1614. package/scripts/ingress.mjs +27 -1
  1615. package/scripts/seed-automation-ux-data.mjs +810 -0
  1616. package/scripts/static-server.mjs +74 -1
  1617. package/tools/canvas_ui_tool.py +19 -0
  1618. package/build/assets/acp-providers-CYy8qA2z.js +0 -1
  1619. package/build/assets/active-backend-context-BZDG15C0.js +0 -2
  1620. package/build/assets/agent-context-settings-DGWBBbcp.js +0 -1
  1621. package/build/assets/agent-profiles-settings-DrkGdf4_.js +0 -1
  1622. package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +0 -86
  1623. package/build/assets/agent-settings-DfcSgkLD.js +0 -2
  1624. package/build/assets/agent-settings-Lrc5-twS.js +0 -1
  1625. package/build/assets/alert-banner-BgDHhL7b.js +0 -1
  1626. package/build/assets/api-error-message-BEIE_yD1.js +0 -1
  1627. package/build/assets/api-key-entry-screen-DaZnOlVo.js +0 -1
  1628. package/build/assets/app-settings-BG5NAUbC.js +0 -1
  1629. package/build/assets/automation-detail-D4Hs831Z.js +0 -3
  1630. package/build/assets/automation-export-n0X6FB0C.js +0 -2
  1631. package/build/assets/automation-git-sync-CDrm8WV7.js +0 -1
  1632. package/build/assets/automation-setup-route-CZCl4ONs.js +0 -1
  1633. package/build/assets/automation-templates-DFF96AdL.js +0 -1
  1634. package/build/assets/automations-list-Bl-oGOrV.js +0 -1
  1635. package/build/assets/back-nav-button-H_ThtDA0.js +0 -1
  1636. package/build/assets/backend-form-modal-CbCemvHt.js +0 -1
  1637. package/build/assets/backend-not-configured-DP8KLNq_.js +0 -1
  1638. package/build/assets/backend-synced-settings-badge-BBASWqsb.js +0 -1
  1639. package/build/assets/badge-B-51h-SW.js +0 -1
  1640. package/build/assets/base-modal-BbjycA8X.js +0 -1
  1641. package/build/assets/bot-CGPCg03p.js +0 -1
  1642. package/build/assets/brand-button-Blxv5nww.js +0 -1
  1643. package/build/assets/browser-CuW0nWvh.js +0 -7
  1644. package/build/assets/browser-tab-D5G0ORwt.js +0 -1
  1645. package/build/assets/chat-send-button-BD2tii1r.js +0 -1
  1646. package/build/assets/check-DSuS-lyr.js +0 -1
  1647. package/build/assets/chevron-down-CgGcmtE2.js +0 -1
  1648. package/build/assets/circle-check-CG5-NPw7.js +0 -1
  1649. package/build/assets/circle-plus-check-toggle-ASbpB8vN.js +0 -1
  1650. package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +0 -1
  1651. package/build/assets/cog-CZiR80uT.js +0 -1
  1652. package/build/assets/combobox-caret-DvpEsh2O.js +0 -1
  1653. package/build/assets/command-menu-DwUQzjYP.js +0 -1
  1654. package/build/assets/condenser-settings-BptcoiLA.js +0 -1
  1655. package/build/assets/confirmation-modal-CiEwxZAA.js +0 -1
  1656. package/build/assets/context-menu-list-item-CdcamfM1.js +0 -1
  1657. package/build/assets/conversation-DREHj4nT.js +0 -1
  1658. package/build/assets/conversation-DotRfiDz.js +0 -90
  1659. package/build/assets/conversation-panel-DREHj4nT.js +0 -1
  1660. package/build/assets/conversation-state-store-DMLtlHbE.js +0 -1
  1661. package/build/assets/conversation-store-Blc5xysY.js +0 -6
  1662. package/build/assets/conversation-tab-empty-state-D-puECpY.js +0 -1
  1663. package/build/assets/copy-to-clipboard-button-BGxcUbgy.js +0 -1
  1664. package/build/assets/device-verify-CZJfWaJf.js +0 -1
  1665. package/build/assets/dropdown-classes-tLhpwtxS.js +0 -1
  1666. package/build/assets/entry.client-D8GnI6GZ.js +0 -2
  1667. package/build/assets/enum-filter-dropdown-Fk8k60nk.js +0 -1
  1668. package/build/assets/environment-switch-overlay-DeztVYuL.js +0 -1
  1669. package/build/assets/extension-module-card-classes-Bo43vY5V.js +0 -1
  1670. package/build/assets/extensions-hub-Cd6GCYzq.js +0 -1
  1671. package/build/assets/extensions-navigation-C4sgZg-y.js +0 -1
  1672. package/build/assets/external-link-C0UpBgsE.js +0 -1
  1673. package/build/assets/file-text-C6WYtNdV.js +0 -1
  1674. package/build/assets/files-tab-BW_qzyAm.js +0 -1
  1675. package/build/assets/form-control-classes-CGXBLcn1.js +0 -1
  1676. package/build/assets/format-model-name-BNPKVsIq.js +0 -1
  1677. package/build/assets/format-relative-time-ZhQD4rsl.js +0 -1
  1678. package/build/assets/git-provider-icon-CaQ1yLPi.js +0 -1
  1679. package/build/assets/git-repo-dropdown-CgXR6M_E.js +0 -1
  1680. package/build/assets/git-repo-dropdown-D2Uei3CO.js +0 -1
  1681. package/build/assets/highlighted-source-view-C_YOp8Fo.js +0 -1
  1682. package/build/assets/home-DNzzJcMP.js +0 -1
  1683. package/build/assets/home-aCos-5vc.js +0 -1
  1684. package/build/assets/home-store-DgzViC3f.js +0 -1
  1685. package/build/assets/index-home-DNzzJcMP.js +0 -1
  1686. package/build/assets/info-CLoC1LRo.js +0 -1
  1687. package/build/assets/install-server-modal-D7zIqNKz.js +0 -1
  1688. package/build/assets/kebab-menu-item-content-DERMdnDv.js +0 -1
  1689. package/build/assets/launch-5PjKeLak.js +0 -1
  1690. package/build/assets/list-todo-BF049YaY.js +0 -1
  1691. package/build/assets/llm-not-configured-banner-BK9z5eS0.js +0 -27
  1692. package/build/assets/llm-settings-BLAMK2tR.js +0 -1
  1693. package/build/assets/llm-settings-BWsbarGM.js +0 -1
  1694. package/build/assets/llm-subscription-service-SfnEV9Uc.js +0 -1
  1695. package/build/assets/loader-circle-D7IagAyF.js +0 -1
  1696. package/build/assets/loading-spinner-DBgXgra0.js +0 -1
  1697. package/build/assets/manage-backends-modal-BTqNPhzc.js +0 -1
  1698. package/build/assets/manifest-abebca3c.js +0 -1
  1699. package/build/assets/manifest-subpage-layout-Rn-glaxV.js +0 -1
  1700. package/build/assets/map-provider-BK4HnqYz.js +0 -1
  1701. package/build/assets/markdown-renderer-Cp6DlHQN.js +0 -8
  1702. package/build/assets/mcp-BC-Ixn4T.js +0 -9
  1703. package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +0 -1
  1704. package/build/assets/messages-CzFKrzPG.js +0 -40
  1705. package/build/assets/modal-body-BdKfD3Hl.js +0 -1
  1706. package/build/assets/modal-classes-D5_b5vMi.js +0 -1
  1707. package/build/assets/modal-close-button-objukxk_.js +0 -1
  1708. package/build/assets/mouse-pointer-click-C_gXyLyD.js +0 -1
  1709. package/build/assets/npm-CHVHV1MC.js +0 -1
  1710. package/build/assets/onboarding-Diw0V51A.js +0 -1
  1711. package/build/assets/onboarding-modal-Da4yHzsA.js +0 -1
  1712. package/build/assets/organization-service.api-BztSy69u.js +0 -1
  1713. package/build/assets/parse-git-remote-url-BkXN9jzl.js +0 -1
  1714. package/build/assets/pencil-49avMHlD.js +0 -1
  1715. package/build/assets/planner-tab-CJiSpNax.js +0 -1
  1716. package/build/assets/plugins-management-service-lHdNKWNU.js +0 -1
  1717. package/build/assets/plus-C0BagBpV.js +0 -1
  1718. package/build/assets/profiles-service.api-BLr7FXec.js +0 -1
  1719. package/build/assets/providers-CWXnb7S3.js +0 -1
  1720. package/build/assets/proxy-DYDXxtje.js +0 -1
  1721. package/build/assets/puzzle-Bt2B1rzf.js +0 -1
  1722. package/build/assets/recommended-automations-launcher-CcFMfJRR.js +0 -1
  1723. package/build/assets/refresh-cw-nmcesifB.js +0 -1
  1724. package/build/assets/root-CT4t7apy.css +0 -1
  1725. package/build/assets/root-DnRgLKpU.js +0 -2
  1726. package/build/assets/root-layout-2L9tr-BN.js +0 -2
  1727. package/build/assets/schema-field-C59lVZTA.js +0 -1
  1728. package/build/assets/sdk-section-page-BbBEQQjq.js +0 -1
  1729. package/build/assets/search-CYSDBczG.js +0 -1
  1730. package/build/assets/secrets-service-BtsgYSlj.js +0 -1
  1731. package/build/assets/secrets-settings-DJ0OKa4_.js +0 -1
  1732. package/build/assets/segmented-toggle-DiVfTZuN.js +0 -1
  1733. package/build/assets/settings-CDqL_Uqh.js +0 -1
  1734. package/build/assets/settings-DcNPxz0v.js +0 -1
  1735. package/build/assets/settings-dropdown-input-Ba1UN5Du.js +0 -1
  1736. package/build/assets/settings-index-Cz2cKt2K.js +0 -1
  1737. package/build/assets/settings-input-CWUEHHvS.js +0 -1
  1738. package/build/assets/settings-list-classes-DdcLXDGn.js +0 -1
  1739. package/build/assets/settings-modal-nEEK1Kh1.js +0 -1
  1740. package/build/assets/settings-service.api-3yAUFcaP.js +0 -1
  1741. package/build/assets/settings-switch-Dk9hChx1.js +0 -1
  1742. package/build/assets/settings-utils-CxjtCSB3.js +0 -1
  1743. package/build/assets/shared-conversation-DbAcrx3s.js +0 -1
  1744. package/build/assets/shield-check-CiOTXxV2.js +0 -1
  1745. package/build/assets/sidebar-layout-lrfPooIB.js +0 -1
  1746. package/build/assets/sidebar-mobile-menu-toggle-KERXfNu1.js +0 -1
  1747. package/build/assets/sidebar-nav-link-B8lFD6Cb.js +0 -1
  1748. package/build/assets/sidebar-store-u6pUpxJ7.js +0 -1
  1749. package/build/assets/skill-card-pill-row-dGIUzr_b.js +0 -1
  1750. package/build/assets/skill-icon-badge-kkOWZ89w.js +0 -1
  1751. package/build/assets/skill-scope-DWN1PBPH.js +0 -1
  1752. package/build/assets/skills-plugins-DFjH2Nq6.js +0 -1
  1753. package/build/assets/skills-settings-DIHpl3ol.js +0 -2
  1754. package/build/assets/sparkles-ntyMLnbj.js +0 -1
  1755. package/build/assets/styled-tooltip-B6JXcsmL.js +0 -1
  1756. package/build/assets/task-list-tab-aEJzEcHD.js +0 -1
  1757. package/build/assets/terminal-Dch7Ty5K.js +0 -3
  1758. package/build/assets/toggle-switch-B2MLKsgt.js +0 -1
  1759. package/build/assets/trash-2-yZnDM4Ji.js +0 -1
  1760. package/build/assets/typography-DB5HoCk0.js +0 -1
  1761. package/build/assets/usage-tab-DrEtBmBT.js +0 -1
  1762. package/build/assets/use-acp-credential-form-c8KXAa8A.js +0 -1
  1763. package/build/assets/use-activate-agent-profile-B0p34N3q.js +0 -1
  1764. package/build/assets/use-agent-profiles-CPIc6wLH.js +0 -1
  1765. package/build/assets/use-can-manage-org-profiles-Dz_8Eqkv.js +0 -1
  1766. package/build/assets/use-cloud-current-user-id-DvUVqCle.js +0 -1
  1767. package/build/assets/use-config-C3PO4TBw.js +0 -1
  1768. package/build/assets/use-create-conversation-DVrA_uLD.js +0 -1
  1769. package/build/assets/use-create-secret-DbBIpaCR.js +0 -1
  1770. package/build/assets/use-get-secrets-6PBitf54.js +0 -1
  1771. package/build/assets/use-has-permission-CQ31Cl8j.js +0 -1
  1772. package/build/assets/use-is-authed-2UrDIziV.js +0 -1
  1773. package/build/assets/use-is-creating-conversation-BvYpmb3v.js +0 -1
  1774. package/build/assets/use-launch-skill-in-chat-COnDpxCQ.js +0 -1
  1775. package/build/assets/use-llm-profiles-diZS4FiN.js +0 -1
  1776. package/build/assets/use-manifest-capabilities-HIWCtIUm.js +0 -1
  1777. package/build/assets/use-onboarding-completion-Bs8PcXik.js +0 -1
  1778. package/build/assets/use-plugins-marketplace-BCuNLFsr.js +0 -1
  1779. package/build/assets/use-save-agent-profile-BaMNSpBV.js +0 -1
  1780. package/build/assets/use-save-settings-BahvC2Gw.js +0 -1
  1781. package/build/assets/use-settings-C6ZxpBDX.js +0 -1
  1782. package/build/assets/use-settings-nav-items-Bqn69Ggw.js +0 -16
  1783. package/build/assets/use-tracking-Bhu7gk2y.js +0 -3
  1784. package/build/assets/use-user-conversation-BkNXpXrd.js +0 -1
  1785. package/build/assets/useInfiniteQuery-c_OmS3lK.js +0 -1
  1786. package/build/assets/useMutation-6ZsQCqAn.js +0 -1
  1787. package/build/assets/useQueries-xDrGlTO_.js +0 -1
  1788. package/build/assets/useQuery-Bs5NFz2s.js +0 -1
  1789. package/build/assets/utils-DUD5ScdA.js +0 -1
  1790. package/build/assets/vendor~browser-B-fae1JU.js +0 -47
  1791. package/build/assets/vendor~entry.client-BFE7Llz9.js +0 -1
  1792. package/build/assets/vendor~entry.client-BaKt_PIp.js +0 -9
  1793. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js +0 -186
  1794. package/build/assets/vendor~files-tab-B6POTS66.js +0 -11
  1795. package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +0 -13
  1796. package/build/assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js +0 -1
  1797. package/build/assets/vendor~root-layout-DeQACFVA.js +0 -1
  1798. package/build/assets/vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js +0 -1
  1799. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js +0 -1
  1800. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js +0 -1
  1801. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js +0 -1
  1802. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js +0 -48
  1803. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js +0 -1
  1804. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js +0 -73
  1805. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js +0 -7465
  1806. package/build/assets/verification-settings-COueVXmM.js +0 -1
  1807. package/build/assets/wrench-C95ujnYo.js +0 -1
  1808. package/build/assets/x-86ZCfxKY.js +0 -1
  1809. package/build/assets/zap-DRa-r-Tf.js +0 -1
  1810. package/dist/components/features/diff-viewer/empty-changes-message.cjs +0 -2
  1811. package/dist/components/features/diff-viewer/empty-changes-message.cjs.map +0 -1
  1812. package/dist/components/features/diff-viewer/empty-changes-message.js +0 -17
  1813. package/dist/components/features/diff-viewer/empty-changes-message.js.map +0 -1
  1814. package/dist/components/features/tips/random-tip.cjs +0 -2
  1815. package/dist/components/features/tips/random-tip.cjs.map +0 -1
  1816. package/dist/components/features/tips/random-tip.d.ts +0 -2
  1817. package/dist/components/features/tips/random-tip.js +0 -41
  1818. package/dist/components/features/tips/random-tip.js.map +0 -1
  1819. package/dist/hooks/query/use-has-git-commits.cjs +0 -2
  1820. package/dist/hooks/query/use-has-git-commits.cjs.map +0 -1
  1821. package/dist/hooks/query/use-has-git-commits.d.ts +0 -25
  1822. package/dist/hooks/query/use-has-git-commits.js +0 -31
  1823. package/dist/hooks/query/use-has-git-commits.js.map +0 -1
  1824. package/dist/hooks/use-has-attached-source.cjs +0 -2
  1825. package/dist/hooks/use-has-attached-source.cjs.map +0 -1
  1826. package/dist/hooks/use-has-attached-source.d.ts +0 -18
  1827. package/dist/hooks/use-has-attached-source.js +0 -14
  1828. package/dist/hooks/use-has-attached-source.js.map +0 -1
  1829. package/dist/icons/chveron-up.cjs +0 -2
  1830. package/dist/icons/chveron-up.cjs.map +0 -1
  1831. package/dist/icons/chveron-up.js +0 -21
  1832. package/dist/icons/chveron-up.js.map +0 -1
  1833. package/dist/routes/changes-tab.cjs +0 -2
  1834. package/dist/routes/changes-tab.cjs.map +0 -1
  1835. package/dist/routes/changes-tab.d.ts +0 -3
  1836. package/dist/routes/changes-tab.js +0 -64
  1837. package/dist/routes/changes-tab.js.map +0 -1
  1838. package/dist/utils/file-priority.cjs +0 -2
  1839. package/dist/utils/file-priority.cjs.map +0 -1
  1840. package/dist/utils/file-priority.d.ts +0 -27
  1841. package/dist/utils/file-priority.js +0 -61
  1842. package/dist/utils/file-priority.js.map +0 -1
  1843. package/dist/utils/table-row-classes.d.ts +0 -9
  1844. package/dist/utils/tips.cjs +0 -2
  1845. package/dist/utils/tips.cjs.map +0 -1
  1846. package/dist/utils/tips.d.ts +0 -7
  1847. package/dist/utils/tips.js +0 -45
  1848. package/dist/utils/tips.js.map +0 -1
  1849. package/dist/utils/workspace-relative-path.cjs +0 -2
  1850. package/dist/utils/workspace-relative-path.cjs.map +0 -1
  1851. package/dist/utils/workspace-relative-path.d.ts +0 -10
  1852. package/dist/utils/workspace-relative-path.js +0 -22
  1853. package/dist/utils/workspace-relative-path.js.map +0 -1
  1854. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js} +0 -0
  1855. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"settings-service.api.cjs","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport type {\n MCPConfigPatch,\n MCPServer,\n MCPServerPatch,\n} from \"@openhands/typescript-client\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport { stringRecord } from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`) are replaced wholesale rather than merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\n/**\n * Convert SDK `auth` credentials to the cloud's header-only storage shape.\n *\n * The cloud settings endpoint applies `mcp_config` as a merge patch, so a\n * credential change must also tombstone the headers the previous credential\n * produced — otherwise stale secrets survive a strategy switch (e.g. an\n * api_key's custom header after moving to bearer). Stored headers that the\n * new credential still produces (via the patch's carried `headers` or the\n * converted auth) are left untouched; any other stored header is cleared.\n */\nconst cloudCompatibleMcpConfig = async (value: unknown): Promise<unknown> => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const needsStoredCredential =\n Object.values(serverMap).some(\n (server) =>\n isRecord(server) && isRecord(server.auth) && server.auth !== null,\n ) && getActiveBackend().backend.kind === \"cloud\";\n\n const storedHeadersByServer = new Map<string, Record<string, string>>();\n if (needsStoredCredential) {\n try {\n const stored = await fetchCloudSettings();\n const storedMcp = isRecord(stored.mcp_config) ? stored.mcp_config : {};\n for (const [name, server] of Object.entries(storedMcp)) {\n if (isRecord(server)) {\n const headers = stringRecord(\n (server as Record<string, unknown>).headers,\n );\n if (headers) storedHeadersByServer.set(name, headers);\n }\n }\n } catch {\n // Fall back to the patch-only conversion; a transient fetch failure\n // must not block saving the user's explicit edits.\n }\n }\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server)) return [name, server];\n if (server.auth === null) {\n const nextServer: Record<string, unknown> = {\n ...server,\n headers: null,\n };\n delete nextServer.auth;\n return [name, nextServer];\n }\n if (!isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders: Record<string, string | null> = {\n ...existingHeaders,\n ...authHeaders,\n };\n\n const storedHeaders = storedHeadersByServer.get(name);\n if (storedHeaders) {\n for (const key of Object.keys(storedHeaders)) {\n if (!(key in mergedHeaders)) mergedHeaders[key] = null;\n }\n }\n\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Apply one name-keyed MCP merge patch in exactly one request. The server\n * owns the stored catalog and secret preservation; Canvas never rebuilds\n * the catalog from redacted display settings.\n */\n static async patchMcpConfig(patch: MCPConfigPatch): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n const mcpConfig = await cloudCompatibleMcpConfig(patch);\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: mcpConfig as SettingsValue },\n }),\n );\n } else {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: patch },\n }),\n );\n }\n clearCache();\n return true;\n }\n\n static async patchMcpServer(\n settingsKey: string,\n patch: MCPServerPatch,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: patch });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).patchMcpServer(\n settingsKey,\n patch,\n ),\n );\n clearCache();\n return true;\n }\n\n static async createMcpServer(\n settingsKey: string,\n server: MCPServer,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: server });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).createMcpServer(\n settingsKey,\n server,\n ),\n );\n clearCache();\n return true;\n }\n\n static async deleteMcpServer(settingsKey: string): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: null });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteMcpServer(\n settingsKey,\n ),\n );\n clearCache();\n return true;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n cloudPayload.agent_settings_diff.mcp_config =\n (await cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n )) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n await withRetry(() => saveCloudSettings(cloudPayload));\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":"ucAwBA,IAAa,EAAwB,CACnC,WACA,6BACA,6BACA,gBACA,iBACA,oBACA,iBACF,EAsDM,EAAgD,IAAI,IACxD,CACF,EAEM,EAAwB,GAC5B,EAAyB,IAAI,CAAG,EAQ5B,EACJ,GACiE,CACjE,IAAM,EAA4B,CAAC,EAC7B,EAAgC,CAAC,EACvC,IAAK,GAAM,CAAC,EAAK,KAAU,OAAO,QAAQ,CAAK,EACzC,EAAqB,CAAG,EAC1B,EAAuC,GAAO,EAE9C,EAAK,GAAO,EAGhB,MAAO,CAAE,YAAW,MAAK,CAC3B,EAWM,EAAgB,GAAgB,KAAK,MAAM,KAAK,UAAU,CAAK,CAAC,EAEhE,GACJ,EACA,KACI,CAAE,GAAI,GAAQ,CAAC,EAAI,GAAI,GAAQ,CAAC,CAAG,GAKzC,eAAe,EACb,EACA,EAAqB,EACrB,EAAsB,IACV,CACZ,IAAK,IAAI,EAAU,EAAG,EAAU,EAAY,GAAW,EACrD,GAAI,CACF,OAAO,MAAM,EAAG,CAClB,OAAS,EAAO,CACd,GAAI,GAAW,EAAa,EAC1B,MAAM,EAGR,IAAM,EAAQ,EAAc,GAAK,EAEjC,MAAM,IAAI,QAAe,GAAY,CACnC,WAAW,EAAS,CAAK,CAC3B,CAAC,CACH,CAGF,MAAU,MAAM,0BAA0B,CAC5C,CAMA,IAAI,EAOA,CACF,SAAU,KACV,UAAW,KACX,UAAW,CACb,EAEM,EA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CAAE,UAAW,EAAgB,QAAS,EAC1C,CACF,EACM,EAAoB,OAAO,KAAK,CAAc,EAAE,OAAS,EAEzD,EAAiC,CAAC,EAGlC,EAAoB,EAAK,oBAG3B,GAAqB,OAAO,KAAK,CAAiB,EAAE,OAAS,IAC/D,EAAQ,oBAAsB,GAIhC,IAAM,EAA2B,EAAK,2BAetC,GAXE,GACA,OAAO,KAAK,CAAwB,EAAE,OAAS,IAE/C,EAAQ,2BAA6B,GAGnC,IACF,EAAQ,mBAAqB,CAAE,gBAAiB,CAAe,GAGjD,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QACvC,CAKX,GAAI,EAHA,EAAQ,qBACR,EAAQ,4BACV,GAEA,MAAO,GAKT,IAAM,EAAwD,CAAC,EAC3D,EAAQ,sBACV,EAAa,oBAAsB,CAAE,GAAG,EAAQ,mBAAoB,EAChE,eAAgB,EAAa,sBAC/B,EAAa,oBAAoB,WAC9B,MAAM,EACL,EAAa,oBAAoB,UACnC,IAGF,EAAQ,6BACV,EAAa,2BACX,EAAQ,4BAER,IAIF,EAAa,gBAAkB,GAEjC,MAAM,MAAgB,EAAA,kBAAkB,CAAY,CAAC,CACvD,KAAO,CAOL,GAAI,EAHA,EAAQ,qBACR,EAAQ,4BACR,EAAQ,oBAEV,MAAO,GAET,MAAM,MACJ,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,eAChD,CACF,CACF,CACF,CAKA,OAFA,EAAW,EAEJ,EACT,CAMA,OAAO,iBAAwB,CAC7B,EAAW,CACb,CACF"}
1
+ {"version":3,"file":"settings-service.api.cjs","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport type {\n MCPConfigPatch,\n MCPServer,\n MCPServerPatch,\n} from \"@openhands/typescript-client\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport { stringRecord } from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n \"enabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`, `enabled_skills`) are replaced wholesale rather than\n * merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\n/**\n * Convert SDK `auth` credentials to the cloud's header-only storage shape.\n *\n * The cloud settings endpoint applies `mcp_config` as a merge patch, so a\n * credential change must also tombstone the headers the previous credential\n * produced — otherwise stale secrets survive a strategy switch (e.g. an\n * api_key's custom header after moving to bearer). Stored headers that the\n * new credential still produces (via the patch's carried `headers` or the\n * converted auth) are left untouched; any other stored header is cleared.\n */\nconst cloudCompatibleMcpConfig = async (value: unknown): Promise<unknown> => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const needsStoredCredential =\n Object.values(serverMap).some(\n (server) =>\n isRecord(server) && isRecord(server.auth) && server.auth !== null,\n ) && getActiveBackend().backend.kind === \"cloud\";\n\n const storedHeadersByServer = new Map<string, Record<string, string>>();\n if (needsStoredCredential) {\n try {\n const stored = await fetchCloudSettings();\n const storedMcp = isRecord(stored.mcp_config) ? stored.mcp_config : {};\n for (const [name, server] of Object.entries(storedMcp)) {\n if (isRecord(server)) {\n const headers = stringRecord(\n (server as Record<string, unknown>).headers,\n );\n if (headers) storedHeadersByServer.set(name, headers);\n }\n }\n } catch {\n // Fall back to the patch-only conversion; a transient fetch failure\n // must not block saving the user's explicit edits.\n }\n }\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server)) return [name, server];\n if (server.auth === null) {\n const nextServer: Record<string, unknown> = {\n ...server,\n headers: null,\n };\n delete nextServer.auth;\n return [name, nextServer];\n }\n if (!isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders: Record<string, string | null> = {\n ...existingHeaders,\n ...authHeaders,\n };\n\n const storedHeaders = storedHeadersByServer.get(name);\n if (storedHeaders) {\n for (const key of Object.keys(storedHeaders)) {\n if (!(key in mergedHeaders)) mergedHeaders[key] = null;\n }\n }\n\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Apply one name-keyed MCP merge patch in exactly one request. The server\n * owns the stored catalog and secret preservation; Canvas never rebuilds\n * the catalog from redacted display settings.\n */\n static async patchMcpConfig(patch: MCPConfigPatch): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n const mcpConfig = await cloudCompatibleMcpConfig(patch);\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: mcpConfig as SettingsValue },\n }),\n );\n } else {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: patch },\n }),\n );\n }\n clearCache();\n return true;\n }\n\n static async patchMcpServer(\n settingsKey: string,\n patch: MCPServerPatch,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: patch });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).patchMcpServer(\n settingsKey,\n patch,\n ),\n );\n clearCache();\n return true;\n }\n\n static async createMcpServer(\n settingsKey: string,\n server: MCPServer,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: server });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).createMcpServer(\n settingsKey,\n server,\n ),\n );\n clearCache();\n return true;\n }\n\n static async deleteMcpServer(settingsKey: string): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: null });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteMcpServer(\n settingsKey,\n ),\n );\n clearCache();\n return true;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n cloudPayload.agent_settings_diff.mcp_config =\n (await cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n )) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n await withRetry(() => saveCloudSettings(cloudPayload));\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":"ucAwBA,IAAa,EAAwB,CACnC,WACA,6BACA,6BACA,gBACA,iBACA,oBACA,kBACA,gBACF,EAuDM,EAAgD,IAAI,IACxD,CACF,EAEM,EAAwB,GAC5B,EAAyB,IAAI,CAAG,EAQ5B,EACJ,GACiE,CACjE,IAAM,EAA4B,CAAC,EAC7B,EAAgC,CAAC,EACvC,IAAK,GAAM,CAAC,EAAK,KAAU,OAAO,QAAQ,CAAK,EACzC,EAAqB,CAAG,EAC1B,EAAuC,GAAO,EAE9C,EAAK,GAAO,EAGhB,MAAO,CAAE,YAAW,MAAK,CAC3B,EAWM,EAAgB,GAAgB,KAAK,MAAM,KAAK,UAAU,CAAK,CAAC,EAEhE,GACJ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EAAQ,oBAEV,MAAO,GAET,MAAM,MACJ,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,eAChD,CACF,CACF,CACF,CAKA,OAFA,EAAW,EAEJ,EACT,CAMA,OAAO,iBAAwB,CAC7B,EAAW,CACb,CACF"}
@@ -6,7 +6,7 @@ import { Settings, SettingsSchema, SettingsValue } from "#/types/settings";
6
6
  * partial of Settings so the rest of the frontend can keep treating them as
7
7
  * top-level keys (`settings.language`, `settings.disabled_skills`, …).
8
8
  */
9
- export declare const APP_PREFERENCE_FIELDS: readonly ["language", "user_consents_to_analytics", "enable_sound_notifications", "git_user_name", "git_user_email", "title_llm_profile", "disabled_skills"];
9
+ export declare const APP_PREFERENCE_FIELDS: readonly ["language", "user_consents_to_analytics", "enable_sound_notifications", "git_user_name", "git_user_email", "title_llm_profile", "disabled_skills", "enabled_skills"];
10
10
  export type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];
11
11
  export type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;
12
12
  /**
@@ -43,7 +43,8 @@ export interface SettingsApiResponse {
43
43
  * `conversation_settings_diff`. A partial diff like
44
44
  * `{ app_preferences: { language: "fr" } }` updates only `language` and
45
45
  * leaves every other `app_preferences` field alone. Lists
46
- * (`disabled_skills`) are replaced wholesale rather than merged.
46
+ * (`disabled_skills`, `enabled_skills`) are replaced wholesale rather than
47
+ * merged.
47
48
  */
48
49
  export interface SettingsUpdateRequest {
49
50
  agent_settings_diff?: Record<string, SettingsValue>;
@@ -13,7 +13,8 @@ var l = [
13
13
  "git_user_name",
14
14
  "git_user_email",
15
15
  "title_llm_profile",
16
- "disabled_skills"
16
+ "disabled_skills",
17
+ "enabled_skills"
17
18
  ], u = new Set(l), d = (e) => u.has(e), f = (e) => {
18
19
  let t = {}, n = {};
19
20
  for (let [r, i] of Object.entries(e)) d(r) ? t[r] = i : n[r] = i;
@@ -1 +1 @@
1
- {"version":3,"file":"settings-service.api.js","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport type {\n MCPConfigPatch,\n MCPServer,\n MCPServerPatch,\n} from \"@openhands/typescript-client\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport { stringRecord } from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`) are replaced wholesale rather than merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\n/**\n * Convert SDK `auth` credentials to the cloud's header-only storage shape.\n *\n * The cloud settings endpoint applies `mcp_config` as a merge patch, so a\n * credential change must also tombstone the headers the previous credential\n * produced — otherwise stale secrets survive a strategy switch (e.g. an\n * api_key's custom header after moving to bearer). Stored headers that the\n * new credential still produces (via the patch's carried `headers` or the\n * converted auth) are left untouched; any other stored header is cleared.\n */\nconst cloudCompatibleMcpConfig = async (value: unknown): Promise<unknown> => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const needsStoredCredential =\n Object.values(serverMap).some(\n (server) =>\n isRecord(server) && isRecord(server.auth) && server.auth !== null,\n ) && getActiveBackend().backend.kind === \"cloud\";\n\n const storedHeadersByServer = new Map<string, Record<string, string>>();\n if (needsStoredCredential) {\n try {\n const stored = await fetchCloudSettings();\n const storedMcp = isRecord(stored.mcp_config) ? stored.mcp_config : {};\n for (const [name, server] of Object.entries(storedMcp)) {\n if (isRecord(server)) {\n const headers = stringRecord(\n (server as Record<string, unknown>).headers,\n );\n if (headers) storedHeadersByServer.set(name, headers);\n }\n }\n } catch {\n // Fall back to the patch-only conversion; a transient fetch failure\n // must not block saving the user's explicit edits.\n }\n }\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server)) return [name, server];\n if (server.auth === null) {\n const nextServer: Record<string, unknown> = {\n ...server,\n headers: null,\n };\n delete nextServer.auth;\n return [name, nextServer];\n }\n if (!isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders: Record<string, string | null> = {\n ...existingHeaders,\n ...authHeaders,\n };\n\n const storedHeaders = storedHeadersByServer.get(name);\n if (storedHeaders) {\n for (const key of Object.keys(storedHeaders)) {\n if (!(key in mergedHeaders)) mergedHeaders[key] = null;\n }\n }\n\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Apply one name-keyed MCP merge patch in exactly one request. The server\n * owns the stored catalog and secret preservation; Canvas never rebuilds\n * the catalog from redacted display settings.\n */\n static async patchMcpConfig(patch: MCPConfigPatch): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n const mcpConfig = await cloudCompatibleMcpConfig(patch);\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: mcpConfig as SettingsValue },\n }),\n );\n } else {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: patch },\n }),\n );\n }\n clearCache();\n return true;\n }\n\n static async patchMcpServer(\n settingsKey: string,\n patch: MCPServerPatch,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: patch });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).patchMcpServer(\n settingsKey,\n patch,\n ),\n );\n clearCache();\n return true;\n }\n\n static async createMcpServer(\n settingsKey: string,\n server: MCPServer,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: server });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).createMcpServer(\n settingsKey,\n server,\n ),\n );\n clearCache();\n return true;\n }\n\n static async deleteMcpServer(settingsKey: string): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: null });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteMcpServer(\n settingsKey,\n ),\n );\n clearCache();\n return true;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n cloudPayload.agent_settings_diff.mcp_config =\n (await cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n )) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n await withRetry(() => saveCloudSettings(cloudPayload));\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAsDM,IAAgD,IAAI,IACxD,CACF,GAEM,KAAwB,MAC5B,EAAyB,IAAI,CAAG,GAQ5B,KACJ,MACiE;CACjE,IAAM,IAA4B,CAAC,GAC7B,IAAgC,CAAC;CACvC,KAAK,IAAM,CAAC,GAA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,qBAEV,OAAO;GAET,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,eAChD,CACF,CACF;EACF;EAKA,OAFA,EAAW,GAEJ;CACT;CAMA,OAAO,kBAAwB;EAC7B,EAAW;CACb;AACF"}
1
+ {"version":3,"file":"settings-service.api.js","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport type {\n MCPConfigPatch,\n MCPServer,\n MCPServerPatch,\n} from \"@openhands/typescript-client\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport { stringRecord } from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n \"enabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`, `enabled_skills`) are replaced wholesale rather than\n * merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\n/**\n * Convert SDK `auth` credentials to the cloud's header-only storage shape.\n *\n * The cloud settings endpoint applies `mcp_config` as a merge patch, so a\n * credential change must also tombstone the headers the previous credential\n * produced — otherwise stale secrets survive a strategy switch (e.g. an\n * api_key's custom header after moving to bearer). Stored headers that the\n * new credential still produces (via the patch's carried `headers` or the\n * converted auth) are left untouched; any other stored header is cleared.\n */\nconst cloudCompatibleMcpConfig = async (value: unknown): Promise<unknown> => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const needsStoredCredential =\n Object.values(serverMap).some(\n (server) =>\n isRecord(server) && isRecord(server.auth) && server.auth !== null,\n ) && getActiveBackend().backend.kind === \"cloud\";\n\n const storedHeadersByServer = new Map<string, Record<string, string>>();\n if (needsStoredCredential) {\n try {\n const stored = await fetchCloudSettings();\n const storedMcp = isRecord(stored.mcp_config) ? stored.mcp_config : {};\n for (const [name, server] of Object.entries(storedMcp)) {\n if (isRecord(server)) {\n const headers = stringRecord(\n (server as Record<string, unknown>).headers,\n );\n if (headers) storedHeadersByServer.set(name, headers);\n }\n }\n } catch {\n // Fall back to the patch-only conversion; a transient fetch failure\n // must not block saving the user's explicit edits.\n }\n }\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server)) return [name, server];\n if (server.auth === null) {\n const nextServer: Record<string, unknown> = {\n ...server,\n headers: null,\n };\n delete nextServer.auth;\n return [name, nextServer];\n }\n if (!isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders: Record<string, string | null> = {\n ...existingHeaders,\n ...authHeaders,\n };\n\n const storedHeaders = storedHeadersByServer.get(name);\n if (storedHeaders) {\n for (const key of Object.keys(storedHeaders)) {\n if (!(key in mergedHeaders)) mergedHeaders[key] = null;\n }\n }\n\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Apply one name-keyed MCP merge patch in exactly one request. The server\n * owns the stored catalog and secret preservation; Canvas never rebuilds\n * the catalog from redacted display settings.\n */\n static async patchMcpConfig(patch: MCPConfigPatch): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n const mcpConfig = await cloudCompatibleMcpConfig(patch);\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: mcpConfig as SettingsValue },\n }),\n );\n } else {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: patch },\n }),\n );\n }\n clearCache();\n return true;\n }\n\n static async patchMcpServer(\n settingsKey: string,\n patch: MCPServerPatch,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: patch });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).patchMcpServer(\n settingsKey,\n patch,\n ),\n );\n clearCache();\n return true;\n }\n\n static async createMcpServer(\n settingsKey: string,\n server: MCPServer,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: server });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).createMcpServer(\n settingsKey,\n server,\n ),\n );\n clearCache();\n return true;\n }\n\n static async deleteMcpServer(settingsKey: string): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: null });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteMcpServer(\n settingsKey,\n ),\n );\n clearCache();\n return true;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n cloudPayload.agent_settings_diff.mcp_config =\n (await cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n )) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n await withRetry(() => saveCloudSettings(cloudPayload));\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":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AAgB,EAAa,wBAC/B,EAAa,oBAAoB,aAC9B,MAAM,EACL,EAAa,oBAAoB,UACnC,KAGF,EAAQ,+BACV,EAAa,6BACX,EAAQ,6BAER,MAIF,EAAa,kBAAkB,IAEjC,MAAM,QAAgB,EAAkB,CAAY,CAAC;EACvD,OAAO;GAOL,IAAI,EAHA,EAAQ,uBACR,EAAQ,8BACR,EAAQ,qBAEV,OAAO;GAET,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,eAChD,CACF,CACF;EACF;EAKA,OAFA,EAAW,GAEJ;CACT;CAMA,OAAO,kBAAwB;EAC7B,EAAW;CACb;AACF"}
@@ -1,2 +1,2 @@
1
- require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("./get-skill-ready-content.cjs");var t=e=>typeof e==`object`&&!!e&&`_isSkillReadyEvent`in e&&e._isSkillReadyEvent===!0,n=t=>{let n=t.activated_skills||t.activated_microagents||[],r=t.extended_content||[];if(n.length===0&&r.length===0)throw Error(`Cannot create skill ready event without activated skills or extended content`);let i=e.getSkillReadyContent(n,r),a=e.getSkillReadyItems(n,r);return{id:`${t.id}-skill-ready`,timestamp:t.timestamp,source:`agent`,_isSkillReadyEvent:!0,_skillReadyContent:i,_skillReadyItems:a}};exports.createSkillReadyEvent=n,exports.isSkillReadyEvent=t;
1
+ require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("./get-skill-ready-content.cjs");var t=e=>typeof e==`object`&&!!e&&`_isSkillReadyEvent`in e&&e._isSkillReadyEvent===!0,n=t=>{let n=t.activated_skills||[],r=t.extended_content||[];if(n.length===0&&r.length===0)throw Error(`Cannot create skill ready event without activated skills or extended content`);let i=e.getSkillReadyContent(n,r),a=e.getSkillReadyItems(n,r);return{id:`${t.id}-skill-ready`,timestamp:t.timestamp,source:`agent`,_isSkillReadyEvent:!0,_skillReadyContent:i,_skillReadyItems:a}};exports.createSkillReadyEvent=n,exports.isSkillReadyEvent=t;
2
2
  //# sourceMappingURL=create-skill-ready-event.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-skill-ready-event.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.ts"],"sourcesContent":["import { MessageEvent } from \"#/types/agent-server/core\";\nimport { BaseEvent } from \"#/types/agent-server/core/base/event\";\nimport {\n getSkillReadyContent,\n getSkillReadyItems,\n SkillReadyItem,\n} from \"./get-skill-ready-content\";\n\nexport type { SkillReadyItem };\n\n/**\n * Synthetic event type for Skill Ready events.\n * This extends BaseEvent and includes a marker to identify it as a skill ready event.\n */\nexport interface SkillReadyEvent extends BaseEvent {\n _isSkillReadyEvent: true;\n _skillReadyContent: string;\n _skillReadyItems: SkillReadyItem[];\n}\n\n/**\n * Type guard for Skill Ready events.\n */\nexport const isSkillReadyEvent = (event: unknown): event is SkillReadyEvent =>\n typeof event === \"object\" &&\n event !== null &&\n \"_isSkillReadyEvent\" in event &&\n event._isSkillReadyEvent === true;\n\n/**\n * Creates a synthetic \"Skill Ready\" event from a user MessageEvent.\n * This event appears as originating from the agent and contains formatted\n * information about activated skills and extended content.\n */\nexport const createSkillReadyEvent = (\n userEvent: MessageEvent,\n): SkillReadyEvent => {\n // Support both activated_skills and activated_microagents field names\n const activatedSkills =\n (userEvent as unknown as { activated_skills?: string[] })\n .activated_skills ||\n userEvent.activated_microagents ||\n [];\n\n const extendedContent = userEvent.extended_content || [];\n\n // Only create event if we have skills or extended content\n if (activatedSkills.length === 0 && extendedContent.length === 0) {\n throw new Error(\n \"Cannot create skill ready event without activated skills or extended content\",\n );\n }\n\n const content = getSkillReadyContent(activatedSkills, extendedContent);\n const items = getSkillReadyItems(activatedSkills, extendedContent);\n\n return {\n id: `${userEvent.id}-skill-ready`,\n timestamp: userEvent.timestamp,\n source: \"agent\",\n _isSkillReadyEvent: true,\n _skillReadyContent: content,\n _skillReadyItems: items,\n };\n};\n"],"mappings":"uGAuBA,IAAa,EAAqB,GAChC,OAAO,GAAU,YACjB,GACA,uBAAwB,GACxB,EAAM,qBAAuB,GAOlB,EACX,GACoB,CAEpB,IAAM,EACH,EACE,kBACH,EAAU,uBACV,CAAC,EAEG,EAAkB,EAAU,kBAAoB,CAAC,EAGvD,GAAI,EAAgB,SAAW,GAAK,EAAgB,SAAW,EAC7D,MAAU,MACR,8EACF,EAGF,IAAM,EAAU,EAAA,qBAAqB,EAAiB,CAAe,EAC/D,EAAQ,EAAA,mBAAmB,EAAiB,CAAe,EAEjE,MAAO,CACL,GAAI,GAAG,EAAU,GAAG,cACpB,UAAW,EAAU,UACrB,OAAQ,QACR,mBAAoB,GACpB,mBAAoB,EACpB,iBAAkB,CACpB,CACF"}
1
+ {"version":3,"file":"create-skill-ready-event.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.ts"],"sourcesContent":["import { MessageEvent } from \"#/types/agent-server/core\";\nimport { BaseEvent } from \"#/types/agent-server/core/base/event\";\nimport {\n getSkillReadyContent,\n getSkillReadyItems,\n SkillReadyItem,\n} from \"./get-skill-ready-content\";\n\nexport type { SkillReadyItem };\n\n/**\n * Synthetic event type for Skill Ready events.\n * This extends BaseEvent and includes a marker to identify it as a skill ready event.\n */\nexport interface SkillReadyEvent extends BaseEvent {\n _isSkillReadyEvent: true;\n _skillReadyContent: string;\n _skillReadyItems: SkillReadyItem[];\n}\n\n/**\n * Type guard for Skill Ready events.\n */\nexport const isSkillReadyEvent = (event: unknown): event is SkillReadyEvent =>\n typeof event === \"object\" &&\n event !== null &&\n \"_isSkillReadyEvent\" in event &&\n event._isSkillReadyEvent === true;\n\n/**\n * Creates a synthetic \"Skill Ready\" event from a user MessageEvent.\n * This event appears as originating from the agent and contains formatted\n * information about activated skills and extended content.\n */\nexport const createSkillReadyEvent = (\n userEvent: MessageEvent,\n): SkillReadyEvent => {\n const activatedSkills = userEvent.activated_skills || [];\n\n const extendedContent = userEvent.extended_content || [];\n\n // Only create event if we have skills or extended content\n if (activatedSkills.length === 0 && extendedContent.length === 0) {\n throw new Error(\n \"Cannot create skill ready event without activated skills or extended content\",\n );\n }\n\n const content = getSkillReadyContent(activatedSkills, extendedContent);\n const items = getSkillReadyItems(activatedSkills, extendedContent);\n\n return {\n id: `${userEvent.id}-skill-ready`,\n timestamp: userEvent.timestamp,\n source: \"agent\",\n _isSkillReadyEvent: true,\n _skillReadyContent: content,\n _skillReadyItems: items,\n };\n};\n"],"mappings":"uGAuBA,IAAa,EAAqB,GAChC,OAAO,GAAU,YACjB,GACA,uBAAwB,GACxB,EAAM,qBAAuB,GAOlB,EACX,GACoB,CACpB,IAAM,EAAkB,EAAU,kBAAoB,CAAC,EAEjD,EAAkB,EAAU,kBAAoB,CAAC,EAGvD,GAAI,EAAgB,SAAW,GAAK,EAAgB,SAAW,EAC7D,MAAU,MACR,8EACF,EAGF,IAAM,EAAU,EAAA,qBAAqB,EAAiB,CAAe,EAC/D,EAAQ,EAAA,mBAAmB,EAAiB,CAAe,EAEjE,MAAO,CACL,GAAI,GAAG,EAAU,GAAG,cACpB,UAAW,EAAU,UACrB,OAAQ,QACR,mBAAoB,GACpB,mBAAoB,EACpB,iBAAkB,CACpB,CACF"}
@@ -1,7 +1,7 @@
1
1
  import { getSkillReadyContent as e, getSkillReadyItems as t } from "./get-skill-ready-content.js";
2
2
  //#region src/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.ts
3
3
  var n = (e) => typeof e == "object" && !!e && "_isSkillReadyEvent" in e && e._isSkillReadyEvent === !0, r = (n) => {
4
- let r = n.activated_skills || n.activated_microagents || [], i = n.extended_content || [];
4
+ let r = n.activated_skills || [], i = n.extended_content || [];
5
5
  if (r.length === 0 && i.length === 0) throw Error("Cannot create skill ready event without activated skills or extended content");
6
6
  let a = e(r, i), o = t(r, i);
7
7
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"create-skill-ready-event.js","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.ts"],"sourcesContent":["import { MessageEvent } from \"#/types/agent-server/core\";\nimport { BaseEvent } from \"#/types/agent-server/core/base/event\";\nimport {\n getSkillReadyContent,\n getSkillReadyItems,\n SkillReadyItem,\n} from \"./get-skill-ready-content\";\n\nexport type { SkillReadyItem };\n\n/**\n * Synthetic event type for Skill Ready events.\n * This extends BaseEvent and includes a marker to identify it as a skill ready event.\n */\nexport interface SkillReadyEvent extends BaseEvent {\n _isSkillReadyEvent: true;\n _skillReadyContent: string;\n _skillReadyItems: SkillReadyItem[];\n}\n\n/**\n * Type guard for Skill Ready events.\n */\nexport const isSkillReadyEvent = (event: unknown): event is SkillReadyEvent =>\n typeof event === \"object\" &&\n event !== null &&\n \"_isSkillReadyEvent\" in event &&\n event._isSkillReadyEvent === true;\n\n/**\n * Creates a synthetic \"Skill Ready\" event from a user MessageEvent.\n * This event appears as originating from the agent and contains formatted\n * information about activated skills and extended content.\n */\nexport const createSkillReadyEvent = (\n userEvent: MessageEvent,\n): SkillReadyEvent => {\n // Support both activated_skills and activated_microagents field names\n const activatedSkills =\n (userEvent as unknown as { activated_skills?: string[] })\n .activated_skills ||\n userEvent.activated_microagents ||\n [];\n\n const extendedContent = userEvent.extended_content || [];\n\n // Only create event if we have skills or extended content\n if (activatedSkills.length === 0 && extendedContent.length === 0) {\n throw new Error(\n \"Cannot create skill ready event without activated skills or extended content\",\n );\n }\n\n const content = getSkillReadyContent(activatedSkills, extendedContent);\n const items = getSkillReadyItems(activatedSkills, extendedContent);\n\n return {\n id: `${userEvent.id}-skill-ready`,\n timestamp: userEvent.timestamp,\n source: \"agent\",\n _isSkillReadyEvent: true,\n _skillReadyContent: content,\n _skillReadyItems: items,\n };\n};\n"],"mappings":";;AAuBA,IAAa,KAAqB,MAChC,OAAO,KAAU,cACjB,KACA,wBAAwB,KACxB,EAAM,uBAAuB,IAOlB,KACX,MACoB;CAEpB,IAAM,IACH,EACE,oBACH,EAAU,yBACV,CAAC,GAEG,IAAkB,EAAU,oBAAoB,CAAC;CAGvD,IAAI,EAAgB,WAAW,KAAK,EAAgB,WAAW,GAC7D,MAAU,MACR,8EACF;CAGF,IAAM,IAAU,EAAqB,GAAiB,CAAe,GAC/D,IAAQ,EAAmB,GAAiB,CAAe;CAEjE,OAAO;EACL,IAAI,GAAG,EAAU,GAAG;EACpB,WAAW,EAAU;EACrB,QAAQ;EACR,oBAAoB;EACpB,oBAAoB;EACpB,kBAAkB;CACpB;AACF"}
1
+ {"version":3,"file":"create-skill-ready-event.js","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.ts"],"sourcesContent":["import { MessageEvent } from \"#/types/agent-server/core\";\nimport { BaseEvent } from \"#/types/agent-server/core/base/event\";\nimport {\n getSkillReadyContent,\n getSkillReadyItems,\n SkillReadyItem,\n} from \"./get-skill-ready-content\";\n\nexport type { SkillReadyItem };\n\n/**\n * Synthetic event type for Skill Ready events.\n * This extends BaseEvent and includes a marker to identify it as a skill ready event.\n */\nexport interface SkillReadyEvent extends BaseEvent {\n _isSkillReadyEvent: true;\n _skillReadyContent: string;\n _skillReadyItems: SkillReadyItem[];\n}\n\n/**\n * Type guard for Skill Ready events.\n */\nexport const isSkillReadyEvent = (event: unknown): event is SkillReadyEvent =>\n typeof event === \"object\" &&\n event !== null &&\n \"_isSkillReadyEvent\" in event &&\n event._isSkillReadyEvent === true;\n\n/**\n * Creates a synthetic \"Skill Ready\" event from a user MessageEvent.\n * This event appears as originating from the agent and contains formatted\n * information about activated skills and extended content.\n */\nexport const createSkillReadyEvent = (\n userEvent: MessageEvent,\n): SkillReadyEvent => {\n const activatedSkills = userEvent.activated_skills || [];\n\n const extendedContent = userEvent.extended_content || [];\n\n // Only create event if we have skills or extended content\n if (activatedSkills.length === 0 && extendedContent.length === 0) {\n throw new Error(\n \"Cannot create skill ready event without activated skills or extended content\",\n );\n }\n\n const content = getSkillReadyContent(activatedSkills, extendedContent);\n const items = getSkillReadyItems(activatedSkills, extendedContent);\n\n return {\n id: `${userEvent.id}-skill-ready`,\n timestamp: userEvent.timestamp,\n source: \"agent\",\n _isSkillReadyEvent: true,\n _skillReadyContent: content,\n _skillReadyItems: items,\n };\n};\n"],"mappings":";;AAuBA,IAAa,KAAqB,MAChC,OAAO,KAAU,cACjB,KACA,wBAAwB,KACxB,EAAM,uBAAuB,IAOlB,KACX,MACoB;CACpB,IAAM,IAAkB,EAAU,oBAAoB,CAAC,GAEjD,IAAkB,EAAU,oBAAoB,CAAC;CAGvD,IAAI,EAAgB,WAAW,KAAK,EAAgB,WAAW,GAC7D,MAAU,MACR,8EACF;CAGF,IAAM,IAAU,EAAqB,GAAiB,CAAe,GAC/D,IAAQ,EAAmB,GAAiB,CAAe;CAEjE,OAAO;EACL,IAAI,GAAG,EAAU,GAAG;EACpB,WAAW,EAAU;EACrB,QAAQ;EACR,oBAAoB;EACpB,oBAAoB;EACpB,kBAAkB;CACpB;AACF"}
@@ -1,2 +1,2 @@
1
- const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../node_modules/lucide-react/dist/esm/icons/loader-circle.cjs"),i=require("../../../../types/agent-server/type-guards.cjs"),a=require("../../../../icons/angle-down-solid.cjs"),o=require("../../../../icons/angle-up-solid.cjs"),s=require("../event-content-helpers/get-event-content.cjs"),c=require("../../../features/chat/is-in-event-group-context.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("react/jsx-runtime");function d({events:e,allEvents:d,isFinalized:f=!1,children:p}){let{t:m}=t.useTranslation(`openhands`),[h,g]=l.default.useState(!1),_=l.default.useId(),v=`${_}-toggle`;if(e.length===0)return null;let y=e.find(e=>i.isActionEvent(e)),b=e.filter(i.isObservationEvent).length,x=e.length,S=!!y,C=e[e.length-1],w=null;C&&(i.isActionEvent(C)?w=s.getEventContent(C).title:i.isObservationEvent(C)&&(w=s.getEventContent(C,(d??e).find(e=>i.isActionEvent(e)&&e.id===C.action_id)).title));let T=S?m(n.I18nKey.EVENT_GROUP$ACTIONS_PROGRESS,{completed:b,total:x}):m(n.I18nKey.EVENT_GROUP$ACTIONS_COMPLETED,{count:x}),E=h?o.default:a.default;return(0,u.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`event-group`,children:[(0,u.jsx)(`button`,{id:v,type:`button`,onClick:()=>g(e=>!e),"aria-controls":_,"aria-expanded":h,"aria-label":m(h?n.I18nKey.EVENT_GROUP$COLLAPSE:n.I18nKey.EVENT_GROUP$EXPAND),"data-testid":`event-group-toggle`,className:`w-full flex items-center justify-between gap-2 text-left cursor-pointer`,children:f?(0,u.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,u.jsx)(E,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,u.jsx)(`span`,{className:`truncate`,children:T})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,u.jsx)(E,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,u.jsx)(`span`,{className:`truncate`,children:w??T})]}),(0,u.jsxs)(`span`,{className:`flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]`,children:[(0,u.jsx)(`span`,{className:`truncate`,children:T}),S?(0,u.jsx)(r.LoaderCircle,{"data-testid":`spinner-icon`,className:`h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]`}):null]})]})}),h&&(0,u.jsx)(`div`,{id:_,role:`region`,"aria-labelledby":v,className:`mt-1.5 flex flex-col`,"data-testid":`event-group-content`,children:(0,u.jsx)(c.IsInEventGroupContext.Provider,{value:!0,children:p})})]})}exports.EventGroup=d;
1
+ const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../node_modules/lucide-react/dist/esm/icons/loader-circle.cjs"),i=require("../../../../types/agent-server/type-guards.cjs"),a=require("../../../../icons/angle-down-solid.cjs"),o=require("../../../../icons/angle-up-solid.cjs"),s=require("../../../features/chat/path-component.cjs"),c=require("../event-content-helpers/get-event-content.cjs"),l=require("../../../features/chat/is-in-event-group-context.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime");function f({events:e,allEvents:f,isFinalized:p=!1,children:m}){let{t:h}=t.useTranslation(`openhands`),[g,_]=u.default.useState(!1),v=u.default.useId(),y=`${v}-toggle`;if(e.length===0)return null;let b=e.find(e=>i.isActionEvent(e)),x=e.filter(i.isObservationEvent).length,S=e.length,C=!!b,w=e[e.length-1],T=null;w&&(i.isActionEvent(w)?T=c.getEventContent(w).title:i.isObservationEvent(w)&&(T=c.getEventContent(w,(f??e).find(e=>i.isActionEvent(e)&&e.id===w.action_id)).title));let E=C?h(n.I18nKey.EVENT_GROUP$ACTIONS_PROGRESS,{completed:x,total:S}):h(n.I18nKey.EVENT_GROUP$ACTIONS_COMPLETED,{count:S}),D=g?o.default:a.default;return(0,d.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`event-group`,children:[(0,d.jsx)(`button`,{id:y,type:`button`,onClick:()=>_(e=>!e),"aria-controls":v,"aria-expanded":g,"aria-label":h(g?n.I18nKey.EVENT_GROUP$COLLAPSE:n.I18nKey.EVENT_GROUP$EXPAND),"data-testid":`event-group-toggle`,className:`w-full flex items-center justify-between gap-2 text-left cursor-pointer`,children:p?(0,d.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,d.jsx)(D,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,d.jsx)(`span`,{className:`truncate`,children:E})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,d.jsx)(D,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,d.jsx)(`span`,{className:`truncate`,children:(0,d.jsx)(s.PathInteractiveContext.Provider,{value:!1,children:T??E})})]}),(0,d.jsxs)(`span`,{className:`flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]`,children:[(0,d.jsx)(`span`,{className:`truncate`,children:E}),C?(0,d.jsx)(r.LoaderCircle,{"data-testid":`spinner-icon`,className:`h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]`}):null]})]})}),g&&(0,d.jsx)(`div`,{id:v,role:`region`,"aria-labelledby":y,className:`mt-1.5 flex flex-col`,"data-testid":`event-group-content`,children:(0,d.jsx)(l.IsInEventGroupContext.Provider,{value:!0,children:m})})]})}exports.EventGroup=f;
2
2
  //# sourceMappingURL=event-group.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-group.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-message-components/event-group.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { LoaderCircle } from \"lucide-react\";\nimport ArrowDown from \"#/icons/angle-down-solid.svg?react\";\nimport ArrowUp from \"#/icons/angle-up-solid.svg?react\";\nimport { OpenHandsEvent, ActionEvent } from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getEventContent } from \"../event-content-helpers/get-event-content\";\nimport { IsInEventGroupContext } from \"../../../features/chat/is-in-event-group-context\";\n\ninterface EventGroupProps {\n /** The events represented by this group. Used to compute the summary. */\n events: OpenHandsEvent[];\n /**\n * Full event history. Used to resolve the action that produced the latest\n * observation in the group so the summary title matches what the individual\n * card would show (e.g. \"Editing path/to/file\"). Falls back to `events` when\n * omitted.\n */\n allEvents?: OpenHandsEvent[];\n /**\n * `true` once an event outside this group has been emitted after it, so the\n * group is no longer the \"live\" tail of the chat. While `false` (the\n * default), the group keeps showing the most recent action's title as its\n * prominent summary, with the count of completed actions shown subtly on\n * the right.\n */\n isFinalized?: boolean;\n /** The fully-rendered event messages to show when the group is expanded. */\n children: React.ReactNode;\n}\n\n/**\n * Collapsible container that wraps a run of consecutive agent action/observation\n * events into a single summary card.\n *\n * Collapsed, while the group is still the live tail of the chat\n * (`isFinalized=false`):\n * - Left (prominent): the title of the most recent action/observation in\n * the group — i.e. either the action currently in flight, or the latest\n * completed step.\n * - Right (subdued): \"{completed}/{total} actions completed\" while at\n * least one action is still pending (with a spinner), otherwise\n * \"{count} actions completed\" followed by a success check.\n *\n * Collapsed, after the group has been \"moved past\" (`isFinalized=true`):\n * - \"{count} actions completed\" is promoted to the prominent foreground\n * style and the count is the only thing shown next to the chevron.\n *\n * Expanded:\n * - Renders the children verbatim, so each individual action/observation can\n * still be expanded the way it was before grouping.\n */\nexport function EventGroup({\n events,\n allEvents,\n isFinalized = false,\n children,\n}: EventGroupProps) {\n const { t } = useTranslation(\"openhands\");\n const [expanded, setExpanded] = React.useState(false);\n const contentId = React.useId();\n const buttonId = `${contentId}-toggle`;\n\n if (events.length === 0) {\n return null;\n }\n\n // Each ObservationEvent in the group is a completed action. An ActionEvent\n // that's still here (i.e. not yet replaced by its observation in the UI\n // events array) is an action currently in flight.\n const pendingAction = events.find((e): e is ActionEvent => isActionEvent(e));\n const completedCount = events.filter(isObservationEvent).length;\n const totalCount = events.length;\n const isRunning = !!pendingAction;\n\n // Title of the most recent groupable event. While running this is the\n // pending action; otherwise it's the latest observation, with its\n // originating action looked up so the title can be the action-style summary\n // (\"Editing path/to/file\") instead of the observation default.\n const latestEvent = events[events.length - 1];\n let latestTitle: React.ReactNode = null;\n if (latestEvent) {\n if (isActionEvent(latestEvent)) {\n latestTitle = getEventContent(latestEvent).title;\n } else if (isObservationEvent(latestEvent)) {\n const lookupSource = allEvents ?? events;\n const correspondingAction = lookupSource.find(\n (e): e is ActionEvent =>\n isActionEvent(e) && e.id === latestEvent.action_id,\n );\n latestTitle = getEventContent(latestEvent, correspondingAction).title;\n }\n }\n\n const countSummary = isRunning\n ? t(I18nKey.EVENT_GROUP$ACTIONS_PROGRESS, {\n completed: completedCount,\n total: totalCount,\n })\n : t(I18nKey.EVENT_GROUP$ACTIONS_COMPLETED, { count: totalCount });\n\n const Chevron = expanded ? ArrowUp : ArrowDown;\n\n return (\n <div className=\"my-1 w-full py-1 text-sm\" data-testid=\"event-group\">\n <button\n id={buttonId}\n type=\"button\"\n onClick={() => setExpanded((prev) => !prev)}\n aria-controls={contentId}\n aria-expanded={expanded}\n aria-label={\n expanded\n ? t(I18nKey.EVENT_GROUP$COLLAPSE)\n : t(I18nKey.EVENT_GROUP$EXPAND)\n }\n data-testid=\"event-group-toggle\"\n className=\"w-full flex items-center justify-between gap-2 text-left cursor-pointer\"\n >\n {isFinalized ? (\n <span className=\"flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]\">\n <Chevron className=\"h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0\" />\n <span className=\"truncate\">{countSummary}</span>\n </span>\n ) : (\n <>\n <span className=\"flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]\">\n <Chevron className=\"h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0\" />\n <span className=\"truncate\">{latestTitle ?? countSummary}</span>\n </span>\n <span className=\"flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]\">\n <span className=\"truncate\">{countSummary}</span>\n {isRunning ? (\n <LoaderCircle\n data-testid=\"spinner-icon\"\n className=\"h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]\"\n />\n ) : null}\n </span>\n </>\n )}\n </button>\n\n {expanded && (\n <div\n id={contentId}\n role=\"region\"\n aria-labelledby={buttonId}\n className=\"mt-1.5 flex flex-col\"\n data-testid=\"event-group-content\"\n >\n <IsInEventGroupContext.Provider value>\n {children}\n </IsInEventGroupContext.Provider>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"0nBAyDA,SAAgB,EAAW,CACzB,SACA,YACA,cAAc,GACd,YACkB,CAClB,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EACl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,EAAA,MAAC,OAAD,CAAM,UAAU,8EAAhB,EACE,EAAA,EAAA,KAAC,EAAD,CAAS,UAAU,8CAAgD,CAAA,GACnE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBAAY,GAAe,CAAmB,CAAA,CAC1D,KACN,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,8EAAhB,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBAAY,CAAmB,CAAA,EAC9C,GACC,EAAA,EAAA,KAAC,EAAA,aAAD,CACE,cAAY,eACZ,UAAU,yDACX,CAAA,EACC,IACA,GACN,CAAA,CAAA,CAEE,CAAA,EAEP,IACC,EAAA,EAAA,KAAC,MAAD,CACE,GAAI,EACJ,KAAK,SACL,kBAAiB,EACjB,UAAU,uBACV,cAAY,gCAEZ,EAAA,EAAA,KAAC,EAAA,sBAAsB,SAAvB,CAAgC,MAAA,GAC7B,UAC6B,CAAA,CAC7B,CAAA,CAEJ,GAET"}
1
+ {"version":3,"file":"event-group.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-message-components/event-group.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { LoaderCircle } from \"lucide-react\";\nimport ArrowDown from \"#/icons/angle-down-solid.svg?react\";\nimport ArrowUp from \"#/icons/angle-up-solid.svg?react\";\nimport { OpenHandsEvent, ActionEvent } from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getEventContent } from \"../event-content-helpers/get-event-content\";\nimport { IsInEventGroupContext } from \"../../../features/chat/is-in-event-group-context\";\nimport { PathInteractiveContext } from \"../../../features/chat/path-component\";\n\ninterface EventGroupProps {\n /** The events represented by this group. Used to compute the summary. */\n events: OpenHandsEvent[];\n /**\n * Full event history. Used to resolve the action that produced the latest\n * observation in the group so the summary title matches what the individual\n * card would show (e.g. \"Editing path/to/file\"). Falls back to `events` when\n * omitted.\n */\n allEvents?: OpenHandsEvent[];\n /**\n * `true` once an event outside this group has been emitted after it, so the\n * group is no longer the \"live\" tail of the chat. While `false` (the\n * default), the group keeps showing the most recent action's title as its\n * prominent summary, with the count of completed actions shown subtly on\n * the right.\n */\n isFinalized?: boolean;\n /** The fully-rendered event messages to show when the group is expanded. */\n children: React.ReactNode;\n}\n\n/**\n * Collapsible container that wraps a run of consecutive agent action/observation\n * events into a single summary card.\n *\n * Collapsed, while the group is still the live tail of the chat\n * (`isFinalized=false`):\n * - Left (prominent): the title of the most recent action/observation in\n * the group — i.e. either the action currently in flight, or the latest\n * completed step.\n * - Right (subdued): \"{completed}/{total} actions completed\" while at\n * least one action is still pending (with a spinner), otherwise\n * \"{count} actions completed\" followed by a success check.\n *\n * Collapsed, after the group has been \"moved past\" (`isFinalized=true`):\n * - \"{count} actions completed\" is promoted to the prominent foreground\n * style and the count is the only thing shown next to the chevron.\n *\n * Expanded:\n * - Renders the children verbatim, so each individual action/observation can\n * still be expanded the way it was before grouping.\n */\nexport function EventGroup({\n events,\n allEvents,\n isFinalized = false,\n children,\n}: EventGroupProps) {\n const { t } = useTranslation(\"openhands\");\n const [expanded, setExpanded] = React.useState(false);\n const contentId = React.useId();\n const buttonId = `${contentId}-toggle`;\n\n if (events.length === 0) {\n return null;\n }\n\n // Each ObservationEvent in the group is a completed action. An ActionEvent\n // that's still here (i.e. not yet replaced by its observation in the UI\n // events array) is an action currently in flight.\n const pendingAction = events.find((e): e is ActionEvent => isActionEvent(e));\n const completedCount = events.filter(isObservationEvent).length;\n const totalCount = events.length;\n const isRunning = !!pendingAction;\n\n // Title of the most recent groupable event. While running this is the\n // pending action; otherwise it's the latest observation, with its\n // originating action looked up so the title can be the action-style summary\n // (\"Editing path/to/file\") instead of the observation default.\n const latestEvent = events[events.length - 1];\n let latestTitle: React.ReactNode = null;\n if (latestEvent) {\n if (isActionEvent(latestEvent)) {\n latestTitle = getEventContent(latestEvent).title;\n } else if (isObservationEvent(latestEvent)) {\n const lookupSource = allEvents ?? events;\n const correspondingAction = lookupSource.find(\n (e): e is ActionEvent =>\n isActionEvent(e) && e.id === latestEvent.action_id,\n );\n latestTitle = getEventContent(latestEvent, correspondingAction).title;\n }\n }\n\n const countSummary = isRunning\n ? t(I18nKey.EVENT_GROUP$ACTIONS_PROGRESS, {\n completed: completedCount,\n total: totalCount,\n })\n : t(I18nKey.EVENT_GROUP$ACTIONS_COMPLETED, { count: totalCount });\n\n const Chevron = expanded ? ArrowUp : ArrowDown;\n\n return (\n <div className=\"my-1 w-full py-1 text-sm\" data-testid=\"event-group\">\n <button\n id={buttonId}\n type=\"button\"\n onClick={() => setExpanded((prev) => !prev)}\n aria-controls={contentId}\n aria-expanded={expanded}\n aria-label={\n expanded\n ? t(I18nKey.EVENT_GROUP$COLLAPSE)\n : t(I18nKey.EVENT_GROUP$EXPAND)\n }\n data-testid=\"event-group-toggle\"\n className=\"w-full flex items-center justify-between gap-2 text-left cursor-pointer\"\n >\n {isFinalized ? (\n <span className=\"flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]\">\n <Chevron className=\"h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0\" />\n <span className=\"truncate\">{countSummary}</span>\n </span>\n ) : (\n <>\n <span className=\"flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]\">\n <Chevron className=\"h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0\" />\n <span className=\"truncate\">\n <PathInteractiveContext.Provider value={false}>\n {latestTitle ?? countSummary}\n </PathInteractiveContext.Provider>\n </span>\n </span>\n <span className=\"flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]\">\n <span className=\"truncate\">{countSummary}</span>\n {isRunning ? (\n <LoaderCircle\n data-testid=\"spinner-icon\"\n className=\"h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]\"\n />\n ) : null}\n </span>\n </>\n )}\n </button>\n\n {expanded && (\n <div\n id={contentId}\n role=\"region\"\n aria-labelledby={buttonId}\n className=\"mt-1.5 flex flex-col\"\n data-testid=\"event-group-content\"\n >\n <IsInEventGroupContext.Provider value>\n {children}\n </IsInEventGroupContext.Provider>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"irBA0DA,SAAgB,EAAW,CACzB,SACA,YACA,cAAc,GACd,YACkB,CAClB,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAC,EAAU,GAAe,EAAA,QAAM,SAAS,EAAK,EAC9C,EAAY,EAAA,QAAM,MAAM,EACxB,EAAW,GAAG,EAAU,SAE9B,GAAI,EAAO,SAAW,EACpB,OAAO,KAMT,IAAM,EAAgB,EAAO,KAAM,GAAwB,EAAA,cAAc,CAAC,CAAC,EACrE,EAAiB,EAAO,OAAO,EAAA,kBAAkB,EAAE,OACnD,EAAa,EAAO,OACpB,EAAY,CAAC,CAAC,EAMd,EAAc,EAAO,EAAO,OAAS,GACvC,EAA+B,KAC/B,IACE,EAAA,cAAc,CAAW,EAC3B,EAAc,EAAA,gBAAgB,CAAW,EAAE,MAClC,EAAA,mBAAmB,CAAW,IAMvC,EAAc,EAAA,gBAAgB,GALT,GAAa,GACO,KACtC,GACC,EAAA,cAAc,CAAC,GAAK,EAAE,KAAO,EAAY,SAEF,CAAmB,EAAE,QAIpE,IAAM,EAAe,EACjB,EAAE,EAAA,QAAQ,6BAA8B,CACtC,UAAW,EACX,MAAO,CACT,CAAC,EACD,EAAE,EAAA,QAAQ,8BAA+B,CAAE,MAAO,CAAW,CAAC,EAE5D,EAAU,EAAW,EAAA,QAAU,EAAA,QAErC,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,2BAA2B,cAAY,uBAAtD,EACE,EAAA,EAAA,KAAC,SAAD,CACE,GAAI,EACJ,KAAK,SACL,YAAe,EAAa,GAAS,CAAC,CAAI,EAC1C,gBAAe,EACf,gBAAe,EACf,aAEM,EADJ,EACM,EAAA,QAAQ,qBACR,EAAA,QAAQ,kBAAkB,EAElC,cAAY,qBACZ,UAAU,mFAET,GACC,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,8EAAhB,EACE,EAAA,EAAA,KAAC,EAAD,CAAS,UAAU,8CAAgD,CAAA,GACnE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBAAY,CAAmB,CAAA,CAC3C,KAEN,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,8EAAhB,EACE,EAAA,EAAA,KAAC,EAAD,CAAS,UAAU,8CAAgD,CAAA,GACnE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,qBACd,EAAA,EAAA,KAAC,EAAA,uBAAuB,SAAxB,CAAiC,MAAO,YACrC,GAAe,CACe,CAAA,CAC7B,CAAA,CACF,KACN,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,8EAAhB,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,oBAAY,CAAmB,CAAA,EAC9C,GACC,EAAA,EAAA,KAAC,EAAA,aAAD,CACE,cAAY,eACZ,UAAU,yDACX,CAAA,EACC,IACA,GACN,CAAA,CAAA,CAEE,CAAA,EAEP,IACC,EAAA,EAAA,KAAC,MAAD,CACE,GAAI,EACJ,KAAK,SACL,kBAAiB,EACjB,UAAU,uBACV,cAAY,gCAEZ,EAAA,EAAA,KAAC,EAAA,sBAAsB,SAAvB,CAAgC,MAAA,GAC7B,UAC6B,CAAA,CAC7B,CAAA,CAEJ,GAET"}
@@ -4,68 +4,72 @@ import { LoaderCircle as n } from "../../../../node_modules/lucide-react/dist/es
4
4
  import { isActionEvent as r, isObservationEvent as i } from "../../../../types/agent-server/type-guards.js";
5
5
  import a from "../../../../icons/angle-down-solid.js";
6
6
  import o from "../../../../icons/angle-up-solid.js";
7
- import { getEventContent as s } from "../event-content-helpers/get-event-content.js";
8
- import { IsInEventGroupContext as c } from "../../../features/chat/is-in-event-group-context.js";
9
- import l from "react";
10
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { PathInteractiveContext as s } from "../../../features/chat/path-component.js";
8
+ import { getEventContent as c } from "../event-content-helpers/get-event-content.js";
9
+ import { IsInEventGroupContext as l } from "../../../features/chat/is-in-event-group-context.js";
10
+ import u from "react";
11
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
11
12
  //#region src/components/conversation-events/chat/event-message-components/event-group.tsx
12
- function p({ events: p, allEvents: m, isFinalized: h = !1, children: g }) {
13
- let { t: _ } = e("openhands"), [v, y] = l.useState(!1), b = l.useId(), x = `${b}-toggle`;
14
- if (p.length === 0) return null;
15
- let S = p.find((e) => r(e)), C = p.filter(i).length, w = p.length, T = !!S, E = p[p.length - 1], D = null;
16
- E && (r(E) ? D = s(E).title : i(E) && (D = s(E, (m ?? p).find((e) => r(e) && e.id === E.action_id)).title));
17
- let O = T ? _(t.EVENT_GROUP$ACTIONS_PROGRESS, {
18
- completed: C,
19
- total: w
20
- }) : _(t.EVENT_GROUP$ACTIONS_COMPLETED, { count: w }), k = v ? o : a;
21
- return /* @__PURE__ */ f("div", {
13
+ function m({ events: m, allEvents: h, isFinalized: g = !1, children: _ }) {
14
+ let { t: v } = e("openhands"), [y, b] = u.useState(!1), x = u.useId(), S = `${x}-toggle`;
15
+ if (m.length === 0) return null;
16
+ let C = m.find((e) => r(e)), w = m.filter(i).length, T = m.length, E = !!C, D = m[m.length - 1], O = null;
17
+ D && (r(D) ? O = c(D).title : i(D) && (O = c(D, (h ?? m).find((e) => r(e) && e.id === D.action_id)).title));
18
+ let k = E ? v(t.EVENT_GROUP$ACTIONS_PROGRESS, {
19
+ completed: w,
20
+ total: T
21
+ }) : v(t.EVENT_GROUP$ACTIONS_COMPLETED, { count: T }), A = y ? o : a;
22
+ return /* @__PURE__ */ p("div", {
22
23
  className: "my-1 w-full py-1 text-sm",
23
24
  "data-testid": "event-group",
24
- children: [/* @__PURE__ */ d("button", {
25
- id: x,
25
+ children: [/* @__PURE__ */ f("button", {
26
+ id: S,
26
27
  type: "button",
27
- onClick: () => y((e) => !e),
28
- "aria-controls": b,
29
- "aria-expanded": v,
30
- "aria-label": _(v ? t.EVENT_GROUP$COLLAPSE : t.EVENT_GROUP$EXPAND),
28
+ onClick: () => b((e) => !e),
29
+ "aria-controls": x,
30
+ "aria-expanded": y,
31
+ "aria-label": v(y ? t.EVENT_GROUP$COLLAPSE : t.EVENT_GROUP$EXPAND),
31
32
  "data-testid": "event-group-toggle",
32
33
  className: "w-full flex items-center justify-between gap-2 text-left cursor-pointer",
33
- children: h ? /* @__PURE__ */ f("span", {
34
+ children: g ? /* @__PURE__ */ p("span", {
34
35
  className: "flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]",
35
- children: [/* @__PURE__ */ d(k, { className: "h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0" }), /* @__PURE__ */ d("span", {
36
+ children: [/* @__PURE__ */ f(A, { className: "h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0" }), /* @__PURE__ */ f("span", {
36
37
  className: "truncate",
37
- children: O
38
+ children: k
38
39
  })]
39
- }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("span", {
40
+ }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("span", {
40
41
  className: "flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]",
41
- children: [/* @__PURE__ */ d(k, { className: "h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0" }), /* @__PURE__ */ d("span", {
42
+ children: [/* @__PURE__ */ f(A, { className: "h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0" }), /* @__PURE__ */ f("span", {
42
43
  className: "truncate",
43
- children: D ?? O
44
+ children: /* @__PURE__ */ f(s.Provider, {
45
+ value: !1,
46
+ children: O ?? k
47
+ })
44
48
  })]
45
- }), /* @__PURE__ */ f("span", {
49
+ }), /* @__PURE__ */ p("span", {
46
50
  className: "flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]",
47
- children: [/* @__PURE__ */ d("span", {
51
+ children: [/* @__PURE__ */ f("span", {
48
52
  className: "truncate",
49
- children: O
50
- }), T ? /* @__PURE__ */ d(n, {
53
+ children: k
54
+ }), E ? /* @__PURE__ */ f(n, {
51
55
  "data-testid": "spinner-icon",
52
56
  className: "h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]"
53
57
  }) : null]
54
58
  })] })
55
- }), v && /* @__PURE__ */ d("div", {
56
- id: b,
59
+ }), y && /* @__PURE__ */ f("div", {
60
+ id: x,
57
61
  role: "region",
58
- "aria-labelledby": x,
62
+ "aria-labelledby": S,
59
63
  className: "mt-1.5 flex flex-col",
60
64
  "data-testid": "event-group-content",
61
- children: /* @__PURE__ */ d(c.Provider, {
65
+ children: /* @__PURE__ */ f(l.Provider, {
62
66
  value: !0,
63
- children: g
67
+ children: _
64
68
  })
65
69
  })]
66
70
  });
67
71
  }
68
72
  //#endregion
69
- export { p as EventGroup };
73
+ export { m as EventGroup };
70
74
 
71
75
  //# sourceMappingURL=event-group.js.map