@openhands/agent-canvas 1.9.0 → 1.11.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.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-C921BlYB.js → acp-providers-BkL3HWa3.js} +1 -1
- package/build/assets/active-backend-context-BBvP-bI2.js +2 -0
- package/build/assets/agent-context-settings-Bno1nwPL.js +1 -0
- package/build/assets/{agent-profiles-settings-BymJf3EP.js → agent-profiles-settings-DqoS7RL3.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-0RztSdJJ.js +86 -0
- package/build/assets/agent-settings-BJHryp65.js +1 -0
- package/build/assets/{agent-settings-WzqXk6B4.js → agent-settings-h8hQz-IU.js} +2 -2
- package/build/assets/alert-banner-lrK-2_0Y.js +1 -0
- package/build/assets/{api-key-entry-screen-DI0I04O3.js → api-key-entry-screen-Qsb83VX1.js} +1 -1
- package/build/assets/{app-settings-DGistSFV.js → app-settings-r1RUbgGi.js} +1 -1
- package/build/assets/automation-detail-7LkL91j9.js +3 -0
- package/build/assets/automation-export-U2QNyNy6.js +2 -0
- package/build/assets/automation-setup-route-Bel9_Lue.js +1 -0
- package/build/assets/automation-templates-CRLDssaI.js +1 -0
- package/build/assets/automations-list-B2iV3ZKW.js +1 -0
- package/build/assets/{back-nav-button-D4ngzpSh.js → back-nav-button-B3pYwmUJ.js} +1 -1
- package/build/assets/backend-form-modal-OroTqnAv.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BnzI8Ysj.js → backend-synced-settings-badge-DB4717Iu.js} +1 -1
- package/build/assets/{badge-1Mf1iPcX.js → badge-yR53enbU.js} +1 -1
- package/build/assets/{base-modal-BBuy0WQQ.js → base-modal-3NmIOKDm.js} +1 -1
- package/build/assets/bot-DuN83i3p.js +1 -0
- package/build/assets/{brand-button-DGN6Y9o6.js → brand-button-CJcwjnfb.js} +1 -1
- package/build/assets/{browser-D_ekTlTS.js → browser--eoQOo4M.js} +2 -2
- package/build/assets/{browser-tab-D4a4Ou_w.js → browser-tab-A94o33Vn.js} +1 -1
- package/build/assets/{chat-send-button-CgbcjD97.js → chat-send-button-B8n6-DQA.js} +1 -1
- package/build/assets/check-DLOKoFU9.js +1 -0
- package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
- package/build/assets/chevron-down-CnIbtM6i.js +1 -0
- package/build/assets/circle-check-CxCYJrpZ.js +1 -0
- package/build/assets/{circle-plus-check-toggle-yTAS-nX3.js → circle-plus-check-toggle-BVzv5EkZ.js} +1 -1
- package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CEOl5Gxr.js → cloud-funnel-analytics-CBQdPZl_.js} +1 -1
- package/build/assets/{combobox-caret-Bd2yySnF.js → combobox-caret-BlmRwiM8.js} +1 -1
- package/build/assets/command-menu-PsRXVBz2.js +1 -0
- package/build/assets/condenser-settings-w7L3EFvm.js +1 -0
- package/build/assets/{confirmation-modal-NCUPr2-O.js → confirmation-modal-DAH0XtOp.js} +1 -1
- package/build/assets/context-menu-list-item-BQhmFVEK.js +1 -0
- package/build/assets/{conversation-CUJ0Vo8g.js → conversation-BUzBZAc-.js} +7 -7
- package/build/assets/conversation-panel-pzAKsSDb.js +1 -0
- package/build/assets/conversation-pzAKsSDb.js +1 -0
- package/build/assets/{conversation-state-store-F62HvuI1.js → conversation-state-store-Bs8gA263.js} +1 -1
- package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-BCZ7rUMH.js → conversation-tab-empty-state-C9sfDOlt.js} +1 -1
- package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-D_Lp6-Fl.js → copy-to-clipboard-button-DatoElj8.js} +1 -1
- package/build/assets/{device-verify-DLmolX8Q.js → device-verify-BIjXeW9N.js} +1 -1
- package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
- package/build/assets/{dropdown-classes-BB8rzqXL.js → dropdown-classes-zFW7qPSK.js} +1 -1
- package/build/assets/entry.client-DzbDyLkV.js +2 -0
- package/build/assets/enum-filter-dropdown-CctILg5t.js +1 -0
- package/build/assets/{environment-switch-overlay-BepBBX66.js → environment-switch-overlay-Cvmo6clk.js} +1 -1
- package/build/assets/{extensions-hub-R3KNv-5V.js → extensions-hub-DOmHPGTA.js} +1 -1
- package/build/assets/{extensions-navigation-CfWFmI1I.js → extensions-navigation-6zU5M1pa.js} +1 -1
- package/build/assets/{external-link-BdBSg8rk.js → external-link-zWbg5KXS.js} +1 -1
- package/build/assets/file-text-RecuaId_.js +1 -0
- package/build/assets/files-tab-BzofBmF4.js +1 -0
- package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
- package/build/assets/{form-control-classes-DAfsCJTe.js → form-control-classes-DLN3Qgub.js} +1 -1
- package/build/assets/format-relative-time-DGPQlPx0.js +1 -0
- package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
- package/build/assets/{git-provider-icon-BZqqUPlm.js → git-provider-icon-BLMlwy02.js} +1 -1
- package/build/assets/{git-repo-dropdown-DEpOwUez.js → git-repo-dropdown-B7RvO70z.js} +1 -1
- package/build/assets/git-repo-dropdown-B_PTq4ol.js +1 -0
- package/build/assets/{highlighted-source-view-CX9oIoVT.js → highlighted-source-view-CgJfD5VT.js} +1 -1
- package/build/assets/home-DEZaZqYv.js +1 -0
- package/build/assets/home-r89Vj2td.js +1 -0
- package/build/assets/{home-store-Ch1ErdBc.js → home-store-D7CjMN_-.js} +1 -1
- package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
- package/build/assets/index-home-r89Vj2td.js +1 -0
- package/build/assets/install-server-modal-BTwK5lbi.js +1 -0
- package/build/assets/kebab-menu-item-content-C4CkeiJO.js +1 -0
- package/build/assets/{launch-B1POpHuP.js → launch-DVlx4v9o.js} +1 -1
- package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
- package/build/assets/{list-todo-DtiL3lTp.js → list-todo-CheUtB7F.js} +1 -1
- package/build/assets/llm-not-configured-banner-CwKu8C6g.js +27 -0
- package/build/assets/llm-settings-BJotLQND.js +1 -0
- package/build/assets/llm-settings-CDM-5H2A.js +1 -0
- package/build/assets/{llm-subscription-service-DBJbfd8Z.js → llm-subscription-service-7eVfDIE1.js} +1 -1
- package/build/assets/loader-circle-C5AnEN8r.js +1 -0
- package/build/assets/{loading-spinner-DfZ_bhV7.js → loading-spinner-CN3riY7k.js} +1 -1
- package/build/assets/{manage-backends-modal-CwyWsiag.js → manage-backends-modal-HNWKLYhq.js} +1 -1
- package/build/assets/manifest-2a36a8f8.js +1 -0
- package/build/assets/manifest-subpage-layout-D-m-h8_t.js +1 -0
- package/build/assets/map-provider-7Bp2aih5.js +1 -0
- package/build/assets/markdown-renderer-BiiiIznl.js +8 -0
- package/build/assets/mcp-gLgPP7AS.js +9 -0
- package/build/assets/mcp-marketplace-utils-Dr_HG_ol.js +1 -0
- package/build/assets/messages-D1cbVhRK.js +40 -0
- package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
- package/build/assets/{modal-body-CMsDpalT.js → modal-body-duRaxj_K.js} +1 -1
- package/build/assets/{modal-classes-B6PDrxXo.js → modal-classes-CLEXO6dj.js} +1 -1
- package/build/assets/{modal-close-button-DyxBZaAb.js → modal-close-button-D0aT02hs.js} +1 -1
- package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
- package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
- package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
- package/build/assets/npm-DRzJF5Zn.js +1 -0
- package/build/assets/onboarding-DSr8hOpk.js +1 -0
- package/build/assets/onboarding-modal-C6Euf7N4.js +1 -0
- package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
- package/build/assets/{organization-service.api-UDy63-oC.js → organization-service.api-C4GYWwj9.js} +1 -1
- package/build/assets/{pencil-BjgtZmWp.js → pencil-Bl3GWhgq.js} +1 -1
- package/build/assets/{planner-tab-BWk8885v.js → planner-tab-CZcguxTK.js} +1 -1
- package/build/assets/{plugins-management-service-CjkgF2dd.js → plugins-management-service-BmDzOQsd.js} +1 -1
- package/build/assets/plus-CtzlyAoF.js +1 -0
- package/build/assets/{profiles-service.api-CukSFLzz.js → profiles-service.api-CoLTwjc1.js} +1 -1
- package/build/assets/{providers-CqUWC85T.js → providers-tBzTpz1w.js} +1 -1
- package/build/assets/{proxy-BBUG3sd2.js → proxy-DCI9S-LA.js} +1 -1
- package/build/assets/{puzzle-BoNc6zZ8.js → puzzle-B3v361yY.js} +1 -1
- package/build/assets/recommended-automations-launcher-BbJAJVED.js +1 -0
- package/build/assets/{refresh-cw-BrM5ZAZD.js → refresh-cw-B9GhC3QC.js} +1 -1
- package/build/assets/root-BfM_kC_d.css +1 -0
- package/build/assets/root-gstBEjty.js +2 -0
- package/build/assets/root-layout-BIAFLP9p.js +2 -0
- package/build/assets/{schema-field-nImDoY6-.js → schema-field-zhsVDllR.js} +1 -1
- package/build/assets/{sdk-section-page-BxMrtUNV.js → sdk-section-page-CS4GWn0y.js} +1 -1
- package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
- package/build/assets/search-CYaiKHRp.js +1 -0
- package/build/assets/{secrets-service-Dhjh3HhH.js → secrets-service-DjgGduXk.js} +1 -1
- package/build/assets/{secrets-settings-CPdxceT_.js → secrets-settings-f-qahfbi.js} +1 -1
- package/build/assets/{segmented-toggle-Do6oyepX.js → segmented-toggle-SmvsR3jW.js} +1 -1
- package/build/assets/settings-CWFxymAf.js +1 -0
- package/build/assets/settings-DQd0xLEw.js +1 -0
- package/build/assets/{settings-dropdown-input-DYCULKpp.js → settings-dropdown-input-TWIeiG02.js} +1 -1
- package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
- package/build/assets/{settings-index-C9o2NBO0.js → settings-index-BVwy9JEp.js} +1 -1
- package/build/assets/{settings-input-B-q2gkVy.js → settings-input-D61Vzp9e.js} +1 -1
- package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
- package/build/assets/{settings-list-classes-WpQi0q1L.js → settings-list-classes-sE0ASr1s.js} +1 -1
- package/build/assets/{settings-modal-CEK0AIx6.js → settings-modal-D6D5ngET.js} +1 -1
- package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
- package/build/assets/settings-service.api-DZp7E7A9.js +1 -0
- package/build/assets/{settings-switch-LqKdGxHL.js → settings-switch-Drt-rF5s.js} +1 -1
- package/build/assets/{settings-utils-BL_Z9uIe.js → settings-utils-gw2ppAvw.js} +1 -1
- package/build/assets/{shared-conversation-Bu-dQlgp.js → shared-conversation-DIxZjElr.js} +1 -1
- package/build/assets/shield-check-D2cpEpv3.js +1 -0
- package/build/assets/{sidebar-layout-oHBGQmLh.js → sidebar-layout-Dxg6zc2K.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-OoZBHxaT.js +1 -0
- package/build/assets/{sidebar-nav-link-CrujNA09.js → sidebar-nav-link-CxLoG-dG.js} +1 -1
- package/build/assets/sidebar-store-BJeYY-E9.js +1 -0
- package/build/assets/{skill-card-pill-row-CZBI7OqH.js → skill-card-pill-row-B_BYBONu.js} +1 -1
- package/build/assets/{skill-icon-badge-BOov_phZ.js → skill-icon-badge-CN41Hy9l.js} +1 -1
- package/build/assets/skill-scope-B1Per5XI.js +1 -0
- package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
- package/build/assets/{skills-plugins-D0PiHWAD.js → skills-plugins-B3AO6sMz.js} +1 -1
- package/build/assets/skills-settings-DmmgJ6CT.js +2 -0
- package/build/assets/sparkles-g7y3r-Ut.js +1 -0
- package/build/assets/{styled-tooltip-C7grwnOX.js → styled-tooltip-C5C07RQC.js} +1 -1
- package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
- package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
- package/build/assets/{task-list-tab-R3ac6m7O.js → task-list-tab-C19Q_JNf.js} +1 -1
- package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
- package/build/assets/{terminal-yqkNdEAx.js → terminal-CbuMRYal.js} +1 -1
- package/build/assets/{toggle-switch-BeSrbgCg.js → toggle-switch-CIioisto.js} +1 -1
- package/build/assets/{trash-2-wW5TWcdN.js → trash-2-CzDVN-Iw.js} +1 -1
- package/build/assets/{typography-iYhzLlHO.js → typography-D9tiHct7.js} +1 -1
- package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
- package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
- package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
- package/build/assets/{use-acp-credential-form-DUxbxmbq.js → use-acp-credential-form-DJmmJKMo.js} +1 -1
- package/build/assets/{use-activate-agent-profile-CDHA52tC.js → use-activate-agent-profile-CeFfYwu_.js} +1 -1
- package/build/assets/{use-agent-profiles-TsOdIyw5.js → use-agent-profiles-BHLkLbRR.js} +1 -1
- package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-Bt1M71u5.js → use-can-manage-org-profiles-Bu4y8gSx.js} +1 -1
- package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-DWt7HCgf.js → use-cloud-current-user-id-QD9x3ySO.js} +1 -1
- package/build/assets/{use-config-CxlEdf_v.js → use-config-CPwqciXN.js} +1 -1
- package/build/assets/{use-create-conversation-nOJ6Um5h.js → use-create-conversation-DWaSVUOB.js} +1 -1
- package/build/assets/{use-create-secret-Dj5ang9x.js → use-create-secret-BsOfOLvg.js} +1 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
- package/build/assets/{use-is-creating-conversation-CAggrM75.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
- package/build/assets/use-llm-profiles-CU8ah1pz.js +1 -0
- package/build/assets/use-manifest-capabilities-DBYPjyV6.js +1 -0
- package/build/assets/{use-onboarding-completion-gxQlcEy2.js → use-onboarding-completion-CtNJxkXG.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CVO7sXYR.js → use-plugins-marketplace-ZEA-gyM9.js} +1 -1
- package/build/assets/use-save-agent-profile-DgI_Uz9a.js +1 -0
- package/build/assets/{use-save-settings-L3aMaDeS.js → use-save-settings-pSjRhD_m.js} +1 -1
- package/build/assets/{use-settings-8nt3DGxW.js → use-settings-BHWsOcIG.js} +1 -1
- package/build/assets/use-settings-nav-items-CQgkxUbV.js +16 -0
- package/build/assets/use-tracking-CGCsBWhg.js +3 -0
- package/build/assets/{use-user-conversation-BIIpGUgM.js → use-user-conversation-DRfEU8x0.js} +1 -1
- package/build/assets/{useInfiniteQuery-BLRVmVPU.js → useInfiniteQuery-DbCv0Jzd.js} +1 -1
- package/build/assets/{useMutation-CaSHLnX0.js → useMutation-ChpkYxI5.js} +1 -1
- package/build/assets/{useQueries--d_WWAzc.js → useQueries-Cjv3E8_1.js} +1 -1
- package/build/assets/useQuery-BCnzy4LX.js +1 -0
- package/build/assets/utils-DPQfkd-7.js +1 -0
- package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
- package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
- package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
- package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
- package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
- package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
- package/build/assets/{vendor~entry.client-BcYIVQvB.js → vendor~entry.client-zSIea5EO.js} +2 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
- package/build/assets/{vendor~files-tab-C7RmQJwN.js → vendor~files-tab-C87pjSpi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
- package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
- package/build/assets/vendor~module-DyG7x7JT.js +2 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js → vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +162 -54
- package/build/assets/{verification-settings-DBsnSXC3.js → verification-settings-BItwt998.js} +1 -1
- package/build/assets/wrench-B1_H-tL1.js +1 -0
- package/build/assets/x-RYDBg-e2.js +1 -0
- package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
- package/build/assets/zap-tbKDzCe3.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +108 -5
- package/build/locales/ca/openhands.json +108 -5
- package/build/locales/de/openhands.json +108 -5
- package/build/locales/en/openhands.json +108 -5
- package/build/locales/es/openhands.json +108 -5
- package/build/locales/fr/openhands.json +108 -5
- package/build/locales/it/openhands.json +108 -5
- package/build/locales/ja/openhands.json +108 -5
- package/build/locales/ko-KR/openhands.json +108 -5
- package/build/locales/no/openhands.json +108 -5
- package/build/locales/pt/openhands.json +108 -5
- package/build/locales/tr/openhands.json +108 -5
- package/build/locales/uk/openhands.json +108 -5
- package/build/locales/zh-CN/openhands.json +108 -5
- package/build/locales/zh-TW/openhands.json +108 -5
- package/build/mockServiceWorker.js +21 -9
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +32 -5
- package/dist/api/agent-server-adapter.js +120 -91
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +5 -0
- package/dist/api/automation-service/automation-service.api.js +11 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.js +36 -31
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +2 -0
- package/dist/api/backend-registry/url-selection.cjs.map +1 -0
- package/dist/api/backend-registry/url-selection.d.ts +31 -0
- package/dist/api/backend-registry/url-selection.js +29 -0
- package/dist/api/backend-registry/url-selection.js.map +1 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +19 -2
- package/dist/api/cloud/conversation-service.api.js +51 -47
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/conversation-file-upload.api.cjs +1 -1
- package/dist/api/conversation-file-upload.api.js +10 -10
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +55 -61
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.js +12 -12
- package/dist/api/launch-child-conversation-client-tool.cjs +47 -0
- package/dist/api/launch-child-conversation-client-tool.cjs.map +1 -0
- package/dist/api/launch-child-conversation-client-tool.d.ts +3 -0
- package/dist/api/launch-child-conversation-client-tool.js +93 -0
- package/dist/api/launch-child-conversation-client-tool.js.map +1 -0
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
- package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/open-hands.types.d.ts +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +10 -0
- package/dist/api/settings-service/settings-service.api.js +90 -100
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/api/workspace-upload-path.cjs +1 -1
- package/dist/api/workspace-upload-path.js +8 -8
- package/dist/assets/chevron-left.d.ts +1 -1
- package/dist/assets/chevron-right.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +24 -18
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +5 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +11 -7
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/alerts/alert-banner.d.ts +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
- package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
- package/dist/components/features/automations/automation-card.d.ts +9 -1
- package/dist/components/features/automations/automation-group.d.ts +9 -1
- package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
- package/dist/components/features/automations/automation-list-row.d.ts +3 -1
- package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
- package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
- package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
- package/dist/components/features/automations/create-instructions.d.ts +2 -2
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
- package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
- package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
- package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
- package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
- package/dist/components/features/automations/detail/back-link.d.ts +1 -1
- package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/config-field.d.ts +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
- package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
- package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
- package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
- package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
- package/dist/components/features/automations/detail/section-card.d.ts +1 -1
- package/dist/components/features/automations/empty-state.d.ts +1 -1
- package/dist/components/features/automations/error-state.d.ts +1 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu.d.ts +1 -1
- package/dist/components/features/automations/metadata-chip.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +1 -1
- package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
- package/dist/components/features/automations/search-input.d.ts +1 -1
- package/dist/components/features/automations/status-badge.d.ts +1 -1
- package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
- package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
- package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
- package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
- package/dist/components/features/backends/backend-row.d.ts +1 -1
- package/dist/components/features/backends/backend-selector.d.ts +2 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
- package/dist/components/features/backends/backend-version.d.ts +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +1 -1
- package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
- package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
- package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
- package/dist/components/features/browser/browser.d.ts +1 -1
- package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
- package/dist/components/features/chat/btw-messages.d.ts +1 -1
- package/dist/components/features/chat/change-agent-button.d.ts +2 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
- package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
- package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.d.ts +2 -1
- package/dist/components/features/chat/chat-message.d.ts +1 -1
- package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
- package/dist/components/features/chat/chat-play-button.d.ts +1 -1
- package/dist/components/features/chat/chat-send-button.d.ts +1 -1
- package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
- package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
- package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
- package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
- package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
- package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
- package/dist/components/features/chat/drag-over.d.ts +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +2 -1
- package/dist/components/features/chat/error-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar.d.ts +1 -1
- package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
- package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
- package/dist/components/features/chat/goal-status-content.d.ts +1 -1
- package/dist/components/features/chat/got-it-button.d.ts +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
- package/dist/components/features/chat/model-messages.d.ts +2 -1
- package/dist/components/features/chat/mono-component.d.ts +1 -1
- package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
- package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
- package/dist/components/features/chat/path-component.d.ts +1 -1
- package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
- package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
- package/dist/components/features/chat/plan-preview.d.ts +1 -1
- package/dist/components/features/chat/remove-file-button.d.ts +1 -1
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
- package/dist/components/features/chat/success-indicator.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
- package/dist/components/features/chat/typing-indicator.d.ts +1 -1
- package/dist/components/features/chat/uploaded-file.d.ts +1 -1
- package/dist/components/features/chat/uploaded-files.d.ts +1 -1
- package/dist/components/features/chat/uploaded-image.d.ts +2 -1
- package/dist/components/features/chat/user-message-body.d.ts +2 -2
- package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
- package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-loading.d.ts +1 -1
- package/dist/components/features/controls/agent-status.d.ts +1 -1
- package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
- package/dist/components/features/controls/macros-submenu.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
- package/dist/components/features/controls/server-status.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
- package/dist/components/features/controls/tools.d.ts +2 -1
- package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name.d.ts +2 -1
- package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
- package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
- package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
- package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -2
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +3 -9
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +48 -51
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.d.ts +12 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.js +6 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +16 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +95 -78
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.js +40 -38
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +14 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +167 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +63 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +66 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.d.ts +15 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.js +117 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/no-repository.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.js +30 -19
- package/dist/components/features/conversation-panel/conversation-card/no-repository.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +7 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +146 -104
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +20 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +53 -27
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +169 -155
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
- package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
- package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
- package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
- package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
- package/dist/components/features/files/file-item.d.ts +1 -1
- package/dist/components/features/files/file-list.d.ts +2 -1
- package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
- package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
- package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
- package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +1 -1
- package/dist/components/features/files-tab/tree-node.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
- package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
- package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
- package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
- package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
- package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
- package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
- package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header.d.ts +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
- package/dist/components/features/home/new-conversation.d.ts +1 -1
- package/dist/components/features/home/open-launcher-button.d.ts +1 -1
- package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
- package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
- package/dist/components/features/home/repo-selection-form.d.ts +2 -1
- package/dist/components/features/home/shared/clear-button.d.ts +2 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
- package/dist/components/features/home/shared/empty-state.d.ts +2 -1
- package/dist/components/features/home/shared/error-message.d.ts +2 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
- package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
- package/dist/components/features/home/tasks/task-card.d.ts +1 -1
- package/dist/components/features/home/tasks/task-group.d.ts +1 -1
- package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
- package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
- package/dist/components/features/images/image-carousel.d.ts +2 -1
- package/dist/components/features/images/image-preview.d.ts +1 -1
- package/dist/components/features/images/thumbnail.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
- package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +1 -1
- package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
- package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +1 -1
- package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
- package/dist/components/features/markdown/anchor.d.ts +1 -1
- package/dist/components/features/markdown/blockquote.d.ts +1 -1
- package/dist/components/features/markdown/code.d.ts +1 -1
- package/dist/components/features/markdown/headings.d.ts +6 -6
- package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
- package/dist/components/features/markdown/list.d.ts +3 -3
- package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
- package/dist/components/features/markdown/paragraph.d.ts +1 -1
- package/dist/components/features/markdown/plan-components.d.ts +36 -36
- package/dist/components/features/markdown/table.d.ts +3 -3
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
- package/dist/components/features/mcp-page/install-server-modal.js +117 -118
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
- package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
- package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
- package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
- package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
- package/dist/components/features/plugins/plugin-card.d.ts +2 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
- package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
- package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
- package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
- package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
- package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
- package/dist/components/features/settings/agent-canvas-update-card.cjs +1 -1
- package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -1
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +10 -5
- package/dist/components/features/settings/agent-canvas-update-card.js +223 -149
- package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -1
- package/dist/components/features/settings/agent-canvas-version-modal.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-version-modal.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-modal.d.ts +11 -0
- package/dist/components/features/settings/agent-canvas-version-modal.js +166 -0
- package/dist/components/features/settings/agent-canvas-version-modal.js.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-tile.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-version-tile.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-tile.d.ts +13 -0
- package/dist/components/features/settings/agent-canvas-version-tile.js +60 -0
- package/dist/components/features/settings/agent-canvas-version-tile.js.map +1 -0
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
- package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
- package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
- package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
- package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
- package/dist/components/features/settings/banner-message.d.ts +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
- package/dist/components/features/settings/input-skeleton.d.ts +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
- package/dist/components/features/settings/key-status-icon.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
- package/dist/components/features/settings/mobile-header.d.ts +1 -1
- package/dist/components/features/settings/optional-tag.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
- package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
- package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
- package/dist/components/features/settings/settings-layout.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
- package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
- package/dist/components/features/settings/settings-navigation.d.ts +1 -1
- package/dist/components/features/settings/settings-switch.d.ts +1 -1
- package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
- package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
- package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
- package/dist/components/features/settings/upgrade-button.d.ts +1 -1
- package/dist/components/features/sidebar/avatar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +109 -108
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.d.ts +2 -1
- package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
- package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
- package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.js +9 -9
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card.d.ts +2 -1
- package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
- package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
- package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
- package/dist/components/features/skills/skill-filter.d.ts +34 -0
- package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
- package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
- package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
- package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
- package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.d.ts +1 -1
- package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
- package/dist/components/features/terminal/terminal.d.ts +1 -1
- package/dist/components/features/tips/random-tip.d.ts +2 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
- package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
- package/dist/components/providers/telemetry-provider.d.ts +1 -1
- package/dist/components/shared/action-tooltip.d.ts +1 -1
- package/dist/components/shared/agent-brand-icon.d.ts +1 -1
- package/dist/components/shared/badge.d.ts +1 -1
- package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
- package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
- package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
- package/dist/components/shared/buttons/modal-button.d.ts +1 -1
- package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +1 -1
- package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
- package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/git-provider-icon.d.ts +1 -1
- package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
- package/dist/components/shared/loading-spinner.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
- package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
- package/dist/components/shared/modals/modal-body.d.ts +1 -1
- package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
- package/dist/components/shared/navigation-link.cjs +1 -1
- package/dist/components/shared/navigation-link.cjs.map +1 -1
- package/dist/components/shared/navigation-link.js +11 -7
- package/dist/components/shared/navigation-link.js.map +1 -1
- package/dist/components/shared/risk-alert.d.ts +1 -1
- package/dist/components/shared/text-shimmer.d.ts +1 -1
- package/dist/components/ui/resize-handle.d.ts +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/child-conversation.cjs +2 -0
- package/dist/constants/child-conversation.cjs.map +1 -0
- package/dist/constants/child-conversation.d.ts +29 -0
- package/dist/constants/child-conversation.js +6 -0
- package/dist/constants/child-conversation.js.map +1 -0
- package/dist/context/navigation-context.d.ts +1 -1
- package/dist/context/scroll-context.d.ts +1 -1
- package/dist/contexts/active-backend-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.js +189 -188
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/settings-section-header-context.d.ts +1 -1
- package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
- package/dist/fixtures/home-automations-demo.d.ts +19 -0
- package/dist/hooks/chat/use-model-interceptor.cjs +1 -1
- package/dist/hooks/chat/use-model-interceptor.js +6 -6
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +6 -6
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.js +8 -4
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.d.ts +1 -1
- package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
- package/dist/hooks/query/use-app-installations.d.ts +1 -1
- package/dist/hooks/query/use-automation-detail.d.ts +2 -2
- package/dist/hooks/query/use-automation-health.d.ts +2 -0
- package/dist/hooks/query/use-automations.d.ts +5 -1
- package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
- package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
- package/dist/hooks/query/use-commit-changes.d.ts +1 -1
- package/dist/hooks/query/use-config.d.ts +1 -1
- package/dist/hooks/query/use-conversation-history.d.ts +1 -1
- package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
- package/dist/hooks/query/use-get-secrets.d.ts +1 -1
- package/dist/hooks/query/use-home-automations.d.ts +20 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
- package/dist/hooks/query/use-local-git-info.d.ts +1 -1
- package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +2 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
- package/dist/hooks/query/use-provider-models.d.ts +1 -1
- package/dist/hooks/query/use-search-branches.d.ts +1 -1
- package/dist/hooks/query/use-search-providers.d.ts +1 -1
- package/dist/hooks/query/use-search-repositories.d.ts +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
- package/dist/hooks/query/use-settings.d.ts +2 -2
- package/dist/hooks/query/use-skills.d.ts +1 -1
- package/dist/hooks/query/use-start-tasks.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
- package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +2 -2
- package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
- package/dist/hooks/query/use-user-conversation.d.ts +1 -1
- package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
- package/dist/hooks/use-backend-scoped-path.cjs +2 -0
- package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
- package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
- package/dist/hooks/use-backend-scoped-path.js +13 -0
- package/dist/hooks/use-backend-scoped-path.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.d.ts +23 -0
- package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +4 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +105 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1813 -62
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/code-pill.d.ts +1 -1
- package/dist/icons/docker.cjs +2 -0
- package/dist/icons/docker.cjs.map +1 -0
- package/dist/icons/docker.js +19 -0
- package/dist/icons/docker.js.map +1 -0
- package/dist/icons/npm.cjs +2 -0
- package/dist/icons/npm.cjs.map +1 -0
- package/dist/icons/npm.js +19 -0
- package/dist/icons/npm.js.map +1 -0
- package/dist/locales/ar/openhands.json +108 -5
- package/dist/locales/ca/openhands.json +108 -5
- package/dist/locales/de/openhands.json +108 -5
- package/dist/locales/en/openhands.json +108 -5
- package/dist/locales/es/openhands.json +108 -5
- package/dist/locales/fr/openhands.json +108 -5
- package/dist/locales/it/openhands.json +108 -5
- package/dist/locales/ja/openhands.json +108 -5
- package/dist/locales/ko-KR/openhands.json +108 -5
- package/dist/locales/no/openhands.json +108 -5
- package/dist/locales/pt/openhands.json +108 -5
- package/dist/locales/tr/openhands.json +108 -5
- package/dist/locales/uk/openhands.json +108 -5
- package/dist/locales/zh-CN/openhands.json +108 -5
- package/dist/locales/zh-TW/openhands.json +108 -5
- package/dist/manifests/automation-insights.d.ts +64 -0
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +33 -1
- package/dist/manifests/automation-interface.js +2 -1
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/manifests/interface-validation.cjs +1 -1
- package/dist/manifests/interface-validation.cjs.map +1 -1
- package/dist/manifests/interface-validation.js +228 -50
- package/dist/manifests/interface-validation.js.map +1 -1
- package/dist/manifests/manifest-template.d.ts +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +128 -0
- package/dist/manifests/types.js +35 -2
- package/dist/manifests/types.js.map +1 -1
- package/dist/mockServiceWorker.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +6 -4
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +126 -5
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +161 -53
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +112 -50
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.js +35 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.js +33 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js.map +1 -0
- package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
- package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
- package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +39 -35
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +3 -2
- package/dist/routes/app-settings.d.ts +2 -1
- package/dist/routes/browser-tab.d.ts +1 -1
- package/dist/routes/changes-tab.d.ts +2 -1
- package/dist/routes/commits-tab.d.ts +1 -1
- package/dist/routes/conversation.d.ts +2 -1
- package/dist/routes/files-tab.d.ts +1 -1
- package/dist/routes/llm-settings.d.ts +3 -2
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +2 -1
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/planner-tab.d.ts +2 -1
- package/dist/routes/secrets-settings.d.ts +2 -1
- package/dist/routes/task-list-tab.d.ts +1 -1
- package/dist/services/child-conversation-launch.cjs +2 -0
- package/dist/services/child-conversation-launch.cjs.map +1 -0
- package/dist/services/child-conversation-launch.d.ts +41 -0
- package/dist/services/child-conversation-launch.js +182 -0
- package/dist/services/child-conversation-launch.js.map +1 -0
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -7
- package/dist/services/settings.js.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +5 -1
- package/dist/stores/conversation-panel-preferences-store.js +8 -2
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/types/agent-server/core/base/action.d.ts +17 -1
- package/dist/types/agent-server/core/base/base.d.ts +2 -1
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +8 -1
- package/dist/types/agent-server/type-guards.js +4 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/automation.d.ts +30 -1
- package/dist/types/mcp-auth.cjs.map +1 -1
- package/dist/types/mcp-auth.d.ts +5 -41
- package/dist/types/mcp-auth.js.map +1 -1
- package/dist/types/mcp-server.d.ts +17 -32
- package/dist/types/settings.d.ts +8 -28
- package/dist/ui/card-title.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/combobox-caret.d.ts +3 -3
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.ts +3 -2
- package/dist/ui/context-menu.js +10 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/divider.d.ts +1 -1
- package/dist/ui/dropdown/clear-button.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
- package/dist/ui/dropdown/toggle-button.d.ts +1 -1
- package/dist/ui/help-link.d.ts +1 -1
- package/dist/ui/pre.d.ts +1 -1
- package/dist/ui/toggle-switch.d.ts +2 -2
- package/dist/ui/typography.d.ts +7 -7
- package/dist/utils/automation-activity-log-export.d.ts +17 -0
- package/dist/utils/automation-timeout.d.ts +4 -6
- package/dist/utils/custom-toast-handlers.cjs +1 -1
- package/dist/utils/custom-toast-handlers.cjs.map +1 -1
- package/dist/utils/custom-toast-handlers.d.ts +2 -2
- package/dist/utils/custom-toast-handlers.js +18 -1
- package/dist/utils/custom-toast-handlers.js.map +1 -1
- package/dist/utils/format-relative-time.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +12 -29
- package/dist/utils/mcp-config.js +161 -143
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.d.ts +2 -2
- package/dist/utils/mcp-installed-servers.js +21 -32
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs.map +1 -1
- package/dist/utils/mcp-server-health-key.d.ts +2 -4
- package/dist/utils/mcp-server-health-key.js.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
- package/dist/utils/settings-like-page-layout-classes.js +1 -1
- package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
- package/dist/utils/skill-category.d.ts +12 -0
- package/package.json +41 -35
- package/scripts/brand-dev-electron.mjs +244 -0
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +4 -0
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-with-automation.mjs +3 -2
- package/scripts/generate-icons.mjs +109 -0
- package/build/assets/Trans-Bwpzk1wT.js +0 -1
- package/build/assets/active-backend-context-BiwzkzDy.js +0 -2
- package/build/assets/agent-context-settings-DXNT_dcw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +0 -41
- package/build/assets/agent-settings-BjgQQe-_.js +0 -1
- package/build/assets/alert-banner-DR8EVyZM.js +0 -1
- package/build/assets/api-error-message-e16L1kwH.js +0 -1
- package/build/assets/automation-detail-DY6x2FW1.js +0 -2
- package/build/assets/automation-export-C09f-Lua.js +0 -2
- package/build/assets/automation-setup-route-CqKp0717.js +0 -1
- package/build/assets/automations-list-CqWJ7qXW.js +0 -1
- package/build/assets/backend-form-modal-B8D5hBzK.js +0 -1
- package/build/assets/check-CPLXgluF.js +0 -1
- package/build/assets/chevron-down-CP4QHvyc.js +0 -1
- package/build/assets/circle-check-Dpy2_xSI.js +0 -1
- package/build/assets/command-menu-Bj6X4ckE.js +0 -1
- package/build/assets/condenser-settings-EAXQNR2E.js +0 -1
- package/build/assets/context-menu-list-item-CrCrYuPF.js +0 -1
- package/build/assets/conversation-BzyIcSwr.js +0 -1
- package/build/assets/conversation-panel-BzyIcSwr.js +0 -1
- package/build/assets/copy-DCmZtz6n.js +0 -1
- package/build/assets/entry.client-BbIYOsIg.js +0 -2
- package/build/assets/enum-filter-dropdown-C08-srev.js +0 -1
- package/build/assets/files-tab-DEq8MbHu.js +0 -1
- package/build/assets/format-time-delta-CxfPJpzC.js +0 -1
- package/build/assets/git-repo-dropdown-9WKINV6J.js +0 -1
- package/build/assets/home-CY0JaxiY.js +0 -1
- package/build/assets/home-CaNWlVvB.js +0 -1
- package/build/assets/index-home-CaNWlVvB.js +0 -1
- package/build/assets/info-CmWQXtRQ.js +0 -1
- package/build/assets/install-server-modal-BWrudmZU.js +0 -1
- package/build/assets/llm-not-configured-banner-3tMsM4K6.js +0 -27
- package/build/assets/llm-settings-CXo8iPNW.js +0 -1
- package/build/assets/llm-settings-D0W8mJDk.js +0 -1
- package/build/assets/loader-circle-B4QDBARx.js +0 -1
- package/build/assets/manifest-39f4789d.js +0 -1
- package/build/assets/map-provider-CXU6issd.js +0 -1
- package/build/assets/markdown-renderer-DgiLLhW6.js +0 -8
- package/build/assets/mcp-DXG9LWrI.js +0 -9
- package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +0 -1
- package/build/assets/messages-kBjKaAeA.js +0 -40
- package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
- package/build/assets/onboarding-47hh2IHA.js +0 -1
- package/build/assets/onboarding-modal-9BuvvROo.js +0 -1
- package/build/assets/plus-DrKuuvMe.js +0 -1
- package/build/assets/recommended-automations-launcher-ejxy1P27.js +0 -1
- package/build/assets/root-5S-M8SYa.js +0 -2
- package/build/assets/root-DZ39lS5f.css +0 -1
- package/build/assets/root-layout-BPqoa0gv.js +0 -3
- package/build/assets/search-Dc2qR4O2.js +0 -1
- package/build/assets/settings-BRbnfKEm.js +0 -1
- package/build/assets/settings-Chfn5xTD.js +0 -1
- package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
- package/build/assets/settings-service.api-CZiPD8__.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-ND-hgygu.js +0 -1
- package/build/assets/sidebar-store-Bui-WNEr.js +0 -1
- package/build/assets/skills-settings-B43KArIz.js +0 -2
- package/build/assets/use-is-authed-BT7Iud4U.js +0 -1
- package/build/assets/use-llm-profiles-2Wc2db8u.js +0 -1
- package/build/assets/use-save-agent-profile-D0wC5ExW.js +0 -1
- package/build/assets/use-settings-nav-items-DHAAD-zk.js +0 -16
- package/build/assets/use-skills-CE6miQ3r.js +0 -1
- package/build/assets/use-tracking-BGboadaZ.js +0 -68
- package/build/assets/useQuery-DiPh8LRJ.js +0 -1
- package/build/assets/utils-BgGG1znF.js +0 -1
- package/build/assets/v4-DDdyfk2q.js +0 -1
- package/build/assets/vendor~browser-IVYgIgG1.js +0 -47
- package/build/assets/vendor~entry.client-CXM9oiAk.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js +0 -26
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js +0 -1
- package/build/assets/vendor~module-BZXjBMvd.js +0 -2
- package/build/assets/x-omAzpXkl.js +0 -1
- package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
- package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +0 -1
- package/dist/node_modules/void-elements/index.cjs +0 -2
- package/dist/node_modules/void-elements/index.cjs.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -25
- package/dist/node_modules/void-elements/index.js.map +0 -1
- /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js → vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-server-adapter.js","names":[],"sources":["../../src/api/agent-server-adapter.ts"],"sourcesContent":["import { ACP_SETTINGS_KEYS } from \"@openhands/typescript-client\";\nimport { ServerClient } from \"@openhands/typescript-client/clients\";\nimport { SKILLS_CATALOG } from \"@openhands/extensions/skills\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { ExecutionStatus } from \"#/types/agent-server/core\";\nimport { AgentKind, Settings, SettingsValue } from \"#/types/settings\";\nimport {\n getAcpPreferredDefaultModel,\n getAcpProvider,\n resolveEffectiveAcpModel,\n} from \"#/constants/acp-providers\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport {\n getCachedAgentServerInfo,\n isAgentServerToolAvailable,\n} from \"./agent-server-compatibility\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getEffectiveLocalBackend } from \"./backend-registry/active-store\";\nimport { buildAuthHeaders } from \"./backend-registry/auth\";\nimport {\n GetHooksResponse,\n PluginSpec,\n AppConversation,\n AppConversationPage,\n SandboxStatus,\n} from \"./conversation-service/agent-server-conversation-service.types\";\nimport SettingsService from \"./settings-service/settings-service.api\";\nimport { getStoredConversationMetadata } from \"./conversation-metadata-store\";\nimport LLMSubscriptionService from \"./llm-subscription-service\";\nimport {\n LLM_AUTH_TYPE_SUBSCRIPTION,\n OPENAI_SUBSCRIPTION_VENDOR,\n isSubscriptionLlmConfig,\n} from \"#/constants/llm-subscription\";\nimport {\n CANVAS_UI_CLIENT_TOOL,\n CANVAS_UI_CLIENT_TOOL_NAME,\n LEGACY_CANVAS_UI_TOOL_NAME,\n type ClientToolSpec,\n} from \"./canvas-ui-client-tool\";\n\nexport interface DirectConversationInfo {\n id: string;\n title?: string | null;\n created_at: string;\n updated_at: string;\n execution_status?: string | null;\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\n sandbox_status?: string | null;\n metrics?: {\n accumulated_cost?: number | null;\n max_budget_per_task?: number | null;\n accumulated_token_usage?: {\n prompt_tokens?: number;\n completion_tokens?: number;\n cache_read_tokens?: number;\n cache_write_tokens?: number;\n context_window?: number;\n per_turn_token?: number;\n } | null;\n } | null;\n agent?: {\n /**\n * Pydantic discriminator from the SDK union: ``\"ACPAgent\"`` for ACP CLI\n * subprocesses (model lives on the subprocess via ``acp_model``),\n * ``\"Agent\"`` for direct litellm. Read by {@link toAppConversation}.\n */\n kind?: string | null;\n acp_model?: string | null;\n /**\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\n */\n acp_server?: string | null;\n llm?: {\n model?: string | null;\n } | null;\n } | null;\n current_model_id?: string | null;\n current_model_name?: string | null;\n workspace?: {\n working_dir?: string | null;\n } | null;\n /**\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\n * ``ACP_SERVER_TAG_KEY`` (\"acpserver\") — but the field is typed as a\n * generic record so future readers don't need another wire-shape change.\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\n * values are opaque strings.\n */\n tags?: Record<string, string> | null;\n launched_agent_profile?: {\n agent_profile_id: string;\n revision: number;\n } | null;\n}\n\nconst DEFAULT_TOOL_NAMES = [\"terminal\", \"file_editor\", \"task_tracker\"];\nconst BROWSER_TOOL_SET_NAME = \"browser_tool_set\";\nconst TASK_TOOL_SET_NAME = \"task_tool_set\";\n\nfunction browserToolsEnabled() {\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \"false\";\n}\n\n/**\n * Shape of the runtime services info served by Agent Canvas backends in\n * `/server_info.runtime_services`. All URLs are written from the agent's point of\n * view, not the browser's. The block is rendered into the agent's system prompt\n * via `AgentContext.system_message_suffix` so the agent knows what's reachable\n * from inside its sandbox without having to probe.\n */\nexport interface RuntimeServicesInfo {\n mode?: string;\n agent_host_alias?: string;\n services?: {\n agent_server?: { description?: string; url_from_agent?: string };\n ingress?: { description?: string; url_from_agent?: string };\n frontend?: {\n kind?: \"vite\" | \"static\";\n description?: string;\n url_from_agent?: string;\n };\n // `vite` is the legacy key name for the frontend entry, accepted for\n // one release while older dev-stack launchers may still emit it.\n vite?: { description?: string; url_from_agent?: string };\n automation?: {\n description?: string;\n url_from_agent?: string;\n api_prefix?: string;\n docs_url?: string;\n openapi_url?: string;\n auth_env_var?: string;\n };\n };\n}\n\nexport function parseRuntimeServicesInfo(\n value: unknown,\n): RuntimeServicesInfo | null {\n if (typeof value === \"string\") {\n const raw = value.trim();\n if (!raw) return null;\n try {\n return parseRuntimeServicesInfo(JSON.parse(raw));\n } catch {\n return null;\n }\n }\n\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n\n const parsed = value as RuntimeServicesInfo;\n if (!parsed.services || typeof parsed.services !== \"object\") return null;\n return parsed;\n}\n\nexport async function fetchBackendRuntimeServicesInfo(): Promise<RuntimeServicesInfo | null> {\n let clientOptions: ReturnType<typeof getAgentServerClientOptions>;\n try {\n clientOptions = getAgentServerClientOptions({ timeout: 3000 });\n } catch {\n return null;\n }\n\n const cached = parseRuntimeServicesInfo(\n getCachedAgentServerInfo({ host: clientOptions.host })?.runtime_services,\n );\n if (cached) return cached;\n\n try {\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n return parseRuntimeServicesInfo(\n (serverInfo as { runtime_services?: unknown }).runtime_services,\n );\n } catch {\n return null;\n }\n}\n\n/**\n * Return the deployment mode from the runtime services info, e.g. \"docker\",\n * \"dev:automation\", etc. Returns `null` when no runtime info is supplied.\n */\nexport function getDeploymentMode(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | null {\n return runtimeServicesInfo?.mode ?? null;\n}\n\n/**\n * Render the runtime services info into a markdown block suitable for\n * appending to the system prompt via `AgentContext.system_message_suffix`.\n *\n * Returns `undefined` when no runtime info is available, so callers can safely\n * omit the field when the selected backend does not advertise runtime services.\n */\nexport function buildRuntimeServicesSystemSuffix(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | undefined {\n const info = parseRuntimeServicesInfo(runtimeServicesInfo);\n if (!info?.services) return undefined;\n\n const lines: string[] = [];\n lines.push(\"<RUNTIME_SERVICES>\");\n if (info.mode) {\n lines.push(\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\n );\n } else {\n lines.push(\"You are running inside an agent-canvas dev stack.\");\n }\n lines.push(\n \"The following services are reachable from your sandbox. URLs are written\",\n \"from your point of view (i.e., as you should curl/fetch them).\",\n \"\",\n );\n\n const { agent_server, ingress, automation } = info.services;\n const { frontend } = info.services;\n\n if (agent_server?.url_from_agent) {\n lines.push(\n `* Agent Server (you): ${agent_server.url_from_agent}`,\n ` ${agent_server.description ?? \"The agent-server hosting your tool calls.\"}`,\n );\n }\n if (ingress?.url_from_agent) {\n lines.push(\n `* Ingress: ${ingress.url_from_agent}`,\n ` ${ingress.description ?? \"Unified entry point for browser-facing traffic.\"}`,\n );\n }\n if (frontend?.url_from_agent) {\n lines.push(\n `* Frontend: ${frontend.url_from_agent}`,\n ` ${frontend.description ?? \"Frontend dev server.\"}`,\n );\n }\n if (automation?.url_from_agent) {\n lines.push(\n `* Automation backend: ${automation.url_from_agent}`,\n ` ${automation.description ?? \"OpenHands Automations service.\"}`,\n );\n if (automation.docs_url) {\n lines.push(` Docs: ${automation.docs_url}`);\n }\n if (automation.openapi_url) {\n lines.push(` OpenAPI: ${automation.openapi_url}`);\n }\n if (automation.auth_env_var) {\n // X-Session-API-Key is the local convention shared by the agent-server\n // and automation backend (see openhands-automation auth.py).\n lines.push(\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\n );\n }\n } else {\n lines.push(\n \"* Automation backend: not running in this dev mode (skip /api/automation calls).\",\n );\n }\n\n // Anchor the \"don't guess\" warning to the actual agent-server URL for\n // this stack instead of a hardcoded port. The agent-server listens on\n // different ports across dev modes, and baking the wrong port into the\n // system prompt is exactly the kind of confusion this block is meant to\n // prevent.\n const agentServerUrl = agent_server?.url_from_agent;\n lines.push(\n \"\",\n \"Trust this block over guessing: do not assume any other URLs are running.\",\n );\n if (agentServerUrl) {\n lines.push(\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\n \"you are running inside of — NOT the automation backend.\",\n );\n }\n lines.push(\"</RUNTIME_SERVICES>\");\n\n return lines.join(\"\\n\");\n}\n\nexport function toConversationUrl(conversationId: string): string {\n // Local-format conversation URL — points at whichever local agent-server\n // is actually serving the conversation (the bundled one when the active\n // selection is cloud).\n const { host } = getAgentServerClientOptions();\n return `${host}/api/conversations/${conversationId}`;\n}\n\n// TODO(i18n): extract \"Conversation\" once we add CONVERSATION$DEFAULT_TITLE\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\n// fallback inside this pure adapter rather than fanning out to display sites.\nexport function getDefaultConversationTitle(conversationId: string): string {\n return `Conversation ${conversationId.slice(0, 5)}`;\n}\n\nexport function toAppConversation(\n info: DirectConversationInfo,\n): AppConversation {\n const metadata = getStoredConversationMetadata(info.id);\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\n // runtime model fields when available, then the configured ``acp_model`` that\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\n // switching, so surfacing this string is display-only.\n const isAcp = info.agent?.kind === \"ACPAgent\";\n // Only surface ``acp_server`` for ACP conversations even if the wire\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\n // conversation — the chip is identity info for the ACP CLI subprocess,\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\n // picker and degrade the chip to a generic \"ACP\" (#1571).\n const acpServer = isAcp\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\n : null;\n return {\n id: info.id,\n created_by_user_id: null,\n selected_repository: metadata?.selected_repository ?? null,\n selected_branch: metadata?.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? null,\n selected_workspace: metadata?.selected_workspace ?? null,\n active_profile: metadata?.active_profile ?? null,\n title: info.title?.trim()\n ? info.title\n : getDefaultConversationTitle(info.id),\n trigger: null,\n pr_number: [],\n agent_kind: isAcp ? \"acp\" : \"openhands\",\n acp_server: acpServer,\n tags: info.tags ?? null,\n launched_agent_profile: info.launched_agent_profile ?? null,\n // Chip path: omit ``providerDefault`` so that when no concrete model\n // resolves, the chip falls back to the provider display name in\n // ConversationCardFooter rather than a registry default the session may\n // not actually be running.\n llm_model: isAcp\n ? resolveEffectiveAcpModel({\n runtimeName: info.current_model_name,\n runtimeId: info.current_model_id,\n configured: info.agent?.acp_model,\n sdkLlm: info.agent?.llm?.model,\n })\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\n metrics: info.metrics\n ? {\n accumulated_cost: info.metrics.accumulated_cost ?? null,\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\n accumulated_token_usage: info.metrics.accumulated_token_usage\n ? {\n prompt_tokens:\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\n completion_tokens:\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\n cache_read_tokens:\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\n cache_write_tokens:\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\n context_window:\n info.metrics.accumulated_token_usage.context_window ?? 0,\n per_turn_token:\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\n }\n : null,\n }\n : null,\n created_at: info.created_at,\n updated_at: info.updated_at,\n execution_status:\n (info.execution_status as AppConversation[\"execution_status\"]) ??\n ExecutionStatus.IDLE,\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\n conversation_url: toConversationUrl(info.id),\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\n sandbox_id: null,\n workspace: {\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\n },\n public: false,\n sub_conversation_ids: [],\n };\n}\n\nexport function toConversationPage(data: {\n items: DirectConversationInfo[];\n next_page_id?: string | null;\n}): AppConversationPage {\n return {\n items: data.items.map(toAppConversation),\n next_page_id: data.next_page_id ?? null,\n };\n}\n\ntype SettingsRecord = Record<string, unknown>;\n\ninterface AgentToolSpec {\n name: string;\n params: SettingsRecord;\n}\n\ntype AgentSettingsPayload = SettingsRecord & {\n llm?: SettingsRecord;\n agent_context: SettingsRecord;\n tools?: AgentToolSpec[];\n};\n\ninterface LocalWorkspacePayload {\n kind: \"LocalWorkspace\";\n working_dir: string;\n}\n\ninterface InitialMessagePayload {\n role: \"user\";\n content: Array<{ type: \"text\"; text: string }>;\n run: true;\n}\n\ntype ConversationSettingsPayload = SettingsRecord & {\n workspace: LocalWorkspacePayload;\n initial_message?: InitialMessagePayload;\n};\n\nexport const ACP_SERVER_TAG_KEY = \"acpserver\";\n\n/**\n * Conversation tag keys Canvas itself stamps/consumes for internal routing.\n * They are already surfaced through dedicated UI (the ACP provider chip), so\n * the generic tag-chip display filters them out.\n */\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\n ACP_SERVER_TAG_KEY,\n]);\n\n/**\n * User-facing subset of a conversation's server-side tags: everything except\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries\n * sorted by key so chip order doesn't shuffle between refetches.\n */\nexport function getDisplayConversationTags(\n tags: Record<string, string> | null | undefined,\n): Array<[string, string]> {\n if (!tags) {\n return [];\n }\n return Object.entries(tags)\n .filter(([key]) => !RESERVED_CONVERSATION_TAG_KEYS.has(key))\n .sort(([a], [b]) => a.localeCompare(b));\n}\n\nconst FERNET_TOKEN_PREFIX = \"gAAAAA\";\n\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\n \"schema_version\",\n \"agent_settings\",\n \"workspace\",\n \"conversation_id\",\n \"initial_message\",\n \"plugins\",\n]);\n\nfunction toRecord(value: unknown): SettingsRecord {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n\n return structuredClone(value as SettingsRecord);\n}\n\nfunction normalizeSecretString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction hasEncryptedString(value: unknown): boolean {\n if (typeof value === \"string\") {\n return value.startsWith(FERNET_TOKEN_PREFIX);\n }\n if (Array.isArray(value)) {\n return value.some(hasEncryptedString);\n }\n if (isPlainRecord(value)) {\n return Object.values(value).some(hasEncryptedString);\n }\n return false;\n}\n\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\n if (!isPlainRecord(mcpConfig)) {\n return false;\n }\n\n return Object.values(mcpConfig).some(hasEncryptedString);\n}\n\nfunction getConversationConfirmationPolicy(\n conversationSettings: SettingsRecord,\n) {\n if (conversationSettings.confirmation_mode !== true) {\n return { kind: \"NeverConfirm\" };\n }\n\n if (conversationSettings.security_analyzer === \"llm\") {\n return { kind: \"ConfirmRisky\", threshold: \"HIGH\", confirm_unknown: true };\n }\n\n return { kind: \"AlwaysConfirm\" };\n}\n\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\n switch (conversationSettings.security_analyzer) {\n case \"llm\":\n return { kind: \"LLMSecurityAnalyzer\" };\n case \"pattern\":\n return { kind: \"PatternSecurityAnalyzer\" };\n case \"policy_rail\":\n return { kind: \"PolicyRailSecurityAnalyzer\" };\n default:\n return undefined;\n }\n}\n\nfunction isToolRecord(\n value: unknown,\n): value is { name: string; params?: unknown } {\n return (\n !!value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n typeof (value as { name?: unknown }).name === \"string\"\n );\n}\n\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\n if (name === BROWSER_TOOL_SET_NAME) {\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\n }\n\n if (name === TASK_TOOL_SET_NAME) {\n return (\n agentSettings.enable_sub_agents === true &&\n isAgentServerToolAvailable(name)\n );\n }\n\n return true;\n}\n\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\n const tools = new Map<string, AgentToolSpec>();\n\n for (const name of DEFAULT_TOOL_NAMES) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n const configuredTools = agentSettings.tools;\n if (\n Array.isArray(configuredTools) &&\n configuredTools.every((tool) => isToolRecord(tool))\n ) {\n for (const tool of configuredTools) {\n if (shouldIncludeTool(tool.name, agentSettings)) {\n tools.set(tool.name, {\n name: tool.name,\n params: toRecord(tool.params),\n });\n }\n }\n }\n\n return Array.from(tools.values());\n}\n\nfunction buildInitialMessage(\n query?: string,\n conversationInstructions?: string,\n): InitialMessagePayload | null {\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\n Boolean,\n );\n if (parts.length === 0) {\n return null;\n }\n\n return {\n role: \"user\",\n content: [{ type: \"text\", text: parts.join(\"\\n\\n\") }],\n run: true,\n };\n}\n\n/**\n * Shape of a bundled skill entry passed to the agent-server SDK via\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\n * the server uses for trigger matching, activation, and system-prompt\n * injection.\n */\ninterface BundledSkill {\n name: string;\n content: string;\n trigger: { type: \"keyword\"; keywords: string[] } | null;\n source: string;\n description: string | null;\n is_agentskills_format: true;\n license?: string;\n compatibility?: string;\n}\n\n/**\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\n * shape so the agent-server can perform trigger matching, skill activation,\n * and system-prompt injection without cloning the extensions repo.\n *\n * The SDK discriminates triggers via `{ type: \"keyword\", keywords: [...] }`.\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\n */\nfunction buildBundledSkills(): BundledSkill[] {\n return SKILLS_CATALOG.map((entry) => {\n const trigger: BundledSkill[\"trigger\"] =\n entry.triggers?.length > 0\n ? { type: \"keyword\", keywords: entry.triggers }\n : null;\n\n // Use the absolute path to the skill's SKILL.md so the Python\n // agent-server can resolve bundled resources (scripts/, references/).\n // Falls back to \"public\" in library builds where the path isn't known.\n const source = __EXTENSIONS_SKILLS_DIR__\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\n : \"public\";\n\n return {\n name: entry.name,\n content: entry.content,\n trigger,\n source,\n description: entry.description ?? null,\n is_agentskills_format: true as const,\n ...(entry.license ? { license: entry.license } : {}),\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\n };\n });\n}\n\nfunction buildAgentContext(\n agentSettings: SettingsRecord,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n disabledSkills: string[] = [],\n): SettingsRecord {\n const runtimeServicesSuffix =\n buildRuntimeServicesSystemSuffix(runtimeServicesInfo);\n const existingContext = toRecord(agentSettings.agent_context);\n\n // Merge bundled public skills with any skills already present in the\n // agent context (e.g. user-defined skills set via the settings API).\n const existingSkills = Array.isArray(existingContext.skills)\n ? (existingContext.skills as SettingsRecord[])\n : [];\n const disabledSkillNames = new Set(disabledSkills);\n const mergedSkills = [...existingSkills, ...buildBundledSkills()].filter(\n (skill) =>\n typeof skill.name !== \"string\" || !disabledSkillNames.has(skill.name),\n );\n\n return {\n ...existingContext,\n // Public skills are bundled at build time from the @openhands/extensions\n // npm package and passed directly in agent_context.skills. Setting\n // load_public_skills to false tells the agent-server SDK to skip its own\n // extensions-repo clone — the frontend is the sole source of public\n // skills now.\n //\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\n // because bundled skills have no clone latency. Users who previously set\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\n skills: mergedSkills,\n load_public_skills: false,\n load_user_skills: true,\n load_project_skills: true,\n ...(runtimeServicesSuffix\n ? { system_message_suffix: runtimeServicesSuffix }\n : {}),\n };\n}\n\nfunction isAcpAgent(settings: Settings): boolean {\n const agentSettings = toRecord(settings.agent_settings);\n return agentSettings.agent_kind === \"acp\";\n}\n\nfunction getAcpServerTag(settings: Settings): string | undefined {\n const agentSettings = toRecord(settings.agent_settings);\n const value = agentSettings.acp_server;\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\n const cmd = agentSettings.acp_command;\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\n const noCommand = cmd === undefined;\n if (!isEmpty && !noCommand) {\n return cmd;\n }\n\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const provider = getAcpProvider(serverKey);\n return provider ? [...provider.default_command] : cmd;\n}\n\nfunction buildConfiguredAcpAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const payload: AgentSettingsPayload = {\n agent_kind: \"acp\",\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n };\n\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\n // backend so concurrent same-provider conversations don't race on a shared\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\n\n for (const key of ACP_SETTINGS_KEYS) {\n // ``acp_model`` is resolved separately below so a saved ``null`` still\n // falls back to the provider's default rather than being dropped.\n if (key === \"acp_model\") continue;\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\n if (key === \"acp_env\") continue;\n const value =\n key === \"acp_command\"\n ? resolveAcpCommand(agentSettings)\n : agentSettings[key];\n if (value !== undefined && value !== null) {\n payload[key] = value;\n }\n }\n\n // ``mcp_config`` is a shared field (not in ACP_SETTINGS_KEYS): forward it\n // so the ACP subprocess connects to the configured MCP servers at session\n // creation. Only include it when it actually carries servers — an empty or\n // malformed value is dropped rather than sending ``mcp_config: {}``.\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length > 0) {\n payload.mcp_config = mcpConfig;\n }\n\n // Saved settings may carry ``acp_model: null`` (existing users predating\n // the default-model registry, or saved fields the agent-server stripped).\n // Fall back to the *preferred* default (Vertex-safe for Gemini) so the\n // conversation starts with whatever the Settings → Agent UI shows — without\n // that, the form's displayed default would silently not take effect at\n // runtime until the user re-saved the page.\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const effectiveModel = resolveEffectiveAcpModel({\n configured: agentSettings.acp_model as string | null | undefined,\n providerDefault: getAcpPreferredDefaultModel(serverKey),\n });\n if (effectiveModel) {\n payload.acp_model = effectiveModel;\n }\n\n return payload;\n}\n\nfunction buildConfiguredOpenHandsAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const llm = toRecord(agentSettings.llm);\n\n llm.model =\n typeof llm.model === \"string\" && llm.model.trim().length > 0\n ? llm.model\n : DEFAULT_SETTINGS.llm_model;\n\n // Stream assistant tokens (parity with ACP agents). The agent-server only\n // emits StreamingDeltaEvents for SDK LLM agents when an LLM has stream=True.\n llm.stream = true;\n\n const apiKey = normalizeSecretString(llm.api_key);\n if (apiKey) {\n llm.api_key = apiKey;\n } else {\n delete llm.api_key;\n }\n\n const baseUrl = normalizeSecretString(llm.base_url);\n if (baseUrl) {\n llm.base_url = baseUrl;\n } else {\n delete llm.base_url;\n }\n\n if (isSubscriptionLlmConfig(llm)) {\n llm.auth_type = LLM_AUTH_TYPE_SUBSCRIPTION;\n llm.subscription_vendor = OPENAI_SUBSCRIPTION_VENDOR;\n delete llm.api_key;\n delete llm.base_url;\n } else {\n delete llm.auth_type;\n delete llm.subscription_vendor;\n }\n\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length === 0) {\n delete agentSettings.mcp_config;\n }\n\n delete agentSettings.acp_server;\n for (const key of ACP_SETTINGS_KEYS) {\n delete agentSettings[key];\n }\n // ``acp_env`` is no longer a forwarded ACP setting (provider creds ride the\n // Secrets panel), but a legacy value may linger on persisted settings —\n // scrub it so it never leaks onto the OpenHands payload.\n delete agentSettings.acp_env;\n\n return {\n ...agentSettings,\n llm,\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n tools: getAgentTools(agentSettings),\n };\n}\n\nfunction buildConfiguredAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n return isAcpAgent(settings)\n ? buildConfiguredAcpAgentSettings(settings, runtimeServicesInfo)\n : buildConfiguredOpenHandsAgentSettings(settings, runtimeServicesInfo);\n}\n\nfunction buildConfiguredConversationSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n workingDir?: string;\n}): ConversationSettingsPayload {\n const { settings, query, conversationInstructions, plugins, workingDir } =\n options;\n const conversationSettings = toRecord(settings.conversation_settings);\n const initialMessage = buildInitialMessage(query, conversationInstructions);\n\n CONVERSATION_SETTINGS_METADATA_KEYS.forEach(\n (key) => delete conversationSettings[key],\n );\n\n const payload: ConversationSettingsPayload = {\n ...conversationSettings,\n workspace: {\n kind: \"LocalWorkspace\",\n working_dir: workingDir ?? getAgentServerWorkingDir(),\n },\n ...(initialMessage ? { initial_message: initialMessage } : {}),\n ...(plugins?.length\n ? {\n plugins: plugins.map((plugin) => ({\n source: plugin.source,\n ...(plugin.ref ? { ref: plugin.ref } : {}),\n ...(plugin.repo_path ? { repo_path: plugin.repo_path } : {}),\n })),\n }\n : {}),\n };\n\n return payload;\n}\n\ninterface LookupSecret {\n kind: \"LookupSecret\";\n url: string;\n headers?: Record<string, string>;\n description?: string;\n}\n\ntype StartConversationPayload = Record<string, unknown> & {\n // Omitted when launching via ``agent_profile_id`` — the two are mutually\n // exclusive agent sources; the server resolves the profile server-side.\n agent_settings?: AgentSettingsPayload;\n agent_profile_id?: string;\n workspace: LocalWorkspacePayload;\n confirmation_policy: SettingsRecord;\n security_analyzer?: SettingsRecord;\n initial_message?: InitialMessagePayload;\n max_iterations: number;\n stuck_detection: true;\n autotitle: true;\n title_llm_profile?: string;\n worktree: boolean;\n secrets_encrypted?: true;\n conversation_id?: string;\n secrets?: Record<string, LookupSecret>;\n tags?: Record<string, string>;\n client_tools: ClientToolSpec[];\n tool_module_qualnames?: Record<string, string>;\n};\n\nexport interface StartConversationOptions {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n encryptedAgentSettings?: Record<string, SettingsValue>;\n encryptedConversationSettings?: Record<string, SettingsValue>;\n secretsEncrypted?: boolean;\n customSecrets?: Array<{ name: string; description?: string }>;\n // When set, the conversation launches from this AgentProfile (resolved\n // server-side) instead of an inline ``agent_settings`` dump (#3727).\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n runtimeServicesInfo?: RuntimeServicesInfo | null;\n}\n\nexport function buildStartConversationRequest(\n options: StartConversationOptions,\n): StartConversationPayload {\n const sourceAgentSettings = options.encryptedAgentSettings\n ? { ...options.settings, agent_settings: options.encryptedAgentSettings }\n : options.settings;\n\n const acpMode = isAcpAgent(sourceAgentSettings);\n const launchAgentKind = options.agentProfileId\n ? options.agentProfileKind\n : acpMode\n ? \"acp\"\n : \"openhands\";\n const agentSettings = buildConfiguredAgentSettings(\n sourceAgentSettings,\n options.runtimeServicesInfo,\n );\n const acpServerTag = acpMode\n ? getAcpServerTag(sourceAgentSettings)\n : undefined;\n\n const sourceConversationOptions = options.encryptedConversationSettings\n ? {\n ...options,\n settings: {\n ...options.settings,\n conversation_settings: options.encryptedConversationSettings,\n },\n }\n : options;\n\n const conversationSettings = buildConfiguredConversationSettings(\n sourceConversationOptions,\n );\n\n const payload: StartConversationPayload = {\n // ``agent_profile_id`` and ``agent_settings`` are mutually exclusive agent\n // sources; the profile path lets the server resolve the profile (#3727).\n //\n // Enrichment boundary: on the profile path the server rebuilds the agent\n // purely from the stored profile fields, so the client-owned enrichments\n // this adapter folds into ``agent_settings`` do NOT apply. The exec toolset\n // (terminal/file_editor/task_tracker) and public-skill loading are the\n // server/SDK's responsibility to restore on the profile path — tracked in\n // software-agent-sdk#3967 (profile resolution must attach the default\n // toolset + public skills, else a profile-launched OpenHands agent has only\n // Finish/Think). The dev ``RUNTIME_SERVICES`` system-message suffix remains\n // agent-settings-only; the Canvas UI tool is a top-level client tool and\n // therefore works on both inline-agent and profile launch paths.\n //\n // Persistent memory is NOT on that boundary: ``load_memory`` is a global\n // user preference, so the agent-server stamps the stored\n // ``agent_settings.agent_context.load_memory`` onto the profile-resolved\n // agent the same way it already applies the global ``mcp_config``. The\n // toggle therefore applies to both launch paths, and the client must not\n // re-send it here (``agent_profile_id`` and ``agent_settings`` are\n // mutually exclusive).\n ...(options.agentProfileId\n ? { agent_profile_id: options.agentProfileId }\n : { agent_settings: agentSettings }),\n workspace: conversationSettings.workspace,\n client_tools:\n launchAgentKind === \"openhands\" ? [CANVAS_UI_CLIENT_TOOL] : [],\n confirmation_policy:\n getConversationConfirmationPolicy(conversationSettings),\n max_iterations:\n typeof conversationSettings.max_iterations === \"number\"\n ? conversationSettings.max_iterations\n : 500,\n stuck_detection: true,\n autotitle: true,\n ...(options.titleLlmProfile\n ? { title_llm_profile: options.titleLlmProfile }\n : {}),\n worktree: options.worktree ?? true,\n };\n\n // A profile launch resolves the ACP server server-side, so don't stamp the\n // tag from current settings (it may not match the launched profile).\n if (!options.agentProfileId && acpServerTag) {\n payload.tags = { [ACP_SERVER_TAG_KEY]: acpServerTag };\n }\n\n // ``secrets_encrypted`` makes the agent-server decrypt request secrets at\n // conversation start. Non-ACP conversations need it for encrypted LLM keys.\n // ACP normally carries provider credentials as LookupSecrets, so avoid\n // forcing a cipher on fresh ACP-only backends. The exception is MCP:\n // encrypted settings round-trip mcp_config secrets as Fernet tokens,\n // and ACP forwards mcp_config directly to the subprocess.\n if (\n !options.agentProfileId &&\n options.secretsEncrypted &&\n (!acpMode || hasEncryptedMcpSecrets(agentSettings.mcp_config))\n ) {\n payload.secrets_encrypted = true;\n }\n\n if (options.conversationId) {\n payload.conversation_id = options.conversationId;\n }\n\n const securityAnalyzer =\n getConversationSecurityAnalyzer(conversationSettings);\n if (securityAnalyzer) {\n payload.security_analyzer = securityAnalyzer;\n }\n\n if (conversationSettings.initial_message) {\n payload.initial_message = conversationSettings.initial_message;\n }\n\n if (conversationSettings.plugins) {\n payload.plugins = conversationSettings.plugins;\n }\n\n if (conversationSettings.hook_config) {\n payload.hook_config = conversationSettings.hook_config;\n }\n\n const toolModuleQualnames = {\n ...((conversationSettings.tool_module_qualnames as\n | Record<string, string>\n | undefined) ?? {}),\n };\n delete toolModuleQualnames[LEGACY_CANVAS_UI_TOOL_NAME];\n delete toolModuleQualnames[CANVAS_UI_CLIENT_TOOL_NAME];\n if (Object.keys(toolModuleQualnames).length > 0) {\n payload.tool_module_qualnames = toolModuleQualnames;\n }\n\n if (conversationSettings.agent_definitions) {\n payload.agent_definitions = conversationSettings.agent_definitions;\n }\n\n // Every saved secret rides as a LookupSecret the agent-server resolves back\n // from its own store at spawn time — ``request.secrets`` is the sole channel,\n // uniform for ACP and non-ACP (agent-canvas#1039). For ACP the resolution\n // runs off the event loop (software-agent-sdk#3510, >=1.25.0), so the loopback\n // fetch can't deadlock.\n if (options.customSecrets && options.customSecrets.length > 0) {\n const backend = getEffectiveLocalBackend();\n const headers = backend ? buildAuthHeaders(backend) : {};\n\n const secrets: Record<string, LookupSecret> = {};\n for (const secret of options.customSecrets) {\n const lookupSecret: LookupSecret = {\n kind: \"LookupSecret\",\n url: `/api/settings/secrets/${encodeURIComponent(secret.name)}`,\n description: secret.description,\n };\n\n if (Object.keys(headers).length > 0) {\n lookupSecret.headers = headers;\n }\n\n secrets[secret.name] = lookupSecret;\n }\n\n payload.secrets = secrets;\n }\n\n return payload;\n}\n\nexport const SUBSCRIPTION_LOGIN_REQUIRED_ERROR =\n \"Connect your ChatGPT subscription before starting a conversation with this LLM profile.\";\n\n/**\n * Throws if a ChatGPT subscription LLM profile is not connected.\n * Called before conversation creation and LLM profile switch only — not on\n * subsequent message sends or conversation resume. The agent-server must handle\n * mid-conversation token expiry gracefully.\n */\nexport async function assertSubscriptionAuthReady(\n agentSettings: Record<string, unknown>,\n): Promise<void> {\n const llm = toRecord(agentSettings.llm);\n if (!isSubscriptionLlmConfig(llm)) return;\n\n const status = await LLMSubscriptionService.getOpenAIStatus();\n if (!status.connected) {\n throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR);\n }\n}\n\nexport async function buildStartConversationRequestWithEncryptedSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n}): Promise<Record<string, unknown>> {\n const { SecretsService } = await import(\"./secrets-service\");\n\n const [settingsResult, customSecrets, runtimeServicesInfo] =\n await Promise.all([\n SettingsService.getSettingsForConversation(),\n SecretsService.getSecrets(),\n fetchBackendRuntimeServicesInfo(),\n ]);\n\n const { agentSettings, conversationSettings, secretsEncrypted } =\n settingsResult;\n\n // A profile launch resolves the LLM server-side, so the current-settings\n // subscription check doesn't apply (and can't see the profile's LLM).\n if (!options.agentProfileId) {\n await assertSubscriptionAuthReady(agentSettings);\n }\n\n return buildStartConversationRequest({\n ...options,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: conversationSettings,\n secretsEncrypted,\n customSecrets,\n runtimeServicesInfo,\n });\n}\n\nexport function emptyHooksResponse(): GetHooksResponse {\n return { hooks: [] };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoGA,IAAM,IAAqB;CAAC;CAAY;CAAe;AAAc,GAC/D,IAAwB,oBACxB,IAAqB;AAE3B,SAAS,IAAsB;CAC7B,OAAO;AACT;AAkCA,SAAgB,EACd,GAC4B;CAC5B,IAAI,OAAO,KAAU,UAAU;EAC7B,IAAM,IAAM,EAAM,KAAK;EACvB,IAAI,CAAC,GAAK,OAAO;EACjB,IAAI;GACF,OAAO,EAAyB,KAAK,MAAM,CAAG,CAAC;EACjD,QAAQ;GACN,OAAO;EACT;CACF;CAEA,IAAI,CAAC,KAAS,OAAO,KAAU,YAAY,MAAM,QAAQ,CAAK,GAC5D,OAAO;CAGT,IAAM,IAAS;CAEf,OADI,CAAC,EAAO,YAAY,OAAO,EAAO,YAAa,WAAiB,OAC7D;AACT;AAEA,eAAsB,IAAuE;CAC3F,IAAI;CACJ,IAAI;EACF,IAAgB,EAA4B,EAAE,SAAS,IAAK,CAAC;C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,GAAG;EACH,wBAAwB;EACxB,+BAA+B;EAC/B;EACA;EACA;CACF,CAAC;AACH;AAEA,SAAgB,KAAuC;CACrD,OAAO,EAAE,OAAO,CAAC,EAAE;AACrB"}
|
|
1
|
+
{"version":3,"file":"agent-server-adapter.js","names":[],"sources":["../../src/api/agent-server-adapter.ts"],"sourcesContent":["import { ACP_SETTINGS_KEYS } from \"@openhands/typescript-client\";\nimport { ServerClient } from \"@openhands/typescript-client/clients\";\nimport { SKILLS_CATALOG } from \"@openhands/extensions/skills\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { ExecutionStatus } from \"#/types/agent-server/core\";\nimport { AgentKind, Settings, SettingsValue } from \"#/types/settings\";\nimport {\n getAcpPreferredDefaultModel,\n getAcpProvider,\n resolveEffectiveAcpModel,\n} from \"#/constants/acp-providers\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport {\n getCachedAgentServerInfo,\n isAgentServerToolAvailable,\n} from \"./agent-server-compatibility\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getEffectiveLocalBackend } from \"./backend-registry/active-store\";\nimport { buildAuthHeaders } from \"./backend-registry/auth\";\nimport {\n GetHooksResponse,\n PluginSpec,\n AppConversation,\n AppConversationPage,\n SandboxStatus,\n} from \"./conversation-service/agent-server-conversation-service.types\";\nimport SettingsService from \"./settings-service/settings-service.api\";\nimport { getStoredConversationMetadata } from \"./conversation-metadata-store\";\nimport LLMSubscriptionService from \"./llm-subscription-service\";\nimport {\n LLM_AUTH_TYPE_SUBSCRIPTION,\n OPENAI_SUBSCRIPTION_VENDOR,\n isSubscriptionLlmConfig,\n} from \"#/constants/llm-subscription\";\nimport {\n CANVAS_UI_CLIENT_TOOL,\n CANVAS_UI_CLIENT_TOOL_NAME,\n LEGACY_CANVAS_UI_TOOL_NAME,\n type ClientToolSpec,\n} from \"./canvas-ui-client-tool\";\nimport {\n LAUNCH_CHILD_CONVERSATION_CLIENT_TOOL,\n LAUNCH_CHILD_CONVERSATION_TOOL_NAME,\n} from \"./launch-child-conversation-client-tool\";\n\nexport interface DirectConversationInfo {\n id: string;\n title?: string | null;\n created_at: string;\n updated_at: string;\n execution_status?: string | null;\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\n sandbox_status?: string | null;\n metrics?: {\n accumulated_cost?: number | null;\n max_budget_per_task?: number | null;\n accumulated_token_usage?: {\n prompt_tokens?: number;\n completion_tokens?: number;\n cache_read_tokens?: number;\n cache_write_tokens?: number;\n context_window?: number;\n per_turn_token?: number;\n } | null;\n } | null;\n agent?: {\n /**\n * Pydantic discriminator from the SDK union: ``\"ACPAgent\"`` for ACP CLI\n * subprocesses (model lives on the subprocess via ``acp_model``),\n * ``\"Agent\"`` for direct litellm. Read by {@link toAppConversation}.\n */\n kind?: string | null;\n acp_model?: string | null;\n /**\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\n */\n acp_server?: string | null;\n llm?: {\n model?: string | null;\n } | null;\n } | null;\n current_model_id?: string | null;\n current_model_name?: string | null;\n workspace?: {\n working_dir?: string | null;\n } | null;\n /**\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\n * ``ACP_SERVER_TAG_KEY`` (\"acpserver\") — but the field is typed as a\n * generic record so future readers don't need another wire-shape change.\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\n * values are opaque strings.\n */\n tags?: Record<string, string> | null;\n launched_agent_profile?: {\n agent_profile_id: string;\n revision: number;\n } | null;\n}\n\nconst DEFAULT_TOOL_NAMES = [\"terminal\", \"file_editor\", \"task_tracker\"];\nconst BROWSER_TOOL_SET_NAME = \"browser_tool_set\";\nconst TASK_TOOL_SET_NAME = \"task_tool_set\";\n\nfunction browserToolsEnabled() {\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \"false\";\n}\n\n/**\n * Shape of the runtime services info served by Agent Canvas backends in\n * `/server_info.runtime_services`. All URLs are written from the agent's point of\n * view, not the browser's. The block is rendered into the agent's system prompt\n * via `AgentContext.system_message_suffix` so the agent knows what's reachable\n * from inside its sandbox without having to probe.\n */\nexport interface RuntimeServicesInfo {\n mode?: string;\n agent_host_alias?: string;\n services?: {\n agent_server?: { description?: string; url_from_agent?: string };\n ingress?: { description?: string; url_from_agent?: string };\n frontend?: {\n kind?: \"vite\" | \"static\";\n description?: string;\n url_from_agent?: string;\n };\n // `vite` is the legacy key name for the frontend entry, accepted for\n // one release while older dev-stack launchers may still emit it.\n vite?: { description?: string; url_from_agent?: string };\n automation?: {\n description?: string;\n url_from_agent?: string;\n api_prefix?: string;\n docs_url?: string;\n openapi_url?: string;\n auth_env_var?: string;\n };\n };\n}\n\nexport function parseRuntimeServicesInfo(\n value: unknown,\n): RuntimeServicesInfo | null {\n if (typeof value === \"string\") {\n const raw = value.trim();\n if (!raw) return null;\n try {\n return parseRuntimeServicesInfo(JSON.parse(raw));\n } catch {\n return null;\n }\n }\n\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n\n const parsed = value as RuntimeServicesInfo;\n if (!parsed.services || typeof parsed.services !== \"object\") return null;\n return parsed;\n}\n\nexport async function fetchBackendRuntimeServicesInfo(): Promise<RuntimeServicesInfo | null> {\n let clientOptions: ReturnType<typeof getAgentServerClientOptions>;\n try {\n clientOptions = getAgentServerClientOptions({ timeout: 3000 });\n } catch {\n return null;\n }\n\n const cached = parseRuntimeServicesInfo(\n getCachedAgentServerInfo({ host: clientOptions.host })?.runtime_services,\n );\n if (cached) return cached;\n\n try {\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n return parseRuntimeServicesInfo(\n (serverInfo as { runtime_services?: unknown }).runtime_services,\n );\n } catch {\n return null;\n }\n}\n\n/**\n * Return the deployment mode from the runtime services info, e.g. \"docker\",\n * \"dev:automation\", etc. Returns `null` when no runtime info is supplied.\n */\nexport function getDeploymentMode(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | null {\n return runtimeServicesInfo?.mode ?? null;\n}\n\n/**\n * Render the runtime services info into a markdown block suitable for\n * appending to the system prompt via `AgentContext.system_message_suffix`.\n *\n * Returns `undefined` when no runtime info is available, so callers can safely\n * omit the field when the selected backend does not advertise runtime services.\n */\nexport function buildRuntimeServicesSystemSuffix(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | undefined {\n const info = parseRuntimeServicesInfo(runtimeServicesInfo);\n if (!info?.services) return undefined;\n\n const lines: string[] = [];\n lines.push(\"<RUNTIME_SERVICES>\");\n if (info.mode) {\n lines.push(\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\n );\n } else {\n lines.push(\"You are running inside an agent-canvas dev stack.\");\n }\n lines.push(\n \"The following services are reachable from your sandbox. URLs are written\",\n \"from your point of view (i.e., as you should curl/fetch them).\",\n \"\",\n );\n\n const { agent_server, ingress, automation } = info.services;\n const { frontend } = info.services;\n\n if (agent_server?.url_from_agent) {\n lines.push(\n `* Agent Server (you): ${agent_server.url_from_agent}`,\n ` ${agent_server.description ?? \"The agent-server hosting your tool calls.\"}`,\n );\n }\n if (ingress?.url_from_agent) {\n lines.push(\n `* Ingress: ${ingress.url_from_agent}`,\n ` ${ingress.description ?? \"Unified entry point for browser-facing traffic.\"}`,\n );\n }\n if (frontend?.url_from_agent) {\n lines.push(\n `* Frontend: ${frontend.url_from_agent}`,\n ` ${frontend.description ?? \"Frontend dev server.\"}`,\n );\n }\n if (automation?.url_from_agent) {\n lines.push(\n `* Automation backend: ${automation.url_from_agent}`,\n ` ${automation.description ?? \"OpenHands Automations service.\"}`,\n );\n if (automation.docs_url) {\n lines.push(` Docs: ${automation.docs_url}`);\n }\n if (automation.openapi_url) {\n lines.push(` OpenAPI: ${automation.openapi_url}`);\n }\n if (automation.auth_env_var) {\n // X-Session-API-Key is the local convention shared by the agent-server\n // and automation backend (see openhands-automation auth.py).\n lines.push(\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\n );\n }\n } else {\n lines.push(\n \"* Automation backend: not running in this dev mode (skip /api/automation calls).\",\n );\n }\n\n // Anchor the \"don't guess\" warning to the actual agent-server URL for\n // this stack instead of a hardcoded port. The agent-server listens on\n // different ports across dev modes, and baking the wrong port into the\n // system prompt is exactly the kind of confusion this block is meant to\n // prevent.\n const agentServerUrl = agent_server?.url_from_agent;\n lines.push(\n \"\",\n \"Trust this block over guessing: do not assume any other URLs are running.\",\n );\n if (agentServerUrl) {\n lines.push(\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\n \"you are running inside of — NOT the automation backend.\",\n );\n }\n lines.push(\"</RUNTIME_SERVICES>\");\n\n return lines.join(\"\\n\");\n}\n\nexport function toConversationUrl(conversationId: string): string {\n // Local-format conversation URL — points at whichever local agent-server\n // is actually serving the conversation (the bundled one when the active\n // selection is cloud).\n const { host } = getAgentServerClientOptions();\n return `${host}/api/conversations/${conversationId}`;\n}\n\n// TODO(i18n): extract \"Conversation\" once we add CONVERSATION$DEFAULT_TITLE\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\n// fallback inside this pure adapter rather than fanning out to display sites.\nexport function getDefaultConversationTitle(conversationId: string): string {\n return `Conversation ${conversationId.slice(0, 5)}`;\n}\n\nexport function toAppConversation(\n info: DirectConversationInfo,\n): AppConversation {\n const metadata = getStoredConversationMetadata(info.id);\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\n // runtime model fields when available, then the configured ``acp_model`` that\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\n // switching, so surfacing this string is display-only.\n const isAcp = info.agent?.kind === \"ACPAgent\";\n // Only surface ``acp_server`` for ACP conversations even if the wire\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\n // conversation — the chip is identity info for the ACP CLI subprocess,\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\n // picker and degrade the chip to a generic \"ACP\" (#1571).\n const acpServer = isAcp\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\n : null;\n return {\n id: info.id,\n created_by_user_id: null,\n selected_repository: metadata?.selected_repository ?? null,\n selected_branch: metadata?.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? null,\n selected_workspace: metadata?.selected_workspace ?? null,\n active_profile: metadata?.active_profile ?? null,\n title: info.title?.trim()\n ? info.title\n : getDefaultConversationTitle(info.id),\n trigger: null,\n pr_number: [],\n agent_kind: isAcp ? \"acp\" : \"openhands\",\n acp_server: acpServer,\n tags: info.tags ?? null,\n launched_agent_profile: info.launched_agent_profile ?? null,\n // Chip path: omit ``providerDefault`` so that when no concrete model\n // resolves, the chip falls back to the provider display name in\n // ConversationCardFooter rather than a registry default the session may\n // not actually be running.\n llm_model: isAcp\n ? resolveEffectiveAcpModel({\n runtimeName: info.current_model_name,\n runtimeId: info.current_model_id,\n configured: info.agent?.acp_model,\n sdkLlm: info.agent?.llm?.model,\n })\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\n metrics: info.metrics\n ? {\n accumulated_cost: info.metrics.accumulated_cost ?? null,\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\n accumulated_token_usage: info.metrics.accumulated_token_usage\n ? {\n prompt_tokens:\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\n completion_tokens:\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\n cache_read_tokens:\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\n cache_write_tokens:\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\n context_window:\n info.metrics.accumulated_token_usage.context_window ?? 0,\n per_turn_token:\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\n }\n : null,\n }\n : null,\n created_at: info.created_at,\n updated_at: info.updated_at,\n execution_status:\n (info.execution_status as AppConversation[\"execution_status\"]) ??\n ExecutionStatus.IDLE,\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\n conversation_url: toConversationUrl(info.id),\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\n sandbox_id: null,\n workspace: {\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\n },\n public: false,\n sub_conversation_ids: [],\n };\n}\n\nexport function toConversationPage(data: {\n items: DirectConversationInfo[];\n next_page_id?: string | null;\n}): AppConversationPage {\n return {\n items: data.items.map(toAppConversation),\n next_page_id: data.next_page_id ?? null,\n };\n}\n\ntype SettingsRecord = Record<string, unknown>;\n\ninterface AgentToolSpec {\n name: string;\n params: SettingsRecord;\n}\n\ntype AgentSettingsPayload = SettingsRecord & {\n llm?: SettingsRecord;\n agent_context: SettingsRecord;\n tools?: AgentToolSpec[];\n};\n\ninterface LocalWorkspacePayload {\n kind: \"LocalWorkspace\";\n working_dir: string;\n}\n\ninterface InitialMessagePayload {\n role: \"user\";\n content: Array<{ type: \"text\"; text: string }>;\n run: true;\n}\n\ntype ConversationSettingsPayload = SettingsRecord & {\n workspace: LocalWorkspacePayload;\n initial_message?: InitialMessagePayload;\n};\n\nexport const ACP_SERVER_TAG_KEY = \"acpserver\";\n\nexport const AUTOMATION_TRIGGER_TAG_KEY = \"automationtrigger\";\nexport const AUTOMATION_ID_TAG_KEY = \"automationid\";\nexport const AUTOMATION_NAME_TAG_KEY = \"automationname\";\nexport const AUTOMATION_RUN_ID_TAG_KEY = \"automationrunid\";\n\n/**\n * Tag keys stamped on conversations created by automation runs (see the SDK's\n * `RemoteWorkspace.default_conversation_tags`). The presence of any of these\n * marks a conversation as automation-born.\n */\nexport const AUTOMATION_TAG_KEYS: readonly string[] = [\n AUTOMATION_TRIGGER_TAG_KEY,\n AUTOMATION_ID_TAG_KEY,\n AUTOMATION_NAME_TAG_KEY,\n AUTOMATION_RUN_ID_TAG_KEY,\n];\n\n/**\n * Conversation tag keys that must not appear as generic chips / hovercard\n * rows. Each is either already surfaced by a first-class UI source or is\n * internal routing data:\n * - ``acpserver`` → ACP provider chip\n * - ``title`` → conversation card heading\n * - git / repo / branch / workspace stamps → repo-branch metadata + directory\n * footer / hovercard rows (``selected_repository``, ``selected_branch``,\n * ``git_provider``, ``workspace.working_dir``)\n * - ``automationid`` / ``automationrunid`` → raw UUIDs consumed by the\n * conversation panel's automation filter (chip noise), while\n * ``automationname`` / ``automationtrigger`` stay visible\n */\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\n ACP_SERVER_TAG_KEY,\n AUTOMATION_ID_TAG_KEY,\n AUTOMATION_RUN_ID_TAG_KEY,\n \"title\",\n \"git_provider\",\n \"repo_name\",\n \"repo\",\n \"repository\",\n \"selected_branch\",\n \"branch\",\n \"archiveworkspacepath\",\n \"workspace\",\n \"working_dir\",\n]);\n\n/**\n * High-signal tag keys shown first in the chip row (before A–Z). Automations\n * often stamp ``origin``; remaining free-form tags sort alphabetically.\n */\nexport const PRIORITY_CONVERSATION_TAG_KEYS: readonly string[] = [\"origin\"];\n\n/**\n * User-facing subset of a conversation's server-side tags: everything except\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries.\n * Priority keys come first (in {@link PRIORITY_CONVERSATION_TAG_KEYS} order);\n * the rest sort A–Z so chip order doesn't shuffle between refetches.\n */\nexport function getDisplayConversationTags(\n tags: Record<string, string> | null | undefined,\n): Array<[string, string]> {\n if (!tags) {\n return [];\n }\n // Both the reserved-key check and the priority lookup must see the same\n // normalized key: a cloud backend can stamp ``Origin`` / `` origin``, and\n // ranking those off the raw key would silently drop them out of first place.\n const priorityRank = (key: string): number => {\n const index = PRIORITY_CONVERSATION_TAG_KEYS.indexOf(\n key.trim().toLowerCase(),\n );\n return index === -1 ? Number.POSITIVE_INFINITY : index;\n };\n\n return Object.entries(tags)\n .filter(\n ([key, value]) =>\n !RESERVED_CONVERSATION_TAG_KEYS.has(key.trim().toLowerCase()) &&\n typeof value === \"string\" &&\n value.trim().length > 0,\n )\n .sort(([a], [b]) => {\n const aRank = priorityRank(a);\n const bRank = priorityRank(b);\n if (aRank !== bRank) {\n return aRank - bRank;\n }\n return a.localeCompare(b);\n });\n}\n\nconst FERNET_TOKEN_PREFIX = \"gAAAAA\";\n\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\n \"schema_version\",\n \"agent_settings\",\n \"workspace\",\n \"conversation_id\",\n \"initial_message\",\n \"plugins\",\n]);\n\nfunction toRecord(value: unknown): SettingsRecord {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n\n return structuredClone(value as SettingsRecord);\n}\n\nfunction normalizeSecretString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction hasEncryptedString(value: unknown): boolean {\n if (typeof value === \"string\") {\n return value.startsWith(FERNET_TOKEN_PREFIX);\n }\n if (Array.isArray(value)) {\n return value.some(hasEncryptedString);\n }\n if (isPlainRecord(value)) {\n return Object.values(value).some(hasEncryptedString);\n }\n return false;\n}\n\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\n if (!isPlainRecord(mcpConfig)) {\n return false;\n }\n\n return Object.values(mcpConfig).some(hasEncryptedString);\n}\n\nfunction getConversationConfirmationPolicy(\n conversationSettings: SettingsRecord,\n) {\n if (conversationSettings.confirmation_mode !== true) {\n return { kind: \"NeverConfirm\" };\n }\n\n if (conversationSettings.security_analyzer === \"llm\") {\n return { kind: \"ConfirmRisky\", threshold: \"HIGH\", confirm_unknown: true };\n }\n\n return { kind: \"AlwaysConfirm\" };\n}\n\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\n switch (conversationSettings.security_analyzer) {\n case \"llm\":\n return { kind: \"LLMSecurityAnalyzer\" };\n case \"pattern\":\n return { kind: \"PatternSecurityAnalyzer\" };\n case \"policy_rail\":\n return { kind: \"PolicyRailSecurityAnalyzer\" };\n default:\n return undefined;\n }\n}\n\nfunction isToolRecord(\n value: unknown,\n): value is { name: string; params?: unknown } {\n return (\n !!value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n typeof (value as { name?: unknown }).name === \"string\"\n );\n}\n\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\n if (name === BROWSER_TOOL_SET_NAME) {\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\n }\n\n if (name === TASK_TOOL_SET_NAME) {\n return (\n agentSettings.enable_sub_agents === true &&\n isAgentServerToolAvailable(name)\n );\n }\n\n return true;\n}\n\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\n const tools = new Map<string, AgentToolSpec>();\n\n for (const name of DEFAULT_TOOL_NAMES) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n const configuredTools = agentSettings.tools;\n if (\n Array.isArray(configuredTools) &&\n configuredTools.every((tool) => isToolRecord(tool))\n ) {\n for (const tool of configuredTools) {\n if (shouldIncludeTool(tool.name, agentSettings)) {\n tools.set(tool.name, {\n name: tool.name,\n params: toRecord(tool.params),\n });\n }\n }\n }\n\n return Array.from(tools.values());\n}\n\nfunction buildInitialMessage(\n query?: string,\n conversationInstructions?: string,\n): InitialMessagePayload | null {\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\n Boolean,\n );\n if (parts.length === 0) {\n return null;\n }\n\n return {\n role: \"user\",\n content: [{ type: \"text\", text: parts.join(\"\\n\\n\") }],\n run: true,\n };\n}\n\n/**\n * Shape of a bundled skill entry passed to the agent-server SDK via\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\n * the server uses for trigger matching, activation, and system-prompt\n * injection.\n */\ninterface BundledSkill {\n name: string;\n content: string;\n trigger: { type: \"keyword\"; keywords: string[] } | null;\n source: string;\n description: string | null;\n is_agentskills_format: true;\n license?: string;\n compatibility?: string;\n}\n\n/**\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\n * shape so the agent-server can perform trigger matching, skill activation,\n * and system-prompt injection without cloning the extensions repo.\n *\n * The SDK discriminates triggers via `{ type: \"keyword\", keywords: [...] }`.\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\n */\nfunction buildBundledSkills(): BundledSkill[] {\n return SKILLS_CATALOG.map((entry) => {\n const trigger: BundledSkill[\"trigger\"] =\n entry.triggers?.length > 0\n ? { type: \"keyword\", keywords: entry.triggers }\n : null;\n\n // Use the absolute path to the skill's SKILL.md so the Python\n // agent-server can resolve bundled resources (scripts/, references/).\n // Falls back to \"public\" in library builds where the path isn't known.\n const source = __EXTENSIONS_SKILLS_DIR__\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\n : \"public\";\n\n return {\n name: entry.name,\n content: entry.content,\n trigger,\n source,\n description: entry.description ?? null,\n is_agentskills_format: true as const,\n ...(entry.license ? { license: entry.license } : {}),\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\n };\n });\n}\n\nfunction buildAgentContext(\n agentSettings: SettingsRecord,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n disabledSkills: string[] = [],\n): SettingsRecord {\n const runtimeServicesSuffix =\n buildRuntimeServicesSystemSuffix(runtimeServicesInfo);\n const existingContext = toRecord(agentSettings.agent_context);\n\n // Merge bundled public skills with any skills already present in the\n // agent context (e.g. user-defined skills set via the settings API).\n const existingSkills = Array.isArray(existingContext.skills)\n ? (existingContext.skills as SettingsRecord[])\n : [];\n const disabledSkillNames = new Set(disabledSkills);\n const mergedSkills = [...existingSkills, ...buildBundledSkills()].filter(\n (skill) =>\n typeof skill.name !== \"string\" || !disabledSkillNames.has(skill.name),\n );\n\n return {\n ...existingContext,\n // Public skills are bundled at build time from the @openhands/extensions\n // npm package and passed directly in agent_context.skills. Setting\n // load_public_skills to false tells the agent-server SDK to skip its own\n // extensions-repo clone — the frontend is the sole source of public\n // skills now.\n //\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\n // because bundled skills have no clone latency. Users who previously set\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\n skills: mergedSkills,\n load_public_skills: false,\n load_user_skills: true,\n load_project_skills: true,\n ...(runtimeServicesSuffix\n ? { system_message_suffix: runtimeServicesSuffix }\n : {}),\n };\n}\n\nfunction isAcpAgent(settings: Settings): boolean {\n const agentSettings = toRecord(settings.agent_settings);\n return agentSettings.agent_kind === \"acp\";\n}\n\nfunction getAcpServerTag(settings: Settings): string | undefined {\n const agentSettings = toRecord(settings.agent_settings);\n const value = agentSettings.acp_server;\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\n const cmd = agentSettings.acp_command;\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\n const noCommand = cmd === undefined;\n if (!isEmpty && !noCommand) {\n return cmd;\n }\n\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const provider = getAcpProvider(serverKey);\n return provider ? [...provider.default_command] : cmd;\n}\n\nfunction buildConfiguredAcpAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const payload: AgentSettingsPayload = {\n agent_kind: \"acp\",\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n };\n\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\n // backend so concurrent same-provider conversations don't race on a shared\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\n\n for (const key of ACP_SETTINGS_KEYS) {\n // ``acp_model`` is resolved separately below so a saved ``null`` still\n // falls back to the provider's default rather than being dropped.\n if (key === \"acp_model\") continue;\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\n if (key === \"acp_env\") continue;\n const value =\n key === \"acp_command\"\n ? resolveAcpCommand(agentSettings)\n : agentSettings[key];\n if (value !== undefined && value !== null) {\n payload[key] = value;\n }\n }\n\n // ``mcp_config`` is a shared field (not in ACP_SETTINGS_KEYS): forward it\n // so the ACP subprocess connects to the configured MCP servers at session\n // creation. Only include it when it actually carries servers — an empty or\n // malformed value is dropped rather than sending ``mcp_config: {}``.\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length > 0) {\n payload.mcp_config = mcpConfig;\n }\n\n // Saved settings may carry ``acp_model: null`` (existing users predating\n // the default-model registry, or saved fields the agent-server stripped).\n // Fall back to the *preferred* default (Vertex-safe for Gemini) so the\n // conversation starts with whatever the Settings → Agent UI shows — without\n // that, the form's displayed default would silently not take effect at\n // runtime until the user re-saved the page.\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const effectiveModel = resolveEffectiveAcpModel({\n configured: agentSettings.acp_model as string | null | undefined,\n providerDefault: getAcpPreferredDefaultModel(serverKey),\n });\n if (effectiveModel) {\n payload.acp_model = effectiveModel;\n }\n\n return payload;\n}\n\nfunction buildConfiguredOpenHandsAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const llm = toRecord(agentSettings.llm);\n\n llm.model =\n typeof llm.model === \"string\" && llm.model.trim().length > 0\n ? llm.model\n : DEFAULT_SETTINGS.llm_model;\n\n // Stream assistant tokens (parity with ACP agents). The agent-server only\n // emits StreamingDeltaEvents for SDK LLM agents when an LLM has stream=True.\n llm.stream = true;\n\n const apiKey = normalizeSecretString(llm.api_key);\n if (apiKey) {\n llm.api_key = apiKey;\n } else {\n delete llm.api_key;\n }\n\n const baseUrl = normalizeSecretString(llm.base_url);\n if (baseUrl) {\n llm.base_url = baseUrl;\n } else {\n delete llm.base_url;\n }\n\n if (isSubscriptionLlmConfig(llm)) {\n llm.auth_type = LLM_AUTH_TYPE_SUBSCRIPTION;\n llm.subscription_vendor = OPENAI_SUBSCRIPTION_VENDOR;\n delete llm.api_key;\n delete llm.base_url;\n } else {\n delete llm.auth_type;\n delete llm.subscription_vendor;\n }\n\n const mcpConfig = toRecord(agentSettings.mcp_config);\n if (Object.keys(mcpConfig).length === 0) {\n delete agentSettings.mcp_config;\n }\n\n delete agentSettings.acp_server;\n for (const key of ACP_SETTINGS_KEYS) {\n delete agentSettings[key];\n }\n // ``acp_env`` is no longer a forwarded ACP setting (provider creds ride the\n // Secrets panel), but a legacy value may linger on persisted settings —\n // scrub it so it never leaks onto the OpenHands payload.\n delete agentSettings.acp_env;\n\n return {\n ...agentSettings,\n llm,\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n settings.disabled_skills,\n ),\n tools: getAgentTools(agentSettings),\n };\n}\n\nfunction buildConfiguredAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): AgentSettingsPayload {\n return isAcpAgent(settings)\n ? buildConfiguredAcpAgentSettings(settings, runtimeServicesInfo)\n : buildConfiguredOpenHandsAgentSettings(settings, runtimeServicesInfo);\n}\n\nfunction buildConfiguredConversationSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n workingDir?: string;\n}): ConversationSettingsPayload {\n const { settings, query, conversationInstructions, plugins, workingDir } =\n options;\n const conversationSettings = toRecord(settings.conversation_settings);\n const initialMessage = buildInitialMessage(query, conversationInstructions);\n\n CONVERSATION_SETTINGS_METADATA_KEYS.forEach(\n (key) => delete conversationSettings[key],\n );\n\n const payload: ConversationSettingsPayload = {\n ...conversationSettings,\n workspace: {\n kind: \"LocalWorkspace\",\n working_dir: workingDir ?? getAgentServerWorkingDir(),\n },\n ...(initialMessage ? { initial_message: initialMessage } : {}),\n ...(plugins?.length\n ? {\n plugins: plugins.map((plugin) => ({\n source: plugin.source,\n ...(plugin.ref ? { ref: plugin.ref } : {}),\n ...(plugin.repo_path ? { repo_path: plugin.repo_path } : {}),\n })),\n }\n : {}),\n };\n\n return payload;\n}\n\ninterface LookupSecret {\n kind: \"LookupSecret\";\n url: string;\n headers?: Record<string, string>;\n description?: string;\n}\n\ntype StartConversationPayload = Record<string, unknown> & {\n // Omitted when launching via ``agent_profile_id`` — the two are mutually\n // exclusive agent sources; the server resolves the profile server-side.\n agent_settings?: AgentSettingsPayload;\n agent_profile_id?: string;\n workspace: LocalWorkspacePayload;\n confirmation_policy: SettingsRecord;\n security_analyzer?: SettingsRecord;\n initial_message?: InitialMessagePayload;\n max_iterations: number;\n stuck_detection: true;\n autotitle: true;\n title_llm_profile?: string;\n worktree: boolean;\n secrets_encrypted?: true;\n conversation_id?: string;\n parent_conversation_id?: string;\n secrets?: Record<string, LookupSecret>;\n tags?: Record<string, string>;\n client_tools: ClientToolSpec[];\n tool_module_qualnames?: Record<string, string>;\n};\n\nexport interface StartConversationOptions {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n // Links the new conversation to an existing one as its child. The\n // agent-server requires the parent to exist and to share this\n // conversation's requested `workspace.working_dir` (software-agent-sdk\n // #4188, agent-server >= 1.37.1); older servers ignore the field.\n parentConversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n encryptedAgentSettings?: Record<string, SettingsValue>;\n encryptedConversationSettings?: Record<string, SettingsValue>;\n secretsEncrypted?: boolean;\n customSecrets?: Array<{ name: string; description?: string }>;\n // When set, the conversation launches from this AgentProfile (resolved\n // server-side) instead of an inline ``agent_settings`` dump (#3727).\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n runtimeServicesInfo?: RuntimeServicesInfo | null;\n}\n\nexport function buildStartConversationRequest(\n options: StartConversationOptions,\n): StartConversationPayload {\n const sourceAgentSettings = options.encryptedAgentSettings\n ? { ...options.settings, agent_settings: options.encryptedAgentSettings }\n : options.settings;\n\n const acpMode = isAcpAgent(sourceAgentSettings);\n const launchAgentKind = options.agentProfileId\n ? options.agentProfileKind\n : acpMode\n ? \"acp\"\n : \"openhands\";\n const agentSettings = buildConfiguredAgentSettings(\n sourceAgentSettings,\n options.runtimeServicesInfo,\n );\n const acpServerTag = acpMode\n ? getAcpServerTag(sourceAgentSettings)\n : undefined;\n\n const sourceConversationOptions = options.encryptedConversationSettings\n ? {\n ...options,\n settings: {\n ...options.settings,\n conversation_settings: options.encryptedConversationSettings,\n },\n }\n : options;\n\n const conversationSettings = buildConfiguredConversationSettings(\n sourceConversationOptions,\n );\n\n const payload: StartConversationPayload = {\n // ``agent_profile_id`` and ``agent_settings`` are mutually exclusive agent\n // sources; the profile path lets the server resolve the profile (#3727).\n //\n // Enrichment boundary: on the profile path the server rebuilds the agent\n // purely from the stored profile fields, so the client-owned enrichments\n // this adapter folds into ``agent_settings`` do NOT apply. The exec toolset\n // (terminal/file_editor/task_tracker) and public-skill loading are the\n // server/SDK's responsibility to restore on the profile path — tracked in\n // software-agent-sdk#3967 (profile resolution must attach the default\n // toolset + public skills, else a profile-launched OpenHands agent has only\n // Finish/Think). The dev ``RUNTIME_SERVICES`` system-message suffix remains\n // agent-settings-only; the Canvas UI tool is a top-level client tool and\n // therefore works on both inline-agent and profile launch paths.\n //\n // Persistent memory is NOT on that boundary: ``load_memory`` is a global\n // user preference, so the agent-server stamps the stored\n // ``agent_settings.agent_context.load_memory`` onto the profile-resolved\n // agent the same way it already applies the global ``mcp_config``. The\n // toggle therefore applies to both launch paths, and the client must not\n // re-send it here (``agent_profile_id`` and ``agent_settings`` are\n // mutually exclusive).\n ...(options.agentProfileId\n ? { agent_profile_id: options.agentProfileId }\n : { agent_settings: agentSettings }),\n workspace: conversationSettings.workspace,\n // The agent-server caches each client tool's schema per tool *name* for the\n // life of the process and rejects a re-registration with a different schema\n // (`ClientToolSchemaConflictError`). Editing either schema below therefore\n // requires restarting a long-running dev agent-server before new\n // conversations can start.\n client_tools:\n launchAgentKind === \"openhands\"\n ? [CANVAS_UI_CLIENT_TOOL, LAUNCH_CHILD_CONVERSATION_CLIENT_TOOL]\n : [],\n confirmation_policy:\n getConversationConfirmationPolicy(conversationSettings),\n max_iterations:\n typeof conversationSettings.max_iterations === \"number\"\n ? conversationSettings.max_iterations\n : 500,\n stuck_detection: true,\n autotitle: true,\n ...(options.titleLlmProfile\n ? { title_llm_profile: options.titleLlmProfile }\n : {}),\n worktree: options.worktree ?? true,\n };\n\n // A profile launch resolves the ACP server server-side, so don't stamp the\n // tag from current settings (it may not match the launched profile).\n if (!options.agentProfileId && acpServerTag) {\n payload.tags = { [ACP_SERVER_TAG_KEY]: acpServerTag };\n }\n\n // ``secrets_encrypted`` makes the agent-server decrypt request secrets at\n // conversation start. Non-ACP conversations need it for encrypted LLM keys.\n // ACP normally carries provider credentials as LookupSecrets, so avoid\n // forcing a cipher on fresh ACP-only backends. The exception is MCP:\n // encrypted settings round-trip mcp_config secrets as Fernet tokens,\n // and ACP forwards mcp_config directly to the subprocess.\n if (\n !options.agentProfileId &&\n options.secretsEncrypted &&\n (!acpMode || hasEncryptedMcpSecrets(agentSettings.mcp_config))\n ) {\n payload.secrets_encrypted = true;\n }\n\n if (options.conversationId) {\n payload.conversation_id = options.conversationId;\n }\n\n if (options.parentConversationId) {\n payload.parent_conversation_id = options.parentConversationId;\n }\n\n const securityAnalyzer =\n getConversationSecurityAnalyzer(conversationSettings);\n if (securityAnalyzer) {\n payload.security_analyzer = securityAnalyzer;\n }\n\n if (conversationSettings.initial_message) {\n payload.initial_message = conversationSettings.initial_message;\n }\n\n if (conversationSettings.plugins) {\n payload.plugins = conversationSettings.plugins;\n }\n\n if (conversationSettings.hook_config) {\n payload.hook_config = conversationSettings.hook_config;\n }\n\n const toolModuleQualnames = {\n ...((conversationSettings.tool_module_qualnames as\n | Record<string, string>\n | undefined) ?? {}),\n };\n delete toolModuleQualnames[LEGACY_CANVAS_UI_TOOL_NAME];\n delete toolModuleQualnames[CANVAS_UI_CLIENT_TOOL_NAME];\n delete toolModuleQualnames[LAUNCH_CHILD_CONVERSATION_TOOL_NAME];\n if (Object.keys(toolModuleQualnames).length > 0) {\n payload.tool_module_qualnames = toolModuleQualnames;\n }\n\n if (conversationSettings.agent_definitions) {\n payload.agent_definitions = conversationSettings.agent_definitions;\n }\n\n // Every saved secret rides as a LookupSecret the agent-server resolves back\n // from its own store at spawn time — ``request.secrets`` is the sole channel,\n // uniform for ACP and non-ACP (agent-canvas#1039). For ACP the resolution\n // runs off the event loop (software-agent-sdk#3510, >=1.25.0), so the loopback\n // fetch can't deadlock.\n if (options.customSecrets && options.customSecrets.length > 0) {\n const backend = getEffectiveLocalBackend();\n const headers = backend ? buildAuthHeaders(backend) : {};\n\n const secrets: Record<string, LookupSecret> = {};\n for (const secret of options.customSecrets) {\n const lookupSecret: LookupSecret = {\n kind: \"LookupSecret\",\n url: `/api/settings/secrets/${encodeURIComponent(secret.name)}`,\n description: secret.description,\n };\n\n if (Object.keys(headers).length > 0) {\n lookupSecret.headers = headers;\n }\n\n secrets[secret.name] = lookupSecret;\n }\n\n payload.secrets = secrets;\n }\n\n return payload;\n}\n\nexport const SUBSCRIPTION_LOGIN_REQUIRED_ERROR =\n \"Connect your ChatGPT subscription before starting a conversation with this LLM profile.\";\n\n/**\n * Throws if a ChatGPT subscription LLM profile is not connected.\n * Called before conversation creation and LLM profile switch only — not on\n * subsequent message sends or conversation resume. The agent-server must handle\n * mid-conversation token expiry gracefully.\n */\nexport async function assertSubscriptionAuthReady(\n agentSettings: Record<string, unknown>,\n): Promise<void> {\n const llm = toRecord(agentSettings.llm);\n if (!isSubscriptionLlmConfig(llm)) return;\n\n const status = await LLMSubscriptionService.getOpenAIStatus();\n if (!status.connected) {\n throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR);\n }\n}\n\nexport async function buildStartConversationRequestWithEncryptedSettings(options: {\n settings: Settings;\n query?: string;\n conversationInstructions?: string;\n plugins?: PluginSpec[];\n conversationId?: string;\n parentConversationId?: string;\n workingDir?: string;\n worktree?: boolean;\n agentProfileId?: string;\n agentProfileKind?: AgentKind;\n titleLlmProfile?: string;\n}): Promise<Record<string, unknown>> {\n const { SecretsService } = await import(\"./secrets-service\");\n\n const [settingsResult, customSecrets, runtimeServicesInfo] =\n await Promise.all([\n SettingsService.getSettingsForConversation(),\n SecretsService.getSecrets(),\n fetchBackendRuntimeServicesInfo(),\n ]);\n\n const { agentSettings, conversationSettings, secretsEncrypted } =\n settingsResult;\n\n // A profile launch resolves the LLM server-side, so the current-settings\n // subscription check doesn't apply (and can't see the profile's LLM).\n if (!options.agentProfileId) {\n await assertSubscriptionAuthReady(agentSettings);\n }\n\n return buildStartConversationRequest({\n ...options,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: conversationSettings,\n secretsEncrypted,\n customSecrets,\n runtimeServicesInfo,\n });\n}\n\nexport function emptyHooksResponse(): GetHooksResponse {\n return { hooks: [] };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwGA,IAAM,IAAqB;CAAC;CAAY;CAAe;AAAc,GAC/D,IAAwB,oBACxB,IAAqB;AAE3B,SAAS,IAAsB;CAC7B,OAAO;AACT;AAkCA,SAAgB,EACd,GAC4B;CAC5B,IAAI,OAAO,KAAU,UAAU;EAC7B,IAAM,IAAM,EAAM,KAAK;EACvB,IAAI,CAAC,GAAK,OAAO;EACjB,IAAI;GACF,OAAO,EAAyB,KAAK,MAAM,CAAG,CAAC;EACjD,QAAQ;GACN,OAAO;EACT;CACF;CAEA,IAAI,CAAC,KAAS,OAAO,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AC7D,IAAM,IAAU,EAAyB,GACnC,IAAU,IAAU,GAAiB,CAAO,IAAI,CAAC,GAEjD,IAAwC,CAAC;EAC/C,KAAK,IAAM,KAAU,EAAQ,eAAe;GAC1C,IAAM,IAA6B;IACjC,MAAM;IACN,KAAK,yBAAyB,mBAAmB,EAAO,IAAI;IAC5D,aAAa,EAAO;GACtB;GAMA,AAJI,OAAO,KAAK,CAAO,EAAE,SAAS,MAChC,EAAa,UAAU,IAGzB,EAAQ,EAAO,QAAQ;EACzB;EAEA,EAAQ,UAAU;CACpB;CAEA,OAAO;AACT;AAEA,IAAa,KACX;AAQF,eAAsB,EACpB,GACe;CAEV,MADO,EAAS,EAAc,GACN,CAAG,KAG5B,EAAC,MADgB,EAAuB,gBAAgB,GAChD,WACV,MAAU,MAAM,EAAiC;AAErD;AAEA,eAAsB,GAAmD,GAYpC;CACnC,IAAM,EAAE,sBAAmB,MAAM,OAAO,yBAElC,CAAC,GAAgB,GAAe,KACpC,MAAM,QAAQ,IAAI;EAChB,EAAgB,2BAA2B;EAC3C,EAAe,WAAW;EAC1B,EAAgC;CAClC,CAAC,GAEG,EAAE,kBAAe,yBAAsB,wBAC3C;CAQF,OAJK,EAAQ,kBACX,MAAM,EAA4B,CAAa,GAG1C,GAA8B;EACnC,GAAG;EACH,wBAAwB;EACxB,+BAA+B;EAC/B;EACA;EACA;CACF,CAAC;AACH;AAEA,SAAgB,KAAuC;CACrD,OAAO,EAAE,OAAO,CAAC,EAAE;AACrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../backend-registry/active-store.cjs"),t=require("../agent-server-client-options.cjs"),n=require("../../node_modules/axios/lib/axios.cjs"),r=require("../client-source.cjs"),i=require("../../services/telemetry.cjs"),a=require("../cloud/proxy.cjs"),o=require("../../manifests/automation-interface.cjs"),s=require("../../manifests/automation-setup.cjs");var c=`/api/automation`,l=n.default.create();async function u(e={}){let t=await i.getTelemetryDistinctId();return{...r.AGENT_CANVAS_CLIENT_HEADERS,...t?{[r.OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER]:t}:{},...e}}l.interceptors.request.use(async n=>{let r=await u();if(Object.entries(r).forEach(([e,t])=>{n.headers.set(e,t)}),n.baseURL)return n;let i=e.getEffectiveLocalBackend();if(!i)throw new t.NoBackendAvailableError;n.baseURL=i.host;let a=i.apiKey?.trim();return a&&n.headers.set(`X-Session-API-Key`,a),n});function d(e){return typeof e==`string`&&e.trim()||null}function f(e){return typeof e==`string`?d(e):d(e.sdk_version)??d(e.version)}function p(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function m(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function h(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function g(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let{importDefaults:t}=o.getImportExportSpec(),n=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:t.repoProvider}}]:void 0;return{path:`${c}${o.getAutomationEndpoint(e.plugins?.length?`createPlugin`:`createPrompt`)}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:t.placeholderEventSource,on:h()},...e.model&&{model:e.model},...n&&{repos:n},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}async function _(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await u(t?{"X-Session-API-Key":t}:{})}}async function v(e){return u(e.orgId?{"X-Org-Id":e.orgId}:{})}var y=class t{static async syncTelemetryConsent(t=i.getTelemetryConsent()){if(e.getActiveBackend().backend.kind!==`local`)return;let n=await i.getTelemetryDistinctIdForConsentSync();await l.post(`${c}/v1/telemetry/consent`,{consent_granted:t===`granted`,frontend_distinct_id:n},{timeout:5e3}),t!==`granted`&&n&&i.clearPendingLocalTelemetryRevocation(n)}static async getSdkVersion(){let t=e.getActiveBackend(),n=`${c}/sdk-version`;try{let e;if(t.backend.kind===`cloud`)e=await a.callCloudProxy({backend:t.backend,method:`GET`,path:n,headers:await v(t),timeoutSeconds:5});else{let{data:t}=await l.get(n,{timeout:5e3});e=t}return f(e)}catch{return null}}static async listAutomations(t={}){let{limit:n=50,offset:r=0}=t,i=e.getActiveBackend().backend;if(i.kind===`cloud`)return a.callCloudProxy({backend:i,method:`GET`,path:`${c}${o.getAutomationEndpoint(`list`)}?${p(n,r)}`,headers:await u()});let{data:s}=await l.get(`${c}${o.getAutomationEndpoint(`list`)}`,{params:{limit:n,offset:r}});return s}static async getAutomations(e=50,n=0){return t.listAutomations({limit:e,offset:n})}static async getAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`GET`,path:r,headers:await u()});let{data:i}=await l.get(r);return i}static async createAutomation(t){let n=e.getActiveBackend(),{path:r,body:i}=g(t),s;if(n.backend.kind===`cloud`)s=await a.callCloudProxy({backend:n.backend,method:`POST`,path:r,body:i,headers:await v(n)});else{let{data:e}=await l.post(r,i,await _(n.backend));s=e}let u=`${c}${o.getAutomationIdEndpoint(`detail`,s.id)}`,d={trigger:m(t),enabled:!1};try{if(n.backend.kind===`cloud`)return await a.callCloudProxy({backend:n.backend,method:`PATCH`,path:u,body:d,headers:await v(n)});let{data:e}=await l.patch(u,d,await _(n.backend));return e}catch(e){try{n.backend.kind===`cloud`?await a.callCloudProxy({backend:n.backend,method:`DELETE`,path:u,headers:await v(n)}):await l.delete(u,await _(n.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(t,n){let r=e.getActiveBackend().backend,i=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(r.kind===`cloud`)return a.callCloudProxy({backend:r,method:`PATCH`,path:i,body:n,headers:await u()});let{data:s}=await l.patch(i,n);return s}static async deleteAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(n.kind===`cloud`){await a.callCloudProxy({backend:n,method:`DELETE`,path:r,headers:await u()});return}await l.delete(r)}static async dispatchAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`dispatch`,t)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,headers:await u()});let{data:i}=await l.post(r);return i}static async listAutomationRuns(t,n={}){let{limit:r=50,offset:i=0}=n,s=e.getActiveBackend().backend,d=`${c}${o.getAutomationIdEndpoint(`runs`,t)}`;if(s.kind===`cloud`)return a.callCloudProxy({backend:s,method:`GET`,path:`${d}?${p(r,i)}`,headers:await u()});let{data:f}=await l.get(d,{params:{limit:r,offset:i}});return f}static async getAutomationRuns(e,n=50,r=0){return t.listAutomationRuns(e,{limit:n,offset:r})}static async toggleAutomation(e,n){return t.updateAutomation(e,{enabled:n})}static async downloadTarball(t,n){let r=e.getActiveBackend().backend,i=`${c}${o.getAutomationIdEndpoint(`tarball`,t)}`,s;if(r.kind===`cloud`)s=await a.callCloudProxy({backend:r,method:`GET`,path:i,responseType:`blob`,headers:await u()});else{let{data:e}=await l.get(i,{responseType:`blob`});s=e}let d=URL.createObjectURL(s),f=document.createElement(`a`);f.href=d,f.download=`${n}.tar`,f.click(),URL.revokeObjectURL(d)}static async getCapabilities(){let t=e.getActiveBackend().backend,n=`${c}${o.getAutomationEndpoint(`capabilities`)}`;if(t.kind===`cloud`)return a.callCloudProxy({backend:t,method:`GET`,path:n,headers:await u()});let{data:r}=await l.get(n);return r}static async validateDraft(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationEndpoint(`validate`)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,body:t,headers:await u()});let{data:i}=await l.post(r,t);return i}static async createAutomationDraft(t){let n=e.getActiveBackend().backend,r=`${c}${s.AUTOMATION_CREATE_ENDPOINT}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,body:t,headers:await u()});let{data:i}=await l.post(r,t);return i}static async checkHealth(){let t=e.getActiveBackend().backend,n=`${c}${o.getAutomationEndpoint(`health`)}`;try{if(t.kind===`cloud`)return await a.callCloudProxy({backend:t,method:`GET`,path:n,timeoutSeconds:5,headers:await u()});let{data:e}=await l.get(n,{timeout:5e3});return e}catch{return{status:`error`}}}};exports.default=y;
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../backend-registry/active-store.cjs"),t=require("../agent-server-client-options.cjs"),n=require("../../node_modules/axios/lib/axios.cjs"),r=require("../client-source.cjs"),i=require("../../services/telemetry.cjs"),a=require("../cloud/proxy.cjs"),o=require("../../manifests/automation-interface.cjs"),s=require("../../manifests/automation-setup.cjs");var c=`/api/automation`,l=n.default.create();async function u(e={}){let t=await i.getTelemetryDistinctId();return{...r.AGENT_CANVAS_CLIENT_HEADERS,...t?{[r.OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER]:t}:{},...e}}l.interceptors.request.use(async n=>{let r=await u();if(Object.entries(r).forEach(([e,t])=>{n.headers.set(e,t)}),n.baseURL)return n;let i=e.getEffectiveLocalBackend();if(!i)throw new t.NoBackendAvailableError;n.baseURL=i.host;let a=i.apiKey?.trim();return a&&n.headers.set(`X-Session-API-Key`,a),n});function d(e){return typeof e==`string`&&e.trim()||null}function f(e){return typeof e==`string`?d(e):d(e.sdk_version)??d(e.version)}function p(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function m(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function h(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function g(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let{importDefaults:t}=o.getImportExportSpec(),n=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:t.repoProvider}}]:void 0;return{path:`${c}${o.getAutomationEndpoint(e.plugins?.length?`createPlugin`:`createPrompt`)}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:t.placeholderEventSource,on:h()},...e.model&&{model:e.model},...n&&{repos:n},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}async function _(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await u(t?{"X-Session-API-Key":t}:{})}}async function v(e){return u(e.orgId?{"X-Org-Id":e.orgId}:{})}var y=class t{static async syncTelemetryConsent(t=i.getTelemetryConsent()){if(e.getActiveBackend().backend.kind!==`local`)return;let n=await i.getTelemetryDistinctIdForConsentSync();await l.post(`${c}/v1/telemetry/consent`,{consent_granted:t===`granted`,frontend_distinct_id:n},{timeout:5e3}),t!==`granted`&&n&&i.clearPendingLocalTelemetryRevocation(n)}static async getSdkVersion(){let t=e.getActiveBackend(),n=`${c}/sdk-version`;try{let e;if(t.backend.kind===`cloud`)e=await a.callCloudProxy({backend:t.backend,method:`GET`,path:n,headers:await v(t),timeoutSeconds:5});else{let{data:t}=await l.get(n,{timeout:5e3});e=t}return f(e)}catch{return null}}static async listAutomations(t={}){let{limit:n=50,offset:r=0}=t,i=e.getActiveBackend().backend;if(i.kind===`cloud`)return a.callCloudProxy({backend:i,method:`GET`,path:`${c}${o.getAutomationEndpoint(`list`)}?${p(n,r)}`,headers:await u()});let{data:s}=await l.get(`${c}${o.getAutomationEndpoint(`list`)}`,{params:{limit:n,offset:r}});return s}static async getAutomations(e=50,n=0){return t.listAutomations({limit:e,offset:n})}static async getAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`GET`,path:r,headers:await u()});let{data:i}=await l.get(r);return i}static async createAutomation(t){let n=e.getActiveBackend(),{path:r,body:i}=g(t),s;if(n.backend.kind===`cloud`)s=await a.callCloudProxy({backend:n.backend,method:`POST`,path:r,body:i,headers:await v(n)});else{let{data:e}=await l.post(r,i,await _(n.backend));s=e}let u=`${c}${o.getAutomationIdEndpoint(`detail`,s.id)}`,d={trigger:m(t),enabled:!1};try{if(n.backend.kind===`cloud`)return await a.callCloudProxy({backend:n.backend,method:`PATCH`,path:u,body:d,headers:await v(n)});let{data:e}=await l.patch(u,d,await _(n.backend));return e}catch(e){try{n.backend.kind===`cloud`?await a.callCloudProxy({backend:n.backend,method:`DELETE`,path:u,headers:await v(n)}):await l.delete(u,await _(n.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(t,n){let r=e.getActiveBackend().backend,i=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(r.kind===`cloud`)return a.callCloudProxy({backend:r,method:`PATCH`,path:i,body:n,headers:await u()});let{data:s}=await l.patch(i,n);return s}static async deleteAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`detail`,t)}`;if(n.kind===`cloud`){await a.callCloudProxy({backend:n,method:`DELETE`,path:r,headers:await u()});return}await l.delete(r)}static async dispatchAutomation(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationIdEndpoint(`dispatch`,t)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,headers:await u()});let{data:i}=await l.post(r);return i}static async cancelAutomationRun(t){let n=e.getActiveBackend().backend,r=`${c}/v1/runs/${encodeURIComponent(t)}/cancel`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,headers:await u()});let{data:i}=await l.post(r);return i}static async listAutomationRuns(t,n={}){let{limit:r=50,offset:i=0}=n,s=e.getActiveBackend().backend,d=`${c}${o.getAutomationIdEndpoint(`runs`,t)}`;if(s.kind===`cloud`)return a.callCloudProxy({backend:s,method:`GET`,path:`${d}?${p(r,i)}`,headers:await u()});let{data:f}=await l.get(d,{params:{limit:r,offset:i}});return f}static async getAutomationRuns(e,n=50,r=0){return t.listAutomationRuns(e,{limit:n,offset:r})}static async toggleAutomation(e,n){return t.updateAutomation(e,{enabled:n})}static async downloadTarball(t,n){let r=e.getActiveBackend().backend,i=`${c}${o.getAutomationIdEndpoint(`tarball`,t)}`,s;if(r.kind===`cloud`)s=await a.callCloudProxy({backend:r,method:`GET`,path:i,responseType:`blob`,headers:await u()});else{let{data:e}=await l.get(i,{responseType:`blob`});s=e}let d=URL.createObjectURL(s),f=document.createElement(`a`);f.href=d,f.download=`${n}.tar`,f.click(),URL.revokeObjectURL(d)}static async getCapabilities(){let t=e.getActiveBackend().backend,n=`${c}${o.getAutomationEndpoint(`capabilities`)}`;if(t.kind===`cloud`)return a.callCloudProxy({backend:t,method:`GET`,path:n,headers:await u()});let{data:r}=await l.get(n);return r}static async validateDraft(t){let n=e.getActiveBackend().backend,r=`${c}${o.getAutomationEndpoint(`validate`)}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,body:t,headers:await u()});let{data:i}=await l.post(r,t);return i}static async createAutomationDraft(t){let n=e.getActiveBackend().backend,r=`${c}${s.AUTOMATION_CREATE_ENDPOINT}`;if(n.kind===`cloud`)return a.callCloudProxy({backend:n,method:`POST`,path:r,body:t,headers:await u()});let{data:i}=await l.post(r,t);return i}static async checkHealth(){let t=e.getActiveBackend().backend,n=`${c}${o.getAutomationEndpoint(`health`)}`;try{if(t.kind===`cloud`)return await a.callCloudProxy({backend:t,method:`GET`,path:n,timeoutSeconds:5,headers:await u()});let{data:e}=await l.get(n,{timeout:5e3});return e}catch{return{status:`error`}}}};exports.default=y;
|
|
2
2
|
//# sourceMappingURL=automation-service.api.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-service.api.cjs","names":[],"sources":["../../../src/api/automation-service/automation-service.api.ts"],"sourcesContent":["import axios from \"axios\";\nimport {\n clearPendingLocalTelemetryRevocation,\n getTelemetryConsent,\n getTelemetryDistinctId,\n getTelemetryDistinctIdForConsentSync,\n type TelemetryConsent,\n} from \"#/services/telemetry\";\nimport type {\n Automation,\n AutomationRun,\n AutomationSpec,\n AutomationTrigger,\n AutomationsResponse,\n AutomationRunsResponse,\n} from \"#/types/automation\";\nimport { AUTOMATION_CREATE_ENDPOINT } from \"#/manifests/automation-setup\";\nimport {\n getAutomationEndpoint,\n getAutomationIdEndpoint,\n getImportExportSpec,\n} from \"#/manifests/automation-interface\";\nimport type {\n DeploymentCapabilities,\n SetupRequestBody,\n ValidateDraftResponse,\n} from \"#/manifests/types\";\nimport type { Backend, ResolvedActiveBackend } from \"../backend-registry/types\";\nimport {\n getActiveBackend,\n getEffectiveLocalBackend,\n} from \"../backend-registry/active-store\";\nimport { NoBackendAvailableError } from \"../agent-server-client-options\";\nimport { callCloudProxy } from \"../cloud/proxy\";\nimport {\n AGENT_CANVAS_CLIENT_HEADERS,\n OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER,\n} from \"../client-source\";\n\nconst AUTOMATION_BASE_PATH = \"/api/automation\";\n\nexport interface AutomationHealthResponse {\n status: \"ok\" | \"error\";\n message?: string;\n}\n\ntype AutomationSdkVersionResponse =\n | string\n | {\n sdk_version?: unknown;\n version?: unknown;\n };\n\n// Local automation calls go to the automation sidecar that\n// `scripts/dev-with-automation.mjs` mounts behind the local agent-server.\n// Both backends use the same session API key and the same `X-Session-API-Key`\n// header for consistency.\nconst localAutomationAxios = axios.create();\n\nasync function buildAutomationRequestHeaders(\n extraHeaders: Record<string, string> = {},\n): Promise<Record<string, string>> {\n const telemetryDistinctId = await getTelemetryDistinctId();\n return {\n ...AGENT_CANVAS_CLIENT_HEADERS,\n ...(telemetryDistinctId\n ? { [OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER]: telemetryDistinctId }\n : {}),\n ...extraHeaders,\n };\n}\n\nlocalAutomationAxios.interceptors.request.use(async (config) => {\n const requestHeaders = await buildAutomationRequestHeaders();\n Object.entries(requestHeaders).forEach(([name, value]) => {\n config.headers.set(name, value);\n });\n\n // Import uses an explicit baseURL/header pair so its POST, PATCH, and\n // cleanup stay pinned to the backend selected when the mutation started.\n if (config.baseURL) return config;\n\n // Resolve the local backend on every call so it tracks the\n // currently-active local backend (and any host/key edits made via the\n // manage-backends UI), rather than freezing whatever value the\n // agent-server-config produced at module load time.\n // Using the backend registry (rather than the build-time VITE_SESSION_API_KEY\n // env var) ensures the published npm package picks up the runtime-injected\n // session key that scripts/static-server.mjs seeds into localStorage, fixing\n // the 401 errors reported in issue #829.\n const backend = getEffectiveLocalBackend();\n if (!backend) throw new NoBackendAvailableError();\n // eslint-disable-next-line no-param-reassign\n config.baseURL = backend.host;\n\n const apiKey = backend.apiKey?.trim();\n if (apiKey) {\n config.headers.set(\"X-Session-API-Key\", apiKey);\n }\n return config;\n});\n\nfunction normalizeAutomationSdkVersion(version: unknown): string | null {\n if (typeof version !== \"string\") return null;\n const trimmed = version.trim();\n return trimmed || null;\n}\n\nfunction getAutomationSdkVersionFromResponse(\n response: AutomationSdkVersionResponse,\n): string | null {\n if (typeof response === \"string\") {\n return normalizeAutomationSdkVersion(response);\n }\n return (\n normalizeAutomationSdkVersion(response.sdk_version) ??\n normalizeAutomationSdkVersion(response.version)\n );\n}\n\nfunction buildPaginationQuery(limit: number, offset: number): string {\n const params = new URLSearchParams();\n params.set(\"limit\", String(limit));\n params.set(\"offset\", String(offset));\n return params.toString();\n}\n\nfunction buildImportedTrigger(spec: AutomationSpec): AutomationTrigger {\n if (spec.trigger.type === \"event\") {\n return {\n type: \"event\",\n source: spec.trigger.source,\n on: spec.trigger.on,\n ...(spec.trigger.filter && { filter: spec.trigger.filter }),\n };\n }\n\n return {\n type: \"cron\",\n schedule: spec.trigger.schedule,\n timezone: spec.timezone ?? spec.trigger.timezone ?? \"UTC\",\n };\n}\n\nfunction generatePendingImportEvent(): string {\n if (\n typeof crypto !== \"undefined\" &&\n typeof crypto.randomUUID === \"function\"\n ) {\n return `pending.${crypto.randomUUID()}`;\n }\n return `pending.${Date.now()}.${Math.random().toString(36).slice(2, 10)}`;\n}\n\nfunction buildCreateAutomationRequest(spec: AutomationSpec) {\n if (!spec.prompt) {\n throw new Error(\"An automation prompt is required for import.\");\n }\n\n const { importDefaults } = getImportExportSpec();\n const repos = spec.repository\n ? [\n {\n url: spec.repository,\n ...(spec.branch && { ref: spec.branch }),\n ...(!spec.repository.includes(\"://\") &&\n !spec.repository.startsWith(\"git@\") && {\n provider: importDefaults.repoProvider,\n }),\n },\n ]\n : undefined;\n\n return {\n path: `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\n spec.plugins?.length ? \"createPlugin\" : \"createPrompt\",\n )}`,\n body: {\n name: spec.name,\n prompt: spec.prompt,\n // Preset creation defaults to enabled. A unique event trigger keeps the\n // new record inert until the real trigger and disabled state are applied\n // together in the follow-up PATCH.\n trigger: {\n type: \"event\",\n source: importDefaults.placeholderEventSource,\n on: generatePendingImportEvent(),\n },\n ...(spec.model && { model: spec.model }),\n ...(repos && { repos }),\n ...(spec.plugins?.length && {\n plugins: spec.plugins.map((source) => ({ source })),\n }),\n ...(spec.timeout != null && { timeout: spec.timeout }),\n },\n };\n}\n\nasync function buildPinnedLocalConfig(backend: Backend) {\n const apiKey = backend.apiKey.trim();\n return {\n baseURL: backend.host,\n headers: await buildAutomationRequestHeaders(\n apiKey ? { \"X-Session-API-Key\": apiKey } : {},\n ),\n };\n}\n\nasync function buildPinnedCloudHeaders(active: ResolvedActiveBackend) {\n return buildAutomationRequestHeaders(\n active.orgId ? { \"X-Org-Id\": active.orgId } : {},\n );\n}\n\nclass AutomationService {\n static async syncTelemetryConsent(\n consent: TelemetryConsent = getTelemetryConsent(),\n ): Promise<void> {\n const active = getActiveBackend();\n if (active.backend.kind !== \"local\") return;\n\n const frontendDistinctId = await getTelemetryDistinctIdForConsentSync();\n await localAutomationAxios.post(\n `${AUTOMATION_BASE_PATH}/v1/telemetry/consent`,\n {\n consent_granted: consent === \"granted\",\n frontend_distinct_id: frontendDistinctId,\n },\n { timeout: 5000 },\n );\n if (consent !== \"granted\" && frontendDistinctId) {\n clearPendingLocalTelemetryRevocation(frontendDistinctId);\n }\n }\n\n static async getSdkVersion(): Promise<string | null> {\n const active = getActiveBackend();\n const path = `${AUTOMATION_BASE_PATH}/sdk-version`;\n\n try {\n let response: AutomationSdkVersionResponse;\n if (active.backend.kind === \"cloud\") {\n response = await callCloudProxy<AutomationSdkVersionResponse>({\n backend: active.backend,\n method: \"GET\",\n path,\n headers: await buildPinnedCloudHeaders(active),\n timeoutSeconds: 5,\n });\n } else {\n const { data } =\n await localAutomationAxios.get<AutomationSdkVersionResponse>(path, {\n timeout: 5000,\n });\n response = data;\n }\n\n return getAutomationSdkVersionFromResponse(response);\n } catch {\n return null;\n }\n }\n\n static async listAutomations(\n params: { limit?: number; offset?: number } = {},\n ): Promise<AutomationsResponse> {\n const { limit = 50, offset = 0 } = params;\n const active = getActiveBackend().backend;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationsResponse>({\n backend: active,\n method: \"GET\",\n path: `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"list\")}?${buildPaginationQuery(limit, offset)}`,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<AutomationsResponse>(\n `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"list\")}`,\n { params: { limit, offset } },\n );\n return data;\n }\n\n static async getAutomations(\n limit = 50,\n offset = 0,\n ): Promise<AutomationsResponse> {\n return AutomationService.listAutomations({ limit, offset });\n }\n\n static async getAutomation(id: string): Promise<Automation> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Automation>({\n backend: active,\n method: \"GET\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<Automation>(path);\n return data;\n }\n\n static async createAutomation(spec: AutomationSpec): Promise<Automation> {\n const active = getActiveBackend();\n const { path, body } = buildCreateAutomationRequest(spec);\n\n let created: Automation;\n if (active.backend.kind === \"cloud\") {\n created = await callCloudProxy<Automation>({\n backend: active.backend,\n method: \"POST\",\n path,\n body,\n headers: await buildPinnedCloudHeaders(active),\n });\n } else {\n const { data } = await localAutomationAxios.post<Automation>(\n path,\n body,\n await buildPinnedLocalConfig(active.backend),\n );\n created = data;\n }\n\n const updatePath = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", created.id)}`;\n const updateBody: Partial<Automation> = {\n trigger: buildImportedTrigger(spec),\n enabled: false,\n };\n\n try {\n if (active.backend.kind === \"cloud\") {\n return await callCloudProxy<Automation>({\n backend: active.backend,\n method: \"PATCH\",\n path: updatePath,\n body: updateBody,\n headers: await buildPinnedCloudHeaders(active),\n });\n }\n\n const { data } = await localAutomationAxios.patch<Automation>(\n updatePath,\n updateBody,\n await buildPinnedLocalConfig(active.backend),\n );\n return data;\n } catch (updateError) {\n try {\n if (active.backend.kind === \"cloud\") {\n await callCloudProxy<unknown>({\n backend: active.backend,\n method: \"DELETE\",\n path: updatePath,\n headers: await buildPinnedCloudHeaders(active),\n });\n } else {\n await localAutomationAxios.delete(\n updatePath,\n await buildPinnedLocalConfig(active.backend),\n );\n }\n } catch (cleanupError) {\n throw new AggregateError(\n [updateError, cleanupError],\n \"Failed to disable the imported automation and clean it up.\",\n );\n }\n throw updateError;\n }\n }\n\n static async updateAutomation(\n id: string,\n body: Partial<Automation>,\n ): Promise<Automation> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Automation>({\n backend: active,\n method: \"PATCH\",\n path,\n body: body as Record<string, unknown>,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.patch<Automation>(path, body);\n return data;\n }\n\n static async deleteAutomation(id: string): Promise<void> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n await callCloudProxy<unknown>({\n backend: active,\n method: \"DELETE\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n return;\n }\n\n await localAutomationAxios.delete(path);\n }\n\n static async dispatchAutomation(id: string): Promise<AutomationRun> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"dispatch\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationRun>({\n backend: active,\n method: \"POST\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<AutomationRun>(path);\n return data;\n }\n\n static async listAutomationRuns(\n id: string,\n params: { limit?: number; offset?: number } = {},\n ): Promise<AutomationRunsResponse> {\n const { limit = 50, offset = 0 } = params;\n const active = getActiveBackend().backend;\n const basePath = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"runs\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationRunsResponse>({\n backend: active,\n method: \"GET\",\n path: `${basePath}?${buildPaginationQuery(limit, offset)}`,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<AutomationRunsResponse>(\n basePath,\n { params: { limit, offset } },\n );\n return data;\n }\n\n static async getAutomationRuns(\n id: string,\n limit = 50,\n offset = 0,\n ): Promise<AutomationRunsResponse> {\n return AutomationService.listAutomationRuns(id, { limit, offset });\n }\n\n static async toggleAutomation(\n id: string,\n enabled: boolean,\n ): Promise<Automation> {\n return AutomationService.updateAutomation(id, { enabled });\n }\n\n static async downloadTarball(id: string, name: string): Promise<void> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"tarball\", id)}`;\n\n let blob: Blob;\n if (active.kind === \"cloud\") {\n blob = await callCloudProxy<Blob>({\n backend: active,\n method: \"GET\",\n path,\n responseType: \"blob\",\n headers: await buildAutomationRequestHeaders(),\n });\n } else {\n const { data } = await localAutomationAxios.get<Blob>(path, {\n responseType: \"blob\",\n });\n blob = data;\n }\n\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `${name}.tar`;\n a.click();\n URL.revokeObjectURL(url);\n }\n\n /**\n * Ask what this deployment supports, before a setup form renders.\n *\n * The setup endpoints answer a contract authored in `OpenHands/extensions`,\n * so their bodies are camelCase where the rest of this service is snake_case.\n */\n static async getCapabilities(): Promise<DeploymentCapabilities> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"capabilities\")}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<DeploymentCapabilities>({\n backend: active,\n method: \"GET\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } =\n await localAutomationAxios.get<DeploymentCapabilities>(path);\n return data;\n }\n\n /**\n * Validate a draft without creating it. An invalid draft is a 200 carrying\n * field-addressed errors; only a malformed envelope is a 4xx.\n */\n static async validateDraft(\n body: SetupRequestBody,\n ): Promise<ValidateDraftResponse> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"validate\")}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<ValidateDraftResponse>({\n backend: active,\n method: \"POST\",\n path,\n body,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<ValidateDraftResponse>(\n path,\n body,\n );\n return data;\n }\n\n /**\n * Create from a draft a setup form derived. Unlike {@link\n * AutomationService.createAutomation}, which exists for import and has to\n * park the record on a placeholder trigger, this sends the finished record in\n * one request.\n */\n static async createAutomationDraft(\n body: SetupRequestBody,\n ): Promise<Record<string, unknown>> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${AUTOMATION_CREATE_ENDPOINT}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Record<string, unknown>>({\n backend: active,\n method: \"POST\",\n path,\n body,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<Record<string, unknown>>(\n path,\n body,\n );\n return data;\n }\n\n static async checkHealth(): Promise<AutomationHealthResponse> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"health\")}`;\n\n try {\n if (active.kind === \"cloud\") {\n const response = await callCloudProxy<AutomationHealthResponse>({\n backend: active,\n method: \"GET\",\n path,\n // Fail fast, matching the local branch's 5s timeout below.\n timeoutSeconds: 5,\n headers: await buildAutomationRequestHeaders(),\n });\n return response;\n }\n\n const { data } = await localAutomationAxios.get<AutomationHealthResponse>(\n path,\n { timeout: 5000 },\n );\n return data;\n } catch {\n return { status: \"error\" };\n }\n }\n}\n\nexport default AutomationService;\n"],"mappings":"gaAuCA,IAAM,EAAuB,kBAkBvB,EAAuB,EAAA,QAAM,OAAO,EAE1C,eAAe,EACb,EAAuC,CAAC,EACP,CACjC,IAAM,EAAsB,MAAM,EAAA,uBAAuB,EACzD,MAAO,CACL,GAAG,EAAA,4BACH,GAAI,EACA,EAAG,EAAA,wCAAyC,CAAoB,EAChE,CAAC,EACL,GAAG,CACL,CACF,CAEA,EAAqB,aAAa,QAAQ,IAAI,KAAO,IAAW,CAC9D,IAAM,EAAiB,MAAM,EAA8B,EAO3D,GANA,OAAO,QAAQ,CAAc,EAAE,SAAS,CAAC,EAAM,KAAW,CACxD,EAAO,QAAQ,IAAI,EAAM,CA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OACA,OACA,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAGH,GAAM,CAAE,QAAS,MAAM,EAAqB,KAC1C,EACA,CACF,EACA,OAAO,CACT,CAQA,aAAa,sBACX,EACkC,CAClC,IAAM,EAAS,EAAA,iBAAiB,EAAE,QAC5B,EAAO,GAAG,IAAuB,EAAA,6BAEvC,GAAI,EAAO,OAAS,QAClB,OAAO,EAAA,eAAwC,CAC7C,QAAS,EACT,OAAQ,OACR,OACA,OACA,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAGH,GAAM,CAAE,QAAS,MAAM,EAAqB,KAC1C,EACA,CACF,EACA,OAAO,CACT,CAEA,aAAa,aAAiD,CAC5D,IAAM,EAAS,EAAA,iBAAiB,EAAE,QAC5B,EAAO,GAAG,IAAuB,EAAA,sBAAsB,QAAQ,IAErE,GAAI,CACF,GAAI,EAAO,OAAS,QASlB,OAAO,MARgB,EAAA,eAAyC,CAC9D,QAAS,EACT,OAAQ,MACR,OAEA,eAAgB,EAChB,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAIH,GAAM,CAAE,QAAS,MAAM,EAAqB,IAC1C,EACA,CAAE,QAAS,GAAK,CAClB,EACA,OAAO,CACT,MAAQ,CACN,MAAO,CAAE,OAAQ,OAAQ,CAC3B,CACF,CACF"}
|
|
1
|
+
{"version":3,"file":"automation-service.api.cjs","names":[],"sources":["../../../src/api/automation-service/automation-service.api.ts"],"sourcesContent":["import axios from \"axios\";\nimport {\n clearPendingLocalTelemetryRevocation,\n getTelemetryConsent,\n getTelemetryDistinctId,\n getTelemetryDistinctIdForConsentSync,\n type TelemetryConsent,\n} from \"#/services/telemetry\";\nimport type {\n Automation,\n AutomationRun,\n AutomationSpec,\n AutomationTrigger,\n AutomationsResponse,\n AutomationRunsResponse,\n} from \"#/types/automation\";\nimport { AUTOMATION_CREATE_ENDPOINT } from \"#/manifests/automation-setup\";\nimport {\n getAutomationEndpoint,\n getAutomationIdEndpoint,\n getImportExportSpec,\n} from \"#/manifests/automation-interface\";\nimport type {\n DeploymentCapabilities,\n SetupRequestBody,\n ValidateDraftResponse,\n} from \"#/manifests/types\";\nimport type { Backend, ResolvedActiveBackend } from \"../backend-registry/types\";\nimport {\n getActiveBackend,\n getEffectiveLocalBackend,\n} from \"../backend-registry/active-store\";\nimport { NoBackendAvailableError } from \"../agent-server-client-options\";\nimport { callCloudProxy } from \"../cloud/proxy\";\nimport {\n AGENT_CANVAS_CLIENT_HEADERS,\n OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER,\n} from \"../client-source\";\n\nconst AUTOMATION_BASE_PATH = \"/api/automation\";\n\nexport interface AutomationHealthResponse {\n status: \"ok\" | \"error\";\n message?: string;\n}\n\ntype AutomationSdkVersionResponse =\n | string\n | {\n sdk_version?: unknown;\n version?: unknown;\n };\n\n// Local automation calls go to the automation sidecar that\n// `scripts/dev-with-automation.mjs` mounts behind the local agent-server.\n// Both backends use the same session API key and the same `X-Session-API-Key`\n// header for consistency.\nconst localAutomationAxios = axios.create();\n\nasync function buildAutomationRequestHeaders(\n extraHeaders: Record<string, string> = {},\n): Promise<Record<string, string>> {\n const telemetryDistinctId = await getTelemetryDistinctId();\n return {\n ...AGENT_CANVAS_CLIENT_HEADERS,\n ...(telemetryDistinctId\n ? { [OPENHANDS_TELEMETRY_DISTINCT_ID_HEADER]: telemetryDistinctId }\n : {}),\n ...extraHeaders,\n };\n}\n\nlocalAutomationAxios.interceptors.request.use(async (config) => {\n const requestHeaders = await buildAutomationRequestHeaders();\n Object.entries(requestHeaders).forEach(([name, value]) => {\n config.headers.set(name, value);\n });\n\n // Import uses an explicit baseURL/header pair so its POST, PATCH, and\n // cleanup stay pinned to the backend selected when the mutation started.\n if (config.baseURL) return config;\n\n // Resolve the local backend on every call so it tracks the\n // currently-active local backend (and any host/key edits made via the\n // manage-backends UI), rather than freezing whatever value the\n // agent-server-config produced at module load time.\n // Using the backend registry (rather than the build-time VITE_SESSION_API_KEY\n // env var) ensures the published npm package picks up the runtime-injected\n // session key that scripts/static-server.mjs seeds into localStorage, fixing\n // the 401 errors reported in issue #829.\n const backend = getEffectiveLocalBackend();\n if (!backend) throw new NoBackendAvailableError();\n // eslint-disable-next-line no-param-reassign\n config.baseURL = backend.host;\n\n const apiKey = backend.apiKey?.trim();\n if (apiKey) {\n config.headers.set(\"X-Session-API-Key\", apiKey);\n }\n return config;\n});\n\nfunction normalizeAutomationSdkVersion(version: unknown): string | null {\n if (typeof version !== \"string\") return null;\n const trimmed = version.trim();\n return trimmed || null;\n}\n\nfunction getAutomationSdkVersionFromResponse(\n response: AutomationSdkVersionResponse,\n): string | null {\n if (typeof response === \"string\") {\n return normalizeAutomationSdkVersion(response);\n }\n return (\n normalizeAutomationSdkVersion(response.sdk_version) ??\n normalizeAutomationSdkVersion(response.version)\n );\n}\n\nfunction buildPaginationQuery(limit: number, offset: number): string {\n const params = new URLSearchParams();\n params.set(\"limit\", String(limit));\n params.set(\"offset\", String(offset));\n return params.toString();\n}\n\nfunction buildImportedTrigger(spec: AutomationSpec): AutomationTrigger {\n if (spec.trigger.type === \"event\") {\n return {\n type: \"event\",\n source: spec.trigger.source,\n on: spec.trigger.on,\n ...(spec.trigger.filter && { filter: spec.trigger.filter }),\n };\n }\n\n return {\n type: \"cron\",\n schedule: spec.trigger.schedule,\n timezone: spec.timezone ?? spec.trigger.timezone ?? \"UTC\",\n };\n}\n\nfunction generatePendingImportEvent(): string {\n if (\n typeof crypto !== \"undefined\" &&\n typeof crypto.randomUUID === \"function\"\n ) {\n return `pending.${crypto.randomUUID()}`;\n }\n return `pending.${Date.now()}.${Math.random().toString(36).slice(2, 10)}`;\n}\n\nfunction buildCreateAutomationRequest(spec: AutomationSpec) {\n if (!spec.prompt) {\n throw new Error(\"An automation prompt is required for import.\");\n }\n\n const { importDefaults } = getImportExportSpec();\n const repos = spec.repository\n ? [\n {\n url: spec.repository,\n ...(spec.branch && { ref: spec.branch }),\n ...(!spec.repository.includes(\"://\") &&\n !spec.repository.startsWith(\"git@\") && {\n provider: importDefaults.repoProvider,\n }),\n },\n ]\n : undefined;\n\n return {\n path: `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\n spec.plugins?.length ? \"createPlugin\" : \"createPrompt\",\n )}`,\n body: {\n name: spec.name,\n prompt: spec.prompt,\n // Preset creation defaults to enabled. A unique event trigger keeps the\n // new record inert until the real trigger and disabled state are applied\n // together in the follow-up PATCH.\n trigger: {\n type: \"event\",\n source: importDefaults.placeholderEventSource,\n on: generatePendingImportEvent(),\n },\n ...(spec.model && { model: spec.model }),\n ...(repos && { repos }),\n ...(spec.plugins?.length && {\n plugins: spec.plugins.map((source) => ({ source })),\n }),\n ...(spec.timeout != null && { timeout: spec.timeout }),\n },\n };\n}\n\nasync function buildPinnedLocalConfig(backend: Backend) {\n const apiKey = backend.apiKey.trim();\n return {\n baseURL: backend.host,\n headers: await buildAutomationRequestHeaders(\n apiKey ? { \"X-Session-API-Key\": apiKey } : {},\n ),\n };\n}\n\nasync function buildPinnedCloudHeaders(active: ResolvedActiveBackend) {\n return buildAutomationRequestHeaders(\n active.orgId ? { \"X-Org-Id\": active.orgId } : {},\n );\n}\n\nclass AutomationService {\n static async syncTelemetryConsent(\n consent: TelemetryConsent = getTelemetryConsent(),\n ): Promise<void> {\n const active = getActiveBackend();\n if (active.backend.kind !== \"local\") return;\n\n const frontendDistinctId = await getTelemetryDistinctIdForConsentSync();\n await localAutomationAxios.post(\n `${AUTOMATION_BASE_PATH}/v1/telemetry/consent`,\n {\n consent_granted: consent === \"granted\",\n frontend_distinct_id: frontendDistinctId,\n },\n { timeout: 5000 },\n );\n if (consent !== \"granted\" && frontendDistinctId) {\n clearPendingLocalTelemetryRevocation(frontendDistinctId);\n }\n }\n\n static async getSdkVersion(): Promise<string | null> {\n const active = getActiveBackend();\n const path = `${AUTOMATION_BASE_PATH}/sdk-version`;\n\n try {\n let response: AutomationSdkVersionResponse;\n if (active.backend.kind === \"cloud\") {\n response = await callCloudProxy<AutomationSdkVersionResponse>({\n backend: active.backend,\n method: \"GET\",\n path,\n headers: await buildPinnedCloudHeaders(active),\n timeoutSeconds: 5,\n });\n } else {\n const { data } =\n await localAutomationAxios.get<AutomationSdkVersionResponse>(path, {\n timeout: 5000,\n });\n response = data;\n }\n\n return getAutomationSdkVersionFromResponse(response);\n } catch {\n return null;\n }\n }\n\n static async listAutomations(\n params: { limit?: number; offset?: number } = {},\n ): Promise<AutomationsResponse> {\n const { limit = 50, offset = 0 } = params;\n const active = getActiveBackend().backend;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationsResponse>({\n backend: active,\n method: \"GET\",\n path: `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"list\")}?${buildPaginationQuery(limit, offset)}`,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<AutomationsResponse>(\n `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"list\")}`,\n { params: { limit, offset } },\n );\n return data;\n }\n\n static async getAutomations(\n limit = 50,\n offset = 0,\n ): Promise<AutomationsResponse> {\n return AutomationService.listAutomations({ limit, offset });\n }\n\n static async getAutomation(id: string): Promise<Automation> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Automation>({\n backend: active,\n method: \"GET\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<Automation>(path);\n return data;\n }\n\n static async createAutomation(spec: AutomationSpec): Promise<Automation> {\n const active = getActiveBackend();\n const { path, body } = buildCreateAutomationRequest(spec);\n\n let created: Automation;\n if (active.backend.kind === \"cloud\") {\n created = await callCloudProxy<Automation>({\n backend: active.backend,\n method: \"POST\",\n path,\n body,\n headers: await buildPinnedCloudHeaders(active),\n });\n } else {\n const { data } = await localAutomationAxios.post<Automation>(\n path,\n body,\n await buildPinnedLocalConfig(active.backend),\n );\n created = data;\n }\n\n const updatePath = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", created.id)}`;\n const updateBody: Partial<Automation> = {\n trigger: buildImportedTrigger(spec),\n enabled: false,\n };\n\n try {\n if (active.backend.kind === \"cloud\") {\n return await callCloudProxy<Automation>({\n backend: active.backend,\n method: \"PATCH\",\n path: updatePath,\n body: updateBody,\n headers: await buildPinnedCloudHeaders(active),\n });\n }\n\n const { data } = await localAutomationAxios.patch<Automation>(\n updatePath,\n updateBody,\n await buildPinnedLocalConfig(active.backend),\n );\n return data;\n } catch (updateError) {\n try {\n if (active.backend.kind === \"cloud\") {\n await callCloudProxy<unknown>({\n backend: active.backend,\n method: \"DELETE\",\n path: updatePath,\n headers: await buildPinnedCloudHeaders(active),\n });\n } else {\n await localAutomationAxios.delete(\n updatePath,\n await buildPinnedLocalConfig(active.backend),\n );\n }\n } catch (cleanupError) {\n throw new AggregateError(\n [updateError, cleanupError],\n \"Failed to disable the imported automation and clean it up.\",\n );\n }\n throw updateError;\n }\n }\n\n static async updateAutomation(\n id: string,\n body: Partial<Automation>,\n ): Promise<Automation> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Automation>({\n backend: active,\n method: \"PATCH\",\n path,\n body: body as Record<string, unknown>,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.patch<Automation>(path, body);\n return data;\n }\n\n static async deleteAutomation(id: string): Promise<void> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"detail\", id)}`;\n\n if (active.kind === \"cloud\") {\n await callCloudProxy<unknown>({\n backend: active,\n method: \"DELETE\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n return;\n }\n\n await localAutomationAxios.delete(path);\n }\n\n static async dispatchAutomation(id: string): Promise<AutomationRun> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"dispatch\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationRun>({\n backend: active,\n method: \"POST\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<AutomationRun>(path);\n return data;\n }\n\n /**\n * Cancel a pending or running automation run.\n * Backend: POST /api/automation/v1/runs/{run_id}/cancel\n */\n static async cancelAutomationRun(runId: string): Promise<AutomationRun> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}/v1/runs/${encodeURIComponent(runId)}/cancel`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationRun>({\n backend: active,\n method: \"POST\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<AutomationRun>(path);\n return data;\n }\n\n static async listAutomationRuns(\n id: string,\n params: { limit?: number; offset?: number } = {},\n ): Promise<AutomationRunsResponse> {\n const { limit = 50, offset = 0 } = params;\n const active = getActiveBackend().backend;\n const basePath = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"runs\", id)}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<AutomationRunsResponse>({\n backend: active,\n method: \"GET\",\n path: `${basePath}?${buildPaginationQuery(limit, offset)}`,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.get<AutomationRunsResponse>(\n basePath,\n { params: { limit, offset } },\n );\n return data;\n }\n\n static async getAutomationRuns(\n id: string,\n limit = 50,\n offset = 0,\n ): Promise<AutomationRunsResponse> {\n return AutomationService.listAutomationRuns(id, { limit, offset });\n }\n\n static async toggleAutomation(\n id: string,\n enabled: boolean,\n ): Promise<Automation> {\n return AutomationService.updateAutomation(id, { enabled });\n }\n\n static async downloadTarball(id: string, name: string): Promise<void> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationIdEndpoint(\"tarball\", id)}`;\n\n let blob: Blob;\n if (active.kind === \"cloud\") {\n blob = await callCloudProxy<Blob>({\n backend: active,\n method: \"GET\",\n path,\n responseType: \"blob\",\n headers: await buildAutomationRequestHeaders(),\n });\n } else {\n const { data } = await localAutomationAxios.get<Blob>(path, {\n responseType: \"blob\",\n });\n blob = data;\n }\n\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `${name}.tar`;\n a.click();\n URL.revokeObjectURL(url);\n }\n\n /**\n * Ask what this deployment supports, before a setup form renders.\n *\n * The setup endpoints answer a contract authored in `OpenHands/extensions`,\n * so their bodies are camelCase where the rest of this service is snake_case.\n */\n static async getCapabilities(): Promise<DeploymentCapabilities> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"capabilities\")}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<DeploymentCapabilities>({\n backend: active,\n method: \"GET\",\n path,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } =\n await localAutomationAxios.get<DeploymentCapabilities>(path);\n return data;\n }\n\n /**\n * Validate a draft without creating it. An invalid draft is a 200 carrying\n * field-addressed errors; only a malformed envelope is a 4xx.\n */\n static async validateDraft(\n body: SetupRequestBody,\n ): Promise<ValidateDraftResponse> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"validate\")}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<ValidateDraftResponse>({\n backend: active,\n method: \"POST\",\n path,\n body,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<ValidateDraftResponse>(\n path,\n body,\n );\n return data;\n }\n\n /**\n * Create from a draft a setup form derived. Unlike {@link\n * AutomationService.createAutomation}, which exists for import and has to\n * park the record on a placeholder trigger, this sends the finished record in\n * one request.\n */\n static async createAutomationDraft(\n body: SetupRequestBody,\n ): Promise<Record<string, unknown>> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${AUTOMATION_CREATE_ENDPOINT}`;\n\n if (active.kind === \"cloud\") {\n return callCloudProxy<Record<string, unknown>>({\n backend: active,\n method: \"POST\",\n path,\n body,\n headers: await buildAutomationRequestHeaders(),\n });\n }\n\n const { data } = await localAutomationAxios.post<Record<string, unknown>>(\n path,\n body,\n );\n return data;\n }\n\n static async checkHealth(): Promise<AutomationHealthResponse> {\n const active = getActiveBackend().backend;\n const path = `${AUTOMATION_BASE_PATH}${getAutomationEndpoint(\"health\")}`;\n\n try {\n if (active.kind === \"cloud\") {\n const response = await callCloudProxy<AutomationHealthResponse>({\n backend: active,\n method: \"GET\",\n path,\n // Fail fast, matching the local branch's 5s timeout below.\n timeoutSeconds: 5,\n headers: await buildAutomationRequestHeaders(),\n });\n return response;\n }\n\n const { data } = await localAutomationAxios.get<AutomationHealthResponse>(\n path,\n { timeout: 5000 },\n );\n return data;\n } catch {\n return { status: \"error\" };\n }\n }\n}\n\nexport default AutomationService;\n"],"mappings":"gaAuCA,IAAM,EAAuB,kBAkBvB,EAAuB,EAAA,QAAM,OAAO,EAE1C,eAAe,EACb,EAAuC,CAAC,EACP,CACjC,IAAM,EAAsB,MAAM,EAAA,uBAAuB,EACzD,MAAO,CACL,GAAG,EAAA,4BACH,GAAI,EACA,EAAG,EAAA,wCAAyC,CAAoB,EAChE,CAAC,EACL,GAAG,CACL,CACF,CAEA,EAAqB,aAAa,QAAQ,IAAI,KAAO,IAAW,CAC9D,IAAM,EAAiB,MAAM,EAA8B,EAO3D,GANA,OAAO,QAAQ,CAAc,EAAE,SAAS,CAAC,EAAM,KAAW,CACxD,EAAO,QAAQ,IAAI,EAAM,CAAK,CAChC,CAAC,EAIG,EAAO,QAAS,OAAO,EAU3B,IAAM,EAAU,EAAA,yBAAyB,EACzC,GAAI,CAAC,EAAS,MAAM,IAAI,EAAA,wBAExB,EAAO,QAAU,EAAQ,KAEzB,IAAM,EAAS,EAAQ,QAAQ,KAAK,EAIpC,OAHI,GACF,EAAO,Q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,sBAAsB,UAAU,IAEvE,GAAI,EAAO,OAAS,QAClB,OAAO,EAAA,eAAsC,CAC3C,QAAS,EACT,OAAQ,OACR,OACA,OACA,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAGH,GAAM,CAAE,QAAS,MAAM,EAAqB,KAC1C,EACA,CACF,EACA,OAAO,CACT,CAQA,aAAa,sBACX,EACkC,CAClC,IAAM,EAAS,EAAA,iBAAiB,EAAE,QAC5B,EAAO,GAAG,IAAuB,EAAA,6BAEvC,GAAI,EAAO,OAAS,QAClB,OAAO,EAAA,eAAwC,CAC7C,QAAS,EACT,OAAQ,OACR,OACA,OACA,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAGH,GAAM,CAAE,QAAS,MAAM,EAAqB,KAC1C,EACA,CACF,EACA,OAAO,CACT,CAEA,aAAa,aAAiD,CAC5D,IAAM,EAAS,EAAA,iBAAiB,EAAE,QAC5B,EAAO,GAAG,IAAuB,EAAA,sBAAsB,QAAQ,IAErE,GAAI,CACF,GAAI,EAAO,OAAS,QASlB,OAAO,MARgB,EAAA,eAAyC,CAC9D,QAAS,EACT,OAAQ,MACR,OAEA,eAAgB,EAChB,QAAS,MAAM,EAA8B,CAC/C,CAAC,EAIH,GAAM,CAAE,QAAS,MAAM,EAAqB,IAC1C,EACA,CAAE,QAAS,GAAK,CAClB,EACA,OAAO,CACT,MAAQ,CACN,MAAO,CAAE,OAAQ,OAAQ,CAC3B,CACF,CACF"}
|
|
@@ -18,6 +18,11 @@ declare class AutomationService {
|
|
|
18
18
|
static updateAutomation(id: string, body: Partial<Automation>): Promise<Automation>;
|
|
19
19
|
static deleteAutomation(id: string): Promise<void>;
|
|
20
20
|
static dispatchAutomation(id: string): Promise<AutomationRun>;
|
|
21
|
+
/**
|
|
22
|
+
* Cancel a pending or running automation run.
|
|
23
|
+
* Backend: POST /api/automation/v1/runs/{run_id}/cancel
|
|
24
|
+
*/
|
|
25
|
+
static cancelAutomationRun(runId: string): Promise<AutomationRun>;
|
|
21
26
|
static listAutomationRuns(id: string, params?: {
|
|
22
27
|
limit?: number;
|
|
23
28
|
offset?: number;
|
|
@@ -223,6 +223,17 @@ var E = class t {
|
|
|
223
223
|
let { data: i } = await g.post(r);
|
|
224
224
|
return i;
|
|
225
225
|
}
|
|
226
|
+
static async cancelAutomationRun(t) {
|
|
227
|
+
let n = e().backend, r = `${h}/v1/runs/${encodeURIComponent(t)}/cancel`;
|
|
228
|
+
if (n.kind === "cloud") return u({
|
|
229
|
+
backend: n,
|
|
230
|
+
method: "POST",
|
|
231
|
+
path: r,
|
|
232
|
+
headers: await _()
|
|
233
|
+
});
|
|
234
|
+
let { data: i } = await g.post(r);
|
|
235
|
+
return i;
|
|
236
|
+
}
|
|
226
237
|
static async listAutomationRuns(t, n = {}) {
|
|
227
238
|
let { limit: r = 50, offset: i = 0 } = n, a = e().backend, o = `${h}${f("runs", t)}`;
|
|
228
239
|
if (a.kind === "cloud") return u({
|