@openhands/agent-canvas 1.18.0 → 1.19.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-BQ4o4vqy.js +1 -0
- package/build/assets/{active-backend-context-BnH4-L8h.js → active-backend-context-BsLfwrXB.js} +1 -1
- package/build/assets/{agent-context-settings-D3peZkjX.js → agent-context-settings-D9i6ezoJ.js} +1 -1
- package/build/assets/{agent-profiles-service.api-DkeZaqIl.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
- package/build/assets/{agent-profiles-settings-7yMWYjGF.js → agent-profiles-settings-D-bUV2PX.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
- package/build/assets/agent-settings-BZJHtaIK.js +2 -0
- package/build/assets/agent-settings-D4snDd6u.js +1 -0
- package/build/assets/{alert-banner-eYyqvHL3.js → alert-banner-BkVt_8Or.js} +1 -1
- package/build/assets/{api-key-entry-screen-CCBvBD8u.js → api-key-entry-screen-fAIld-n7.js} +1 -1
- package/build/assets/{app-settings-BtYDs-Be.js → app-settings-DITbrM2u.js} +1 -1
- package/build/assets/automation-detail-DawHmaOl.js +3 -0
- package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
- package/build/assets/{automation-export-BJsfi7n2.js → automation-export-Kv6e0bHx.js} +1 -1
- package/build/assets/{automation-git-sync-B7o_Nbl-.js → automation-git-sync-Dd98G_Oz.js} +1 -1
- package/build/assets/{automation-setup-route-qaJ6lLCf.js → automation-setup-route-Cdc109ZD.js} +1 -1
- package/build/assets/{automation-templates-Bb98r-kx.js → automation-templates-Xhr-FDAB.js} +1 -1
- package/build/assets/automations-list-BeP1LuzQ.js +1 -0
- package/build/assets/{back-nav-button-B2yBiVMB.js → back-nav-button-DWNiN277.js} +1 -1
- package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
- package/build/assets/{backend-synced-settings-badge-DLEp6cq7.js → backend-synced-settings-badge-Br85iWIY.js} +1 -1
- package/build/assets/{badge-ehL-kgeO.js → badge-Cdnei7Ly.js} +1 -1
- package/build/assets/{base-modal-C1a0TsSx.js → base-modal-Ds7grR67.js} +1 -1
- package/build/assets/{brand-button-CUMfjb99.js → brand-button-mQq2Ld1I.js} +1 -1
- package/build/assets/{browser-SE24Tk8g.js → browser-Bfum8fkE.js} +2 -2
- package/build/assets/{browser-tab-HjJxHA0V.js → browser-tab-CmYT4j_r.js} +1 -1
- package/build/assets/{canvas-extension-page-BsUGBb1T.js → canvas-extension-page-CokKSVRG.js} +1 -1
- package/build/assets/{canvas-extensions-C9Tm6s_E.js → canvas-extensions-BoQEYG-2.js} +1 -1
- package/build/assets/{canvas-extensions-runtime-B8kxM4rO.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
- package/build/assets/{chat-send-button-CGvc2wpE.js → chat-send-button-DM3JgMc2.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BDX_ctNs.js → circle-plus-check-toggle-BbYBiUwv.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-D5uJ_4JE.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
- package/build/assets/{cog-CAEugqtV.js → cog-Dy1eWbSZ.js} +1 -1
- package/build/assets/{command-menu-CQxs4mtX.js → command-menu-mehU3Evb.js} +1 -1
- package/build/assets/{commits-tab-D0xgjipP.js → commits-tab-DhQW8CXi.js} +1 -1
- package/build/assets/{condenser-settings-D63NJRBT.js → condenser-settings-eRk6Fkx6.js} +1 -1
- package/build/assets/{confirmation-modal-78sd9Vny.js → confirmation-modal-BmVt_c0I.js} +1 -1
- package/build/assets/{context-menu-list-item-Cm7-7Y-7.js → context-menu-list-item-lx2zk9G7.js} +1 -1
- package/build/assets/{conversation-B_nweu5p.js → conversation-BOj0ENI6.js} +4 -4
- package/build/assets/conversation-SouWlGvs.js +1 -0
- package/build/assets/conversation-panel-SouWlGvs.js +1 -0
- package/build/assets/{conversation-state-store-9D_3P7q4.js → conversation-state-store-C6YncQNo.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-B3dpJXX0.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-B1ljgNxO.js → copy-to-clipboard-button-DVNXLylP.js} +1 -1
- package/build/assets/{device-verify-D5QRIS_x.js → device-verify-LP-x7nra.js} +1 -1
- package/build/assets/{dropdown-classes-BGvOvW2_.js → dropdown-classes-goDldkiu.js} +1 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
- package/build/assets/empty-state-Cd-TFe7i.js +1 -0
- package/build/assets/{entry.client-BMafTpjO.js → entry.client-CJdjIvMZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-UNaom12H.js → enum-filter-dropdown-pocrz9AL.js} +1 -1
- package/build/assets/{environment-switch-overlay-COibRUA-.js → environment-switch-overlay-Dwe78wRl.js} +1 -1
- package/build/assets/{error-state-Cf8LRuuY.js → error-state-SuWwztxV.js} +1 -1
- package/build/assets/{extensions-hub-C_6ahIua.js → extensions-hub-O0esK3Er.js} +1 -1
- package/build/assets/{extensions-navigation-C5GfpzFe.js → extensions-navigation-CgCVSXje.js} +1 -1
- package/build/assets/{files-tab-D5PPIWI1.js → files-tab-B_6t8ljw.js} +1 -1
- package/build/assets/{form-control-classes-Dbq-7YP_.js → form-control-classes-lQfLxzH4.js} +1 -1
- package/build/assets/{get-git-path-jU2zjqIB.js → get-git-path-Bp5rsUkl.js} +1 -1
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
- package/build/assets/{git-repo-dropdown-uxlFw2gn.js → git-repo-dropdown-DPQVumZg.js} +1 -1
- package/build/assets/{highlighted-source-view-C7pAXrT0.js → highlighted-source-view-Bp0sgK-f.js} +1 -1
- package/build/assets/home-BghzJd-D.js +1 -0
- package/build/assets/home-CXZ8zawS.js +1 -0
- package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
- package/build/assets/{home-store-DCbei3DX.js → home-store-DNQpfIEO.js} +1 -1
- package/build/assets/{hooks-service-Dnmhqc0Z.js → hooks-service-DkxnQa4N.js} +1 -1
- package/build/assets/index-home-Ca6Q5CtT.js +1 -0
- package/build/assets/{install-server-modal-B81I-5OE.js → install-server-modal-DvxxYKia.js} +1 -1
- package/build/assets/{key-O84CMFHb.js → key-CwTE6XJj.js} +1 -1
- package/build/assets/{launch-ZLxI4opd.js → launch-jsRGPRBx.js} +1 -1
- package/build/assets/link-external-B4gx3EeM.js +1 -0
- package/build/assets/{llm-not-configured-banner-Dh_ajcM8.js → llm-not-configured-banner-DMdL1vaX.js} +4 -4
- package/build/assets/{llm-settings-CODhjQzy.js → llm-settings-dkQ5Oq7W.js} +1 -1
- package/build/assets/llm-settings-lNDerSlu.js +1 -0
- package/build/assets/{llm-subscription-service-CgIDc38n.js → llm-subscription-service-BiQaZbvv.js} +1 -1
- package/build/assets/{loading-spinner-BeLV0IXf.js → loading-spinner-DK1sAwVg.js} +1 -1
- package/build/assets/{manage-backends-modal-cMXqCb-B.js → manage-backends-modal-DqCJohsX.js} +1 -1
- package/build/assets/manifest-ff93dc8c.js +1 -0
- package/build/assets/{manifest-subpage-layout-CVZgVKoY.js → manifest-subpage-layout-sxuPqfUr.js} +1 -1
- package/build/assets/{markdown-renderer-DyFl9-mL.js → markdown-renderer-BH5pqDuJ.js} +1 -1
- package/build/assets/mcp-BtaJDXnP.js +1 -0
- package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
- package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
- package/build/assets/mcp-page-DwbnQpVs.js +9 -0
- package/build/assets/{messages-Bk1xhbU2.js → messages-DmFJlW6c.js} +4 -4
- package/build/assets/{modal-body-C24WsdFb.js → modal-body-DBweM2EN.js} +1 -1
- package/build/assets/{modal-classes-B0b9eiL8.js → modal-classes-jvG85nkU.js} +1 -1
- package/build/assets/{modal-close-button-DfqfB2Nj.js → modal-close-button-BrM5fNnn.js} +1 -1
- package/build/assets/onboarding-CQ8T6T0U.js +1 -0
- package/build/assets/{onboarding-modal-BT3Gx_sZ.js → onboarding-modal-CnliiaSN.js} +1 -1
- package/build/assets/{organization-service.api-B5CvmnYQ.js → organization-service.api-DmFUEmu5.js} +1 -1
- package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
- package/build/assets/{planner-tab-CstoOlAB.js → planner-tab-CXph_C9F.js} +1 -1
- package/build/assets/{plugins-management-service-5rqVPEGN.js → plugins-management-service-CcEpfNKz.js} +1 -1
- package/build/assets/{profiles-service.api-D1XKMgr0.js → profiles-service.api-DdF_4Zhe.js} +1 -1
- package/build/assets/{providers-XmZ9HM4Q.js → providers-BWRnl31s.js} +1 -1
- package/build/assets/{proxy-XP6U1Dhv.js → proxy-DbEf3Nqr.js} +1 -1
- package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
- package/build/assets/root-j2fFRlWS.js +2 -0
- package/build/assets/{root-layout-DUquNZTU.js → root-layout-CfGgm2lo.js} +2 -2
- package/build/assets/root-sEWn3ha1.css +1 -0
- package/build/assets/{schema-field-Y3F8JvXd.js → schema-field-c3Ncgm4x.js} +1 -1
- package/build/assets/{sdk-section-page-CNZTLwH9.js → sdk-section-page-DFEiuiFQ.js} +1 -1
- package/build/assets/{secret-form-9-BoGA40.js → secret-form-WXXNFqTM.js} +1 -1
- package/build/assets/{secrets-service-BOIsfD9j.js → secrets-service-DU6wh3wX.js} +1 -1
- package/build/assets/{secrets-settings-CBJgFr42.js → secrets-settings-BEqbPvjy.js} +1 -1
- package/build/assets/{settings-D4hdToD4.js → settings-DjaSQwFh.js} +1 -1
- package/build/assets/{settings-dropdown-input-DBvsZ7-Q.js → settings-dropdown-input-BRR2OZwi.js} +1 -1
- package/build/assets/{settings-index-DeQphyBK.js → settings-index-DHv4XFcM.js} +1 -1
- package/build/assets/{settings-input-dVuzapBA.js → settings-input-Cm4VxUon.js} +1 -1
- package/build/assets/{settings-list-classes-DhAPuXm6.js → settings-list-classes-CaUfKZ33.js} +1 -1
- package/build/assets/{settings-modal-tHiJ8iYV.js → settings-modal-djXuAnBO.js} +1 -1
- package/build/assets/{settings-nav-GAQjW1a-.js → settings-nav-DFb3hBMr.js} +1 -1
- package/build/assets/{settings-service.api-C1vZH9Vh.js → settings-service.api-Q9lKW1TX.js} +1 -1
- package/build/assets/{settings-switch-DDd1cQ8t.js → settings-switch-seaSJc7t.js} +1 -1
- package/build/assets/{shared-conversation-Cyg7m7ns.js → shared-conversation-x3rxVCon.js} +1 -1
- package/build/assets/{sidebar-layout-DH0E-5KW.js → sidebar-layout-B6mcvvdV.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CQ4iky__.js → sidebar-mobile-menu-toggle-CEqS8KnA.js} +1 -1
- package/build/assets/{sidebar-nav-link-oLQiKUBu.js → sidebar-nav-link-BTHX11LG.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-TfvNNnnr.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
- package/build/assets/{skill-card-pill-row-DfjIfj0K.js → skill-card-pill-row-TD39nfP3.js} +1 -1
- package/build/assets/{skill-filter-DsNLmn76.js → skill-filter-CdBbbwjm.js} +1 -1
- package/build/assets/{skill-icon-badge-0MK_68Nc.js → skill-icon-badge-vUEp7gsC.js} +1 -1
- package/build/assets/{skill-scope-BE-H9TSZ.js → skill-scope-BTRBQt0-.js} +1 -1
- package/build/assets/{skills-plugins-vzSdxSk_.js → skills-plugins-k1tUNAw4.js} +1 -1
- package/build/assets/{skills-settings-BiPOH9H9.js → skills-settings-CENviPT7.js} +1 -1
- package/build/assets/{styled-tooltip-CejG0rqv.js → styled-tooltip-DVAlWYnL.js} +1 -1
- package/build/assets/{task-list-tab-OkZSqnTp.js → task-list-tab-BLKF_x9f.js} +1 -1
- package/build/assets/{terminal-Dph60VFZ.js → terminal-Ckbnqb23.js} +1 -1
- package/build/assets/{toggle-switch-B2uXaAUS.js → toggle-switch-DeiG9Mf6.js} +1 -1
- package/build/assets/trash-CXN2R54L.js +1 -0
- package/build/assets/{typography-DgcLGdHk.js → typography-NarNyelM.js} +1 -1
- package/build/assets/{usage-tab-MCmNRAnR.js → usage-tab-Drd3O006.js} +1 -1
- package/build/assets/{use-acp-credential-form-ychoGqjC.js → use-acp-credential-form-CJ5wPsQm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-8L8Xdghy.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
- package/build/assets/{use-agent-profiles-Bi8hSkze.js → use-agent-profiles-LCvb5OXT.js} +1 -1
- package/build/assets/{use-automation-health-U99vvHxx.js → use-automation-health-DdgSa8sA.js} +1 -1
- package/build/assets/{use-automation-permissions-Buus0R6h.js → use-automation-permissions-D3kEeieu.js} +1 -1
- package/build/assets/{use-automations-Bq5hVuv0.js → use-automations-CEubcYTD.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-MzIeEV8F.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
- package/build/assets/{use-canvas-extensions-Ca9KoVEm.js → use-canvas-extensions-BMacwi2v.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-B4ZLUZSa.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
- package/build/assets/{use-config-l5tkDHyD.js → use-config-3WYcJsgC.js} +1 -1
- package/build/assets/{use-create-conversation-i_PdFdIs.js → use-create-conversation-Be-eVpFp.js} +1 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
- package/build/assets/{use-free-models-gCsJ5BV0.js → use-free-models-Ci3FkKEm.js} +1 -1
- package/build/assets/{use-get-secrets-CMTuWEp_.js → use-get-secrets-fqS0kxt6.js} +1 -1
- package/build/assets/{use-llm-configured-Dl4zg8ht.js → use-llm-configured-B71ZEVg2.js} +1 -1
- package/build/assets/{use-llm-profiles-SWsuFmFu.js → use-llm-profiles-xtCBMbef.js} +1 -1
- package/build/assets/{use-manifest-capabilities-CdqYfUAC.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
- package/build/assets/{use-onboarding-completion-Xl63ZvzQ.js → use-onboarding-completion-CEgjL02y.js} +1 -1
- package/build/assets/{use-pinned-home-route-BXDIUaxQ.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
- package/build/assets/{use-plugins-marketplace-BIIaPiaB.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
- package/build/assets/{use-save-agent-profile-D-ZHHE94.js → use-save-agent-profile-D7hJuW_u.js} +1 -1
- package/build/assets/{use-save-settings-Dapkf4cC.js → use-save-settings-CikTu5xV.js} +1 -1
- package/build/assets/{use-settings-C2KKQKVC.js → use-settings-BWIH5EuN.js} +1 -1
- package/build/assets/{use-settings-nav-items-TOc0Rsfd.js → use-settings-nav-items-DSKwLDnd.js} +1 -1
- package/build/assets/use-tracking-ChnSFChv.js +3 -0
- package/build/assets/{use-user-conversation-5UFqMoO4.js → use-user-conversation-C_l65DqW.js} +1 -1
- package/build/assets/utils-D-gOfhmN.js +1 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
- package/build/assets/{verification-settings-DdBpaVPz.js → verification-settings-PKtoIUUY.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +10 -0
- package/build/locales/ca/openhands.json +10 -0
- package/build/locales/de/openhands.json +10 -0
- package/build/locales/en/openhands.json +10 -0
- package/build/locales/es/openhands.json +10 -0
- package/build/locales/fr/openhands.json +10 -0
- package/build/locales/it/openhands.json +10 -0
- package/build/locales/ja/openhands.json +10 -0
- package/build/locales/ko-KR/openhands.json +10 -0
- package/build/locales/no/openhands.json +10 -0
- package/build/locales/pt/openhands.json +10 -0
- package/build/locales/tr/openhands.json +10 -0
- package/build/locales/uk/openhands.json +10 -0
- package/build/locales/zh-CN/openhands.json +10 -0
- package/build/locales/zh-TW/openhands.json +10 -0
- package/config/defaults.json +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
- package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -0
- 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/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +0 -5
- package/dist/constants/acp-providers.js +20 -16
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/profile-scope.d.ts +21 -0
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.js +3 -1
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.js +8 -9
- package/dist/hooks/use-drag-resize.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 +10 -0
- 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 +170 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +10 -0
- package/dist/locales/ca/openhands.json +10 -0
- package/dist/locales/de/openhands.json +10 -0
- package/dist/locales/en/openhands.json +10 -0
- package/dist/locales/es/openhands.json +10 -0
- package/dist/locales/fr/openhands.json +10 -0
- package/dist/locales/it/openhands.json +10 -0
- package/dist/locales/ja/openhands.json +10 -0
- package/dist/locales/ko-KR/openhands.json +10 -0
- package/dist/locales/no/openhands.json +10 -0
- package/dist/locales/pt/openhands.json +10 -0
- package/dist/locales/tr/openhands.json +10 -0
- package/dist/locales/uk/openhands.json +10 -0
- package/dist/locales/zh-CN/openhands.json +10 -0
- package/dist/locales/zh-TW/openhands.json +10 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +2 -2
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +199 -61
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +5 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +23 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/utils/automation-disabled-reason.cjs +2 -0
- package/dist/utils/automation-disabled-reason.cjs.map +1 -0
- package/dist/utils/automation-disabled-reason.d.ts +32 -0
- package/dist/utils/automation-disabled-reason.js +19 -0
- package/dist/utils/automation-disabled-reason.js.map +1 -0
- package/dist/utils/parse-git-remote-url.cjs +1 -1
- package/dist/utils/parse-git-remote-url.cjs.map +1 -1
- package/dist/utils/parse-git-remote-url.d.ts +5 -1
- package/dist/utils/parse-git-remote-url.js +20 -13
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +79 -8
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/static-server.mjs +24 -7
- package/build/assets/acp-providers-DcY_mKYa.js +0 -1
- package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +0 -88
- package/build/assets/agent-settings-BF8hM6wb.js +0 -2
- package/build/assets/agent-settings-YPutBAeR.js +0 -1
- package/build/assets/automation-detail-BxXhb_m2.js +0 -3
- package/build/assets/automations-list-DEPVNud3.js +0 -1
- package/build/assets/backend-form-modal-DxisQV_6.js +0 -1
- package/build/assets/conversation-edjzrv5w.js +0 -1
- package/build/assets/conversation-panel-edjzrv5w.js +0 -1
- package/build/assets/edit-automation-modal-D_JWSmxT.js +0 -1
- package/build/assets/empty-state-FK_s1B60.js +0 -1
- package/build/assets/git-repo-dropdown-BoDDWXfX.js +0 -1
- package/build/assets/home-BM5_Wz_R.js +0 -1
- package/build/assets/home-Ivfm7KC4.js +0 -1
- package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +0 -1
- package/build/assets/index-home-td9BN2T3.js +0 -1
- package/build/assets/kebab-menu-item-content-SCJBwZnp.js +0 -1
- package/build/assets/link-external-BNZzCM1I.js +0 -1
- package/build/assets/llm-settings-CZaXYgtw.js +0 -1
- package/build/assets/manifest-bfeccb98.js +0 -1
- package/build/assets/mcp-CraxoXQv.js +0 -1
- package/build/assets/mcp-marketplace-utils-C7PYr293.js +0 -1
- package/build/assets/mcp-page-CteH_K0N.js +0 -9
- package/build/assets/onboarding-DXFBRqEy.js +0 -1
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
- package/build/assets/recommended-automations-launcher-DEHRKIAg.js +0 -1
- package/build/assets/root-CM6IZHlg.css +0 -1
- package/build/assets/root-DdFkodKW.js +0 -2
- package/build/assets/trash-Ckh7yCaB.js +0 -1
- package/build/assets/use-create-secret-CjWq0J4O.js +0 -1
- package/build/assets/use-tracking-j4uo9VEW.js +0 -3
- package/build/assets/utils-BgLSZdyy.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../node_modules/lucide-react/dist/esm/icons/zap.cjs"),r=require("../../../../utils/automation-run-display.cjs"),i=require("../../../../utils/format-relative-time.cjs"),a=require("../../../../icons/clock.cjs"),o=require("./automation-run-health.cjs"),s=require("../../automations/detail/run-phase.cjs"),c=require("./automation-health-indicator.cjs");let
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../node_modules/lucide-react/dist/esm/icons/zap.cjs"),r=require("../../../../utils/automation-run-display.cjs"),i=require("../../../../utils/format-relative-time.cjs"),a=require("../../../../icons/clock.cjs"),o=require("./automation-run-health.cjs"),s=require("../../automations/detail/run-phase.cjs"),c=require("./automation-health-indicator.cjs"),l=require("../../../../utils/automation-disabled-reason.cjs");let u=require("react/jsx-runtime");function d(e){return e.isError?t.I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE:e.latestRun?r.getAutomationRunBadgeLabelKey(r.getAutomationRunDisplay(e.latestRun).badgeStatus):o.getRunHealthLabelKey(o.deriveRunHealth(e))}function f({label:e,children:t}){return(0,u.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,u.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,u.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function p({run:n}){let{t:r}=e.useTranslation(`openhands`),i=s.useRunPhase({status:n?.status,code:n?.phase_code,label:n?.phase_label,updatedAt:n?.phase_updated_at});if(!n||!s.shouldShowRunPhase(n.status)||!i)return null;let{text:a,age:o}=i;return(0,u.jsx)(f,{label:r(t.I18nKey.AUTOMATIONS$DETAIL$PHASE),children:(0,u.jsxs)(`span`,{"data-testid":`run-phase-row`,children:[a,o?(0,u.jsxs)(`span`,{className:`text-muted`,children:[` · `,o]}):null]})})}function m({automation:s,runState:m}){let{t:h,i18n:g}=e.useTranslation(`openhands`),{latestRun:_}=m,v=_?o.getLastRunTimestamp(_):null,y=s.trigger.type===`event`?n.Zap:a.default,b=o.deriveRunHealth(m),x=_?r.getAutomationRunDisplay(_):null,S=l.hasDisablementReason(s)?l.getDisablementReasonDisplay(s,h):null;return(0,u.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,u.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:s.name}),(0,u.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$TRIGGER),children:(0,u.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,u.jsx)(y,{className:`mt-0.5 size-3 shrink-0`,"aria-hidden":`true`}),(0,u.jsx)(`span`,{className:`break-all`,children:o.getTriggerSummary(s)})]})}),(0,u.jsx)(f,{label:h(t.I18nKey.COMMON$STATUS),children:(0,u.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,u.jsx)(c.AutomationHealthIndicator,{health:b}),(0,u.jsx)(`span`,{children:h(d(m))})]})}),S?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING),children:(0,u.jsx)(`span`,{"data-testid":`automation-tooltip-disabled-reason`,className:`line-clamp-3 text-[var(--oh-text-secondary)]`,children:S.text})}):null,(0,u.jsx)(p,{run:_}),v?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$LAST_RUN),children:i.formatRelativeTime(v,g.language,h)}):null,x?.summary?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL),children:(0,u.jsx)(`span`,{className:`line-clamp-3 text-[var(--oh-text-secondary)]`,children:x.summary})}):null]})]})}exports.HomeAutomationRunTooltip=m,exports.getRunStatusLabelKey=d;
|
|
2
2
|
//# sourceMappingURL=home-automation-run-tooltip.cjs.map
|
package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-automation-run-tooltip.cjs","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"home-automation-run-tooltip.cjs","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\nimport {\n getDisablementReasonDisplay,\n hasDisablementReason,\n} from \"#/utils/automation-disabled-reason\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n const disabledReason = hasDisablementReason(automation)\n ? getDisablementReasonDisplay(automation, t)\n : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n {disabledReason ? (\n <PreviewRow\n label={t(I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING)}\n >\n <span\n data-testid=\"automation-tooltip-disabled-reason\"\n className=\"line-clamp-3 text-[var(--oh-text-secondary)]\"\n >\n {disabledReason.text}\n </span>\n </PreviewRow>\n ) : null}\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"2oBA4BA,SAAgB,EACd,EACS,CAOT,OANI,EAAS,QAAgB,EAAA,QAAQ,wCACjC,EAAS,UACJ,EAAA,8BACL,EAAA,wBAAwB,EAAS,SAAS,EAAE,WAC9C,EAEK,EAAA,qBAAqB,EAAA,gBAAgB,CAAQ,CAAC,CACvD,CAEA,SAAS,EAAW,CAClB,QACA,YAIC,CACD,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,0CAAf,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,gDAAwC,CAAY,CAAA,GACpE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,yDACb,UACG,CAAA,CACH,GAET,CAUA,SAAS,EAAS,CAAE,OAAsC,CACxD,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAQ,EAAA,YAAY,CACxB,OAAQ,GAAK,OACb,KAAM,GAAK,WACX,MAAO,GAAK,YACZ,UAAW,GAAK,gBAClB,CAAC,EAED,GAAI,CAAC,GAAO,CAAC,EAAA,mBAAmB,EAAI,MAAM,GAAK,CAAC,EAAO,OAAO,KAE9D,GAAM,CAAE,OAAM,OAAQ,EAEtB,OACE,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,wBAAwB,YACnD,EAAA,EAAA,MAAC,OAAD,CAAM,cAAY,yBAAlB,CACG,EACA,GAAM,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,sBAAhB,CAA6B,MAAI,CAAU,IAAI,IAClD,GACI,CAAA,CAEhB,CAMA,SAAgB,EAAyB,CACvC,aACA,YAIC,CACD,GAAM,CAAE,IAAG,QAAS,EAAA,eAAe,WAAW,EACxC,CAAE,aAAc,EAChB,EAAY,EAAY,EAAA,oBAAoB,CAAS,EAAI,KACzD,EAAc,EAAW,QAAQ,OAAS,QAAU,EAAA,IAAM,EAAA,QAC1D,EAAS,EAAA,gBAAgB,CAAQ,EACjC,EAAU,EAAY,EAAA,wBAAwB,CAAS,EAAI,KAC3D,EAAiB,EAAA,qBAAqB,CAAU,EAClD,EAAA,4BAA4B,EAAY,CAAC,EACzC,KAEJ,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,6CAAf,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sDACb,EAAW,IACR,CAAA,GAEN,EAAA,EAAA,MAAC,KAAD,CAAI,UAAU,iCAAd,EACE,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,0BAA0B,YACrD,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,mDAAhB,EACE,EAAA,EAAA,KAAC,EAAD,CACE,UAAU,yBACV,cAAY,MACb,CAAA,GACD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,qBAAa,EAAA,kBAAkB,CAAU,CAAQ,CAAA,CAC7D,GACI,CAAA,GAEZ,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,aAAa,YACxC,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,oDAAhB,EACE,EAAA,EAAA,KAAC,EAAA,0BAAD,CAAmC,QAAS,CAAA,GAC5C,EAAA,EAAA,KAAC,OAAD,CAAA,SAAO,EAAE,EAAqB,CAAQ,CAAC,CAAQ,CAAA,CAC3C,GACI,CAAA,EAEX,GACC,EAAA,EAAA,KAAC,EAAD,CACE,MAAO,EAAE,EAAA,QAAQ,0CAA0C,YAE3D,EAAA,EAAA,KAAC,OAAD,CACE,cAAY,qCACZ,UAAU,wDAET,EAAe,IACZ,CAAA,CACI,CAAA,EACV,MAEJ,EAAA,EAAA,KAAC,EAAD,CAAU,IAAK,CAAY,CAAA,EAE1B,GACC,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,2BAA2B,WACrD,EAAA,mBAAmB,EAAW,EAAK,SAAU,CAAC,CACrC,CAAA,EACV,KAEH,GAAS,SACR,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,6BAA6B,YACxD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,wDACb,EAAQ,OACL,CAAA,CACI,CAAA,EACV,IACF,GACD,GAET"}
|
|
@@ -7,24 +7,25 @@ import o from "../../../../icons/clock.js";
|
|
|
7
7
|
import { deriveRunHealth as s, getLastRunTimestamp as c, getRunHealthLabelKey as l, getTriggerSummary as u } from "./automation-run-health.js";
|
|
8
8
|
import { shouldShowRunPhase as d, useRunPhase as f } from "../../automations/detail/run-phase.js";
|
|
9
9
|
import { AutomationHealthIndicator as p } from "./automation-health-indicator.js";
|
|
10
|
-
import {
|
|
10
|
+
import { getDisablementReasonDisplay as m, hasDisablementReason as h } from "../../../../utils/automation-disabled-reason.js";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/features/home/featured-automations/home-automation-run-tooltip.tsx
|
|
12
|
-
function
|
|
13
|
+
function v(e) {
|
|
13
14
|
return e.isError ? t.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE : e.latestRun ? r(i(e.latestRun).badgeStatus) : l(s(e));
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
function y({ label: e, children: t }) {
|
|
17
|
+
return /* @__PURE__ */ _("div", {
|
|
17
18
|
className: "flex items-start gap-2 text-xs",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ g("span", {
|
|
19
20
|
className: "w-20 shrink-0 text-[var(--oh-muted)]",
|
|
20
21
|
children: e
|
|
21
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ g("span", {
|
|
22
23
|
className: "min-w-0 flex-1 break-words text-[var(--oh-foreground)]",
|
|
23
24
|
children: t
|
|
24
25
|
})]
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function b({ run: n }) {
|
|
28
29
|
let { t: r } = e("openhands"), i = f({
|
|
29
30
|
status: n?.status,
|
|
30
31
|
code: n?.phase_code,
|
|
@@ -33,57 +34,65 @@ function v({ run: n }) {
|
|
|
33
34
|
});
|
|
34
35
|
if (!n || !d(n.status) || !i) return null;
|
|
35
36
|
let { text: a, age: o } = i;
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ g(y, {
|
|
37
38
|
label: r(t.AUTOMATIONS$DETAIL$PHASE),
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ _("span", {
|
|
39
40
|
"data-testid": "run-phase-row",
|
|
40
|
-
children: [a, o ? /* @__PURE__ */
|
|
41
|
+
children: [a, o ? /* @__PURE__ */ _("span", {
|
|
41
42
|
className: "text-muted",
|
|
42
43
|
children: [" · ", o]
|
|
43
44
|
}) : null]
|
|
44
45
|
})
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
let { t: d, i18n: f } = e("openhands"), { latestRun:
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
function x({ automation: r, runState: l }) {
|
|
49
|
+
let { t: d, i18n: f } = e("openhands"), { latestRun: x } = l, S = x ? c(x) : null, C = r.trigger.type === "event" ? n : o, w = s(l), T = x ? i(x) : null, E = h(r) ? m(r, d) : null;
|
|
50
|
+
return /* @__PURE__ */ _("div", {
|
|
50
51
|
className: "flex w-[280px] flex-col gap-3 p-3",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ g("span", {
|
|
52
53
|
className: "break-words text-sm font-medium text-white",
|
|
53
54
|
children: r.name
|
|
54
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ _("dl", {
|
|
55
56
|
className: "flex flex-col gap-1.5",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ g(y, {
|
|
58
59
|
label: d(t.AUTOMATIONS$DETAIL$TRIGGER),
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ _("span", {
|
|
60
61
|
className: "inline-flex min-w-0 items-start gap-1.5",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ g(C, {
|
|
62
63
|
className: "mt-0.5 size-3 shrink-0",
|
|
63
64
|
"aria-hidden": "true"
|
|
64
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ g("span", {
|
|
65
66
|
className: "break-all",
|
|
66
67
|
children: u(r)
|
|
67
68
|
})]
|
|
68
69
|
})
|
|
69
70
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ g(y, {
|
|
71
72
|
label: d(t.COMMON$STATUS),
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ _("span", {
|
|
73
74
|
className: "inline-flex min-w-0 items-center gap-1.5",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ g(p, { health: w }), /* @__PURE__ */ g("span", { children: d(v(l)) })]
|
|
75
76
|
})
|
|
76
77
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
78
|
+
E ? /* @__PURE__ */ g(y, {
|
|
79
|
+
label: d(t.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING),
|
|
80
|
+
children: /* @__PURE__ */ g("span", {
|
|
81
|
+
"data-testid": "automation-tooltip-disabled-reason",
|
|
82
|
+
className: "line-clamp-3 text-[var(--oh-text-secondary)]",
|
|
83
|
+
children: E.text
|
|
84
|
+
})
|
|
85
|
+
}) : null,
|
|
86
|
+
/* @__PURE__ */ g(b, { run: x }),
|
|
87
|
+
S ? /* @__PURE__ */ g(y, {
|
|
79
88
|
label: d(t.AUTOMATIONS$DETAIL$LAST_RUN),
|
|
80
|
-
children: a(
|
|
89
|
+
children: a(S, f.language, d)
|
|
81
90
|
}) : null,
|
|
82
|
-
|
|
91
|
+
T?.summary ? /* @__PURE__ */ g(y, {
|
|
83
92
|
label: d(t.AUTOMATIONS$DETAIL$TASK_LABEL),
|
|
84
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ g("span", {
|
|
85
94
|
className: "line-clamp-3 text-[var(--oh-text-secondary)]",
|
|
86
|
-
children:
|
|
95
|
+
children: T.summary
|
|
87
96
|
})
|
|
88
97
|
}) : null
|
|
89
98
|
]
|
|
@@ -91,6 +100,6 @@ function y({ automation: r, runState: l }) {
|
|
|
91
100
|
});
|
|
92
101
|
}
|
|
93
102
|
//#endregion
|
|
94
|
-
export {
|
|
103
|
+
export { x as HomeAutomationRunTooltip, v as getRunStatusLabelKey };
|
|
95
104
|
|
|
96
105
|
//# sourceMappingURL=home-automation-run-tooltip.js.map
|
package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-automation-run-tooltip.js","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"home-automation-run-tooltip.js","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\nimport {\n getDisablementReasonDisplay,\n hasDisablementReason,\n} from \"#/utils/automation-disabled-reason\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n const disabledReason = hasDisablementReason(automation)\n ? getDisablementReasonDisplay(automation, t)\n : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n {disabledReason ? (\n <PreviewRow\n label={t(I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING)}\n >\n <span\n data-testid=\"automation-tooltip-disabled-reason\"\n className=\"line-clamp-3 text-[var(--oh-text-secondary)]\"\n >\n {disabledReason.text}\n </span>\n </PreviewRow>\n ) : null}\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAgB,EACd,GACS;CAOT,OANI,EAAS,UAAgB,EAAQ,0CACjC,EAAS,YACJ,EACL,EAAwB,EAAS,SAAS,EAAE,WAC9C,IAEK,EAAqB,EAAgB,CAAQ,CAAC;AACvD;AAEA,SAAS,EAAW,EAClB,UACA,eAIC;CACD,OACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aAAwC;EAAY,CAAA,GACpE,kBAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CACH;;AAET;AAUA,SAAS,EAAS,EAAE,UAAsC;CACxD,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAQ,EAAY;EACxB,QAAQ,GAAK;EACb,MAAM,GAAK;EACX,OAAO,GAAK;EACZ,WAAW,GAAK;CAClB,CAAC;CAED,IAAI,CAAC,KAAO,CAAC,EAAmB,EAAI,MAAM,KAAK,CAAC,GAAO,OAAO;CAE9D,IAAM,EAAE,SAAM,WAAQ;CAEtB,OACE,kBAAC,GAAD;EAAY,OAAO,EAAE,EAAQ,wBAAwB;YACnD,kBAAC,QAAD;GAAM,eAAY;aAAlB,CACG,GACA,IAAM,kBAAC,QAAD;IAAM,WAAU;cAAhB,CAA6B,OAAI,CAAU;QAAI,IAClD;;CACI,CAAA;AAEhB;AAMA,SAAgB,EAAyB,EACvC,eACA,eAIC;CACD,IAAM,EAAE,MAAG,YAAS,EAAe,WAAW,GACxC,EAAE,iBAAc,GAChB,IAAY,IAAY,EAAoB,CAAS,IAAI,MACzD,IAAc,EAAW,QAAQ,SAAS,UAAU,IAAM,GAC1D,IAAS,EAAgB,CAAQ,GACjC,IAAU,IAAY,EAAwB,CAAS,IAAI,MAC3D,IAAiB,EAAqB,CAAU,IAClD,EAA4B,GAAY,CAAC,IACzC;CAEJ,OACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aACb,EAAW;EACR,CAAA,GAEN,kBAAC,MAAD;GAAI,WAAU;aAAd;IACE,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,0BAA0B;eACrD,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD;OACE,WAAU;OACV,eAAY;MACb,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;iBAAa,EAAkB,CAAU;MAAQ,CAAA,CAC7D;;IACI,CAAA;IAEZ,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,aAAa;eACxC,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD,EAAmC,UAAS,CAAA,GAC5C,kBAAC,QAAD,EAAA,UAAO,EAAE,EAAqB,CAAQ,CAAC,EAAQ,CAAA,CAC3C;;IACI,CAAA;IAEX,IACC,kBAAC,GAAD;KACE,OAAO,EAAE,EAAQ,0CAA0C;eAE3D,kBAAC,QAAD;MACE,eAAY;MACZ,WAAU;gBAET,EAAe;KACZ,CAAA;IACI,CAAA,IACV;IAEJ,kBAAC,GAAD,EAAU,KAAK,EAAY,CAAA;IAE1B,IACC,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,2BAA2B;eACrD,EAAmB,GAAW,EAAK,UAAU,CAAC;IACrC,CAAA,IACV;IAEH,GAAS,UACR,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,6BAA6B;eACxD,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAQ;KACL,CAAA;IACI,CAAA,IACV;GACF;IACD;;AAET"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ProfileScopeItem {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string | null;
|
|
4
|
+
}
|
|
5
|
+
interface ProfileScopeListProps {
|
|
6
|
+
/** Prefix: the list is `<testId>-list`, each row `<testId>-<name>`. */
|
|
7
|
+
testId: string;
|
|
8
|
+
items: ProfileScopeItem[];
|
|
9
|
+
selected: string[];
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
onToggle: (name: string, checked: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Per-item toggles for a profile scope field such as `mcp_server_refs`.
|
|
15
|
+
*
|
|
16
|
+
* Rows are keyed by the wire name — the same identifier the API takes — so an
|
|
17
|
+
* entry this build has no description for is still legible and selectable.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ProfileScopeList({ testId, items, selected, isDisabled, onToggle, }: ProfileScopeListProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
package/dist/config/defaults.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");var e={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");var e={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.48.0`,agentCanvas:`1.19.0`,automation:`1.12.1`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3,_vscodeComment:`Port the bundled editor binds to inside the container; agent-server's own default. Only the Docker entrypoint reads this — the npm launchers derive the editor port from the agent-server port so several stacks can run side by side. It is never published: the editor is reached through paths.vscodeBasePath on the proxy port.`,vscode:8001},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`,_vscodeBasePathComment:`Path prefix the bundled editor is served under, on the same origin as the canvas. Passed to agent-server as OH_VSCODE_BASE_PATH (it launches openvscode-server with --server-base-path and advertises the prefix in /api/vscode/url), and registered as an ingress route to the VSCode port. Keeping one value on both sides is what lets a single-origin deployment reach the editor without publishing a second port. Tradeoff: a path prefix routes but does not isolate, so the editor shares the canvas's browser origin and therefore its localStorage — see docs/SELF_HOSTING.md and OpenHands/OpenHands#16492.`,vscodeBasePath:`/vscode`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`},telemetry:{posthogApiKey:`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,posthogHost:`https://us.i.posthog.com`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=defaults.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.cjs","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.
|
|
1
|
+
{"version":3,"file":"defaults.cjs","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.48.0\",\n \"agentCanvas\": \"1.19.0\",\n \"automation\": \"1.12.1\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000,\n \"_vscodeComment\": \"Port the bundled editor binds to inside the container; agent-server's own default. Only the Docker entrypoint reads this — the npm launchers derive the editor port from the agent-server port so several stacks can run side by side. It is never published: the editor is reached through paths.vscodeBasePath on the proxy port.\",\n \"vscode\": 8001\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\",\n \"canvasBasePath\": \"/canvas\",\n \"_vscodeBasePathComment\": \"Path prefix the bundled editor is served under, on the same origin as the canvas. Passed to agent-server as OH_VSCODE_BASE_PATH (it launches openvscode-server with --server-base-path and advertises the prefix in /api/vscode/url), and registered as an ingress route to the VSCode port. Keeping one value on both sides is what lets a single-origin deployment reach the editor without publishing a second port. Tradeoff: a path prefix routes but does not isolate, so the editor shares the canvas's browser origin and therefore its localStorage — see docs/SELF_HOSTING.md and OpenHands/OpenHands#16492.\",\n \"vscodeBasePath\": \"/vscode\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n },\n \"telemetry\": {\n \"posthogApiKey\": \"phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U\",\n \"posthogHost\": \"https://us.i.posthog.com\"\n }\n}\n"],"mappings":""}
|
package/dist/config/defaults.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var e = {
|
|
2
2
|
_comment: "Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.",
|
|
3
3
|
versions: {
|
|
4
|
-
agentServer: "1.
|
|
5
|
-
agentCanvas: "1.
|
|
6
|
-
automation: "1.
|
|
4
|
+
agentServer: "1.48.0",
|
|
5
|
+
agentCanvas: "1.19.0",
|
|
6
|
+
automation: "1.12.1"
|
|
7
7
|
},
|
|
8
8
|
compatibility: { minimumAgentServer: "1.28.0" },
|
|
9
9
|
constraints: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.
|
|
1
|
+
{"version":3,"file":"defaults.js","names":[],"sources":["../../config/defaults.json"],"sourcesContent":["{\n \"_comment\": \"Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.\",\n \"versions\": {\n \"agentServer\": \"1.48.0\",\n \"agentCanvas\": \"1.19.0\",\n \"automation\": \"1.12.1\"\n },\n \"compatibility\": {\n \"minimumAgentServer\": \"1.28.0\"\n },\n \"constraints\": {\n \"_comment\": \"Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).\",\n \"agentClientProtocol\": \"agent-client-protocol<0.11\"\n },\n \"images\": {\n \"agentServer\": \"ghcr.io/openhands/agent-server\",\n \"agentCanvas\": \"ghcr.io/openhands/agent-canvas\"\n },\n \"ports\": {\n \"agentServer\": 18000,\n \"automation\": 18001,\n \"proxy\": 8000,\n \"_vscodeComment\": \"Port the bundled editor binds to inside the container; agent-server's own default. Only the Docker entrypoint reads this — the npm launchers derive the editor port from the agent-server port so several stacks can run side by side. It is never published: the editor is reached through paths.vscodeBasePath on the proxy port.\",\n \"vscode\": 8001\n },\n \"paths\": {\n \"stateSubdir\": \"agent-canvas\",\n \"conversations\": \"agent-canvas/conversations\",\n \"bashEvents\": \"agent-canvas/bash_events\",\n \"automationDb\": \"automation/automations.db\",\n \"canvasBasePath\": \"/canvas\",\n \"_vscodeBasePathComment\": \"Path prefix the bundled editor is served under, on the same origin as the canvas. Passed to agent-server as OH_VSCODE_BASE_PATH (it launches openvscode-server with --server-base-path and advertises the prefix in /api/vscode/url), and registered as an ingress route to the VSCode port. Keeping one value on both sides is what lets a single-origin deployment reach the editor without publishing a second port. Tradeoff: a path prefix routes but does not isolate, so the editor shares the canvas's browser origin and therefore its localStorage — see docs/SELF_HOSTING.md and OpenHands/OpenHands#16492.\",\n \"vscodeBasePath\": \"/vscode\"\n },\n \"packages\": {\n \"agentServer\": \"openhands-agent-server\",\n \"automation\": \"openhands-automation\",\n \"tools\": \"openhands-tools\",\n \"workspace\": \"openhands-workspace\"\n },\n \"telemetry\": {\n \"posthogApiKey\": \"phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U\",\n \"posthogHost\": \"https://us.i.posthog.com\"\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../i18n/declaration.cjs"),t=require("../node_modules/@openhands/typescript-client/dist/models/acp.cjs");require("../node_modules/@openhands/typescript-client/dist/index.cjs");function n(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t===`acp-managed`?null:t}function r(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=n(t);if(e)return e}return e.providerDefault??null}var i={"claude-code":{icon:`claude-code`,description_key:e.I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../i18n/declaration.cjs"),t=require("../node_modules/@openhands/typescript-client/dist/models/acp.cjs");require("../node_modules/@openhands/typescript-client/dist/index.cjs");function n(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t===`acp-managed`?null:t}function r(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=n(t);if(e)return e}return e.providerDefault??null}var i={"claude-code":{icon:`claude-code`,description_key:e.I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}};function a(e){return t.getAcpProvider(e)?.available_models?.map(e=>({id:e.id,label:e.label}))}var o=Object.entries(i).map(([e,n])=>{let r=t.getAcpProvider(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:a(e),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}});e.I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,e.I18nKey.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT,e.I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,e.I18nKey.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT,e.I18nKey.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT,e.I18nKey.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT;var s=`gemini-2.5-pro`;function c(e){return e===`gemini-cli`?s:l(e)?.default_model??null}function l(e){if(e)return o.find(t=>t.key===e)}function u(e){let t=l(e);return t?t.display_name:null}function d(e){return l(e)?.icon??`cli-generic`}function f(e,t){return t?l(e)?.available_models?.find(e=>e.id===t)?.label??t:null}exports.getAcpPreferredDefaultModel=c,exports.getAcpProvider=l,exports.getAcpProviderDisplayName=u,exports.labelForAcpModel=f,exports.resolveAcpProviderIcon=d,exports.resolveEffectiveAcpModel=r;
|
|
2
2
|
//# sourceMappingURL=acp-providers.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-providers.cjs","names":[],"sources":["../../src/constants/acp-providers.ts"],"sourcesContent":["import { getAcpProvider as getClientAcpProvider } from \"@openhands/typescript-client\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nexport type ACPProviderIcon =\n | \"claude-code\"\n | \"codex\"\n | \"gemini\"\n | \"cli-generic\";\n\nexport const ACP_PROVIDER_FALLBACK_ICON: ACPProviderIcon = \"cli-generic\";\n\n// Sentinel ``agent.llm.model`` returned by older SDKs for ACP conversations\n// in lieu of a real model. Suppressed at every consumer that resolves a\n// display string.\n//\n// NB: ``\"default\"`` is NOT a placeholder. claude-agent-acp 0.44+ exposes\n// ``default`` (\"Default (recommended)\") as a real, selectable model in its\n// configOptions select — the server reports it as ``currentModelId`` and lists\n// it in ``availableModels`` — so it must surface like any other model id.\nexport const ACP_MANAGED_SENTINEL = \"acp-managed\";\n\n/**\n * Filter for \"real\" ACP model strings — non-empty and not the legacy\n * ``acp-managed`` sentinel. Returns the trimmed value on success, ``null``\n * otherwise.\n */\nfunction realAcpModel(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const trimmed = value.trim();\n if (!trimmed) return null;\n if (trimmed === ACP_MANAGED_SENTINEL) return null;\n return trimmed;\n}\n\n/**\n * Single source of truth for resolving the model string to surface for an\n * ACP conversation/settings context. Consumed by the conversation adapter\n * (chip text), the conversation-creation path (concrete ``acp_model``\n * payload), the Settings → Agent form (initial value), and the chat-input\n * model label.\n *\n * Precedence: SDK runtime fields → user-configured ``acp_model`` →\n * legacy ``agent.llm.model`` → provider default (when ``providerDefault``\n * is passed). Pass ``providerDefault`` only on surfaces that should\n * silently substitute the registry default; omit it for the conversation\n * chip, which must distinguish \"no concrete model\" from \"default\".\n */\nexport function resolveEffectiveAcpModel(inputs: {\n runtimeName?: string | null;\n runtimeId?: string | null;\n configured?: string | null;\n sdkLlm?: string | null;\n providerDefault?: string | null;\n}): string | null {\n for (const candidate of [\n inputs.runtimeName,\n inputs.runtimeId,\n inputs.configured,\n inputs.sdkLlm,\n ]) {\n const value = realAcpModel(candidate);\n if (value) return value;\n }\n return inputs.providerDefault ?? null;\n}\n\n/**\n * Shape of a built-in ACP (Agent Client Protocol) provider as Canvas consumes\n * it. The data fields (display name, launch command, model picker + default)\n * are sourced at module load from ``@openhands/typescript-client``'s ACP\n * registry — the generated mirror of the Python source of truth\n * ``openhands.sdk.settings.acp_providers``. This config only adds the\n * Canvas-specific UI fields ({@link ACPProviderConfig.icon} +\n * {@link ACPProviderConfig.description_key}); see {@link ACP_PROVIDER_UI}.\n */\nexport interface ACPProviderConfig {\n /** Stable registry key, also stored on conversations as ``tags.acpserver``. */\n key: string;\n /** Human-readable name shown in dropdowns and conversation chips. */\n display_name: string;\n /**\n * Tokens passed to the agent-server as ``acp_command`` when this preset\n * is picked. Each entry must be a real ACP-protocol stdio server — the\n * SDK validates this against the {@link ACPProviderConfig.key}.\n *\n * NB: ``npx -y @openai/codex acp`` looks plausible but is **not** an\n * ACP server — the codex CLI has no ``acp`` subcommand and exits with\n * ``Error: stdin is not a terminal`` when spawned without a TTY, which\n * silently deadlocks the agent-server's ACP handshake. Use\n * ``@agentclientprotocol/codex-acp`` (the codex ACP wrapper) instead.\n */\n default_command: string[];\n /**\n * Suggested ACP model IDs for the provider's picker, sourced from the\n * typescript-client registry. Not authoritative access checks; users can\n * still enter a custom override in Settings -> Agent.\n */\n available_models?: ACPModelOption[];\n /** Model ID preselected for built-in providers so Canvas never saves blank. */\n default_model?: string;\n /**\n * i18n key for the one-line provider description rendered under the\n * onboarding tile. Stored on the registry so adding a new ACP\n * provider only requires editing this file (not the onboarding tile\n * list separately).\n */\n description_key: I18nKey;\n /**\n * Serializable icon key used by UI surfaces that render provider\n * choices. Kept as a string so the SDK mirror check can continue to\n * parse this registry without importing React components.\n */\n icon?: ACPProviderIcon;\n}\n\nexport interface ACPModelOption {\n /** Exact model ID sent as ``acp_model``. */\n id: string;\n /** Human-readable label shown in Settings -> Agent. */\n label: string;\n}\n\n// Canvas-only UI metadata per built-in provider, keyed by the ACP registry\n// key. Everything else — display name, launch command, model picker list and\n// default — comes from the typescript-client registry below. Adding a model\n// or a provider happens upstream in the SDK; Canvas only owns the brand icon\n// and the onboarding-tile description here. Its keys are the harnesses Canvas\n// offers — see {@link SURFACED_ACP_PROVIDERS}.\nconst ACP_PROVIDER_UI: Record<\n string,\n { icon: ACPProviderIcon; description_key: I18nKey }\n> = {\n \"claude-code\": {\n icon: \"claude-code\",\n description_key: I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION,\n },\n codex: {\n icon: \"codex\",\n description_key: I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION,\n },\n \"gemini-cli\": {\n icon: \"gemini\",\n description_key: I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION,\n },\n};\n\n/**\n * The ACP harnesses Canvas surfaces — its own declaration of what it offers,\n * independent of what the SDK registry happens to contain. Registering a\n * harness upstream is a no-op here: nothing in Canvas enumerates the registry,\n * so there is no list to keep in step with it.\n *\n * The same constant name carries the same meaning in\n * ``OpenHands/enterprise`` (``openhands/app_server/acp_providers.py``), where\n * it also fails conversation start closed. The two are declared independently\n * and hold the same three keys today.\n */\nexport const SURFACED_ACP_PROVIDERS: readonly string[] =\n Object.keys(ACP_PROVIDER_UI);\n\n// Built-in ACP providers Canvas surfaces, built by enriching each upstream\n// registry record (``@openhands/typescript-client`` → Python SDK) with the\n// Canvas UI metadata above. Model lists + defaults are no longer hand-kept\n// here (closes agent-canvas#740) — they track the SDK via the pinned client.\nexport const ACP_PROVIDERS: ACPProviderConfig[] = Object.entries(\n ACP_PROVIDER_UI,\n).map(([key, ui]) => {\n const info = getClientAcpProvider(key);\n return {\n key,\n display_name: info?.display_name ?? key,\n default_command: info ? [...info.default_command] : [],\n available_models: info?.available_models?.map((model) => ({\n id: model.id,\n label: model.label,\n })),\n default_model: info?.default_model ?? undefined,\n description_key: ui.description_key,\n icon: ui.icon,\n };\n});\n\nexport const ACP_CUSTOM_PRESET_KEY = \"custom\";\n\n/**\n * A credential an ACP provider authenticates with, surfaced during onboarding\n * so the user can populate it without leaving the flow. The {@link name} is\n * both the global-secret name and the environment variable the agent-server\n * exports into the ACP subprocess — keeping them identical is what makes a\n * saved secret actually reach the provider CLI.\n */\nexport interface ACPProviderSecretField {\n /** Secret name and env var (e.g. ``\"ANTHROPIC_API_KEY\"``). Must satisfy the\n * secret-name pattern ``^[a-zA-Z][a-zA-Z0-9_]{0,63}$``. */\n name: string;\n /** Render as a masked password input (API keys, OAuth tokens, credential\n * blobs) rather than a plain-text input (base URLs, project IDs). Doubles as\n * \"this is an actual credential\": when the onboarding step is required, only\n * a ``secret`` field satisfies it — a base URL or GCP scalar alone can't\n * authenticate anything. */\n secret?: boolean;\n /** Render as a multi-line textarea rather than a single-line input. Set for\n * file-content credentials the user pastes verbatim (Codex ``auth.json``,\n * Gemini Vertex service-account / ADC JSON) — the ones the SDK materialises\n * to disk, which a cloud backend can't consume yet (agent-canvas#1016). */\n multiline?: boolean;\n /** i18n key for the one-line helper text under the field. */\n hint_key: I18nKey;\n /**\n * Interpolation values for {@link hint_key} (e.g. ``{ file: \"~/.codex/auth.json\" }``\n * for the shared \"paste the file contents\" hint). Omitted for hints that\n * take no parameters.\n */\n hint_values?: Record<string, string>;\n}\n\n/**\n * Container credentials — beyond the registry's API key / base URL — that\n * canvas collects per provider so a *containerized* agent-server (no host login\n * state) can authenticate the ACP CLI: subscription tokens plus the file-content\n * blobs and Vertex config the SDK's ``acp_file_secrets`` materialisation\n * consumes (agent-canvas#1013/#1014). They have no registry env-var entry\n * because they're a deployment concern, not a model registry field. The Gemini\n * project/location/flag are plain config, not secrets — grouped here because\n * they travel with the SA blob.\n *\n * The blob *names* (``CODEX_AUTH_JSON`` / ``GOOGLE_APPLICATION_CREDENTIALS_JSON``)\n * duplicate the SDK registry's ``file_secrets`` specs; derive them from the\n * client registry once the pinned ``@openhands/typescript-client`` mirrors that\n * field (same bump that unblocks ``acp_isolate_data_dir``, see #1019).\n */\nconst ACP_RESERVED_CREDENTIALS: Record<string, ACPProviderSecretField[]> = {\n codex: [\n {\n name: \"CODEX_AUTH_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: { file: \"~/.codex/auth.json\" },\n },\n ],\n \"claude-code\": [\n {\n name: \"CLAUDE_CODE_OAUTH_TOKEN\",\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT,\n },\n ],\n \"gemini-cli\": [\n {\n name: \"GOOGLE_APPLICATION_CREDENTIALS_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: {\n file: \"~/.config/gcloud/application_default_credentials.json\",\n },\n },\n {\n name: \"GOOGLE_CLOUD_PROJECT\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT,\n },\n {\n name: \"GOOGLE_CLOUD_LOCATION\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT,\n },\n {\n name: \"GOOGLE_GENAI_USE_VERTEXAI\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT,\n },\n ],\n};\n\n/**\n * Credential pairs that break each other at runtime, keyed by provider —\n * mirrors the SDK's ``_ENV_CONFLICT_MAP`` (software-agent-sdk#3588). Claude's\n * OAuth token (``CLAUDE_CODE_OAUTH_TOKEN``) authenticates against Anthropic\n * directly, so when it is set the SDK strips:\n * - ``ANTHROPIC_API_KEY`` — otherwise it takes precedence and silently\n * bypasses the subscription;\n * - ``ANTHROPIC_BASE_URL`` — otherwise it proxies the bearer to an endpoint\n * that rejects it (see docs/ACP_AGENTS.md).\n * Either one set alongside the token is silently ignored at runtime, so warn.\n */\nconst ACP_CREDENTIAL_CONFLICTS: Record<string, Array<[string, string]>> = {\n \"claude-code\": [\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"],\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_BASE_URL\"],\n ],\n};\n\n/**\n * The ``[credential, conflicting]`` pairs the user currently has set for\n * ``providerKey``. ``hasValue`` should cover both typed and already-saved\n * values, since a previously saved secret conflicts just the same.\n */\nexport function getAcpCredentialConflicts(\n key: string | null | undefined,\n hasValue: (name: string) => boolean,\n): Array<[string, string]> {\n if (!key) return [];\n return (ACP_CREDENTIAL_CONFLICTS[key] ?? []).filter(\n ([credential, conflicting]) =>\n hasValue(credential) && hasValue(conflicting),\n );\n}\n\n/**\n * Vertex AI-safe ``acp_model`` for Gemini.\n *\n * Left unset, gemini-cli falls back to its own internal default — a preview\n * flash model that 404s on Google Cloud projects without preview access. And a\n * ``*-flash`` id is no safer to pin: gemini-cli re-resolves flash ids at\n * generation time to its *current default* flash (software-agent-sdk#3532), so\n * a pinned ``gemini-2.5-flash`` still ran ``gemini-3-flash``. Only a non-flash\n * id sticks; ``gemini-2.5-pro`` is broadly available on Vertex and the\n * API-key / Google-login paths, so canvas preselects it. Kept as a named\n * constant so every model-default consumer agrees.\n */\nexport const ACP_VERTEX_SAFE_MODEL = \"gemini-2.5-pro\";\n\n/**\n * The default ``acp_model`` canvas substitutes for ``providerKey`` wherever no\n * concrete model is configured — settings seeding (onboarding, Settings →\n * Agent), the {@link buildAcpAgentSettingsDiff} fallback, and the start-request\n * fallback for a saved ``null``. Overrides only Gemini (→\n * {@link ACP_VERTEX_SAFE_MODEL}, see why above); every other provider keeps its\n * registry {@link ACPProviderConfig.default_model}. Returns ``null`` when\n * there's no override and no registry default, letting the ACP server pick its\n * own.\n *\n * Distinct from {@link ACPProviderConfig.default_model} (which mirrors the SDK\n * registry verbatim, closing agent-canvas#740): this is the *preferred* default,\n * deliberately diverging for Gemini where the registry value isn't safe on\n * every backend — so every default-model surface must route through this, not\n * read ``default_model`` directly.\n */\nexport function getAcpPreferredDefaultModel(\n key: string | null | undefined,\n): string | null {\n if (key === \"gemini-cli\") return ACP_VERTEX_SAFE_MODEL;\n return getAcpProvider(key)?.default_model ?? null;\n}\n\n/**\n * List the credentials Canvas should prompt for when onboarding the given ACP\n * provider. The API-key and base-URL field *names* track the SDK registry's\n * ``api_key_env_var`` / ``base_url_env_var`` (mirrored via\n * ``@openhands/typescript-client``) so they can't drift as providers are added\n * or renamed; the per-provider container credentials (subscription / Vertex\n * blobs) come from {@link ACP_RESERVED_CREDENTIALS}, since those are a\n * containerized-deployment concern with no model-registry entry. Each field\n * name equals the env var the agent-server exports into the provider subprocess\n * (which is what makes a saved secret reach the CLI). On the wire none of this\n * is special — every saved credential travels uniformly as a ``LookupSecret``.\n *\n * Field order is: container subscription/Vertex credentials → API key →\n * optional base URL. Every field is optional at the UI level — the step is\n * skippable, and a subscription / OAuth login on the backend takes precedence\n * over a key at runtime. (Whether the *step* is required is a\n * backend-capability decision the onboarding modal makes; see\n * ``backendRequiresAcpCredentials``.)\n *\n * NB: the base URL is rendered plain-text (not ``secret``), so it never counts\n * toward a required credential step — setting ``ANTHROPIC_BASE_URL`` alongside\n * a ``CLAUDE_CODE_OAUTH_TOKEN`` breaks the token's bearer auth, which the forms\n * surface via {@link getAcpCredentialConflicts}.\n *\n * Returns ``[]`` for OpenHands, the ``\"custom\"`` preset, any unknown key, and a\n * future OAuth-only provider whose registry entry has no ``api_key_env_var`` —\n * callers treat an empty list as \"no credentials step for this provider\".\n */\nexport function getAcpProviderSecrets(\n key: string | null | undefined,\n): ACPProviderSecretField[] {\n if (!key) return [];\n // Surfaced providers only. The client registry grows with every harness the\n // SDK adds, so reading it directly would offer credential fields for one\n // Canvas never lists.\n if (!getAcpProvider(key)) return [];\n const info = getClientAcpProvider(key);\n if (!info) return [];\n // Subscription / Vertex credentials first — they're the primary auth path for\n // ACP providers (Claude Pro/Max OAuth token, Codex ChatGPT auth.json), with\n // the API key as the fallback below.\n const fields: ACPProviderSecretField[] = [\n ...(ACP_RESERVED_CREDENTIALS[key] ?? []),\n ];\n if (info.api_key_env_var) {\n fields.push({\n name: info.api_key_env_var,\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_API_KEY_HINT,\n });\n }\n if (info.base_url_env_var) {\n fields.push({\n name: info.base_url_env_var,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_BASE_URL_HINT,\n });\n }\n return fields;\n}\n\n/**\n * Look up a built-in ACP provider config by its registry key.\n *\n * Returns ``undefined`` for an empty / null key, for the ``\"custom\"`` preset\n * (which has no registry entry), and for any forward-compatible key Canvas's\n * registry doesn't know about yet. Centralizes the ``ACP_PROVIDERS.find(...)``\n * lookup shared by the resolvers below and by the adapter / settings surfaces\n * so the key-comparison shape lives in one place.\n */\nexport function getAcpProvider(\n key: string | null | undefined,\n): ACPProviderConfig | undefined {\n if (!key) return undefined;\n return ACP_PROVIDERS.find((provider) => provider.key === key);\n}\n\n/**\n * Resolve an ACP provider registry key (the value stored under\n * ``tags.acpserver`` on a conversation) to a human display name for the\n * sidebar chip.\n *\n * Returns ``null`` for an empty / null key and for keys not in\n * {@link ACP_PROVIDERS} — most notably ``\"custom\"`` (the user-supplied\n * command preset has no canonical brand name) and any forward-compatible\n * value Canvas's registry doesn't know about yet. Callers should fall\n * back to a generic ``\"ACP\"`` label in that case so the chip still\n * communicates \"this is an ACP conversation\".\n *\n * Kept separate from {@link buildAcpAgentSettingsDiff}'s lookup so the\n * conversation-card render path can resolve display names without\n * importing the settings-payload builder.\n */\nexport function getAcpProviderDisplayName(\n key: string | null | undefined,\n): string | null {\n const found = getAcpProvider(key);\n return found ? found.display_name : null;\n}\n\n/**\n * Resolve an ACP provider registry key to the icon discriminator the\n * conversation chip should render alongside the model text.\n *\n * Falls back to {@link ACP_PROVIDER_FALLBACK_ICON} for ``\"custom\"``,\n * unknown keys, or a missing key — the chip then shows a neutral\n * terminal glyph that still communicates \"this is an ACP conversation\"\n * without claiming a brand identity we don't know.\n */\nexport function resolveAcpProviderIcon(\n key: string | null | undefined,\n): ACPProviderIcon {\n return getAcpProvider(key)?.icon ?? ACP_PROVIDER_FALLBACK_ICON;\n}\n\n/**\n * Resolve a raw ``acp_model`` ID to the human-readable label the provider's\n * picker shows for it (e.g. ``\"claude-opus-4-7\"`` → ``\"Claude Opus 4.7\"``).\n *\n * Falls back to the raw ID when the provider is unknown or the ID isn't one\n * of its registered {@link ACPModelOption}s — so a user's custom override\n * still renders something meaningful rather than nothing. Returns ``null``\n * only when there is no model to show, letting the conversation chip decide\n * to display the provider name instead.\n */\nexport function labelForAcpModel(\n serverKey: string | null | undefined,\n modelId: string | null | undefined,\n): string | null {\n if (!modelId) return null;\n const provider = getAcpProvider(serverKey);\n const match = provider?.available_models?.find((m) => m.id === modelId);\n return match?.label ?? modelId;\n}\n\n/**\n * Build the ``agent_settings_diff`` payload PATCH /api/settings expects\n * for the agent-kind/provider choice the user just made.\n *\n * Used by both the Settings → Agent page and the onboarding \"choose\n * agent\" step — keeping the shape in one helper means a future change\n * (e.g. always seeding ``acp_command`` from the registry instead of\n * sending ``[]``, or adding new ``acp_*`` reset fields) lands in both\n * surfaces atomically.\n *\n * Returns ``null`` for an unknown ACP provider key by default — the\n * caller can skip the save (the UI shouldn't surface unknown options,\n * but the defensive path keeps a buggy preset list from corrupting\n * settings).\n *\n * Pass ``allowUnknownServer: true`` to opt into pass-through for keys\n * that aren't in {@link ACP_PROVIDERS} or ``ACP_CUSTOM_PRESET_KEY``.\n * The Settings → Agent page uses this when the user opens settings\n * that already carry an ``acp_server`` value canvas's registry\n * doesn't know about (e.g. set out-of-band via the API for a provider\n * we haven't mirrored yet) and saves without changing the command —\n * otherwise the original key would be silently demoted to ``\"custom\"``.\n */\nexport function buildAcpAgentSettingsDiff(\n providerKey: string,\n options: {\n command?: string[];\n model?: string | null;\n allowUnknownServer?: boolean;\n } = {},\n): Record<string, unknown> | null {\n if (providerKey === \"openhands\") {\n // Switching back to OpenHands. The agent-server's ``Settings.update``\n // applies a fresh ``{'agent_kind': ...}`` base whenever the kind\n // flips, so any ``acp_*`` fields would be discarded before\n // validation. Send the kind alone.\n return { agent_kind: \"openhands\" };\n }\n\n const isCustom = providerKey === ACP_CUSTOM_PRESET_KEY;\n const provider = isCustom ? undefined : getAcpProvider(providerKey);\n if (!isCustom && !provider && !options.allowUnknownServer) {\n return null;\n }\n\n // Undefined model → the *preferred* default (Vertex-safe for Gemini), not\n // the raw registry default — see getAcpPreferredDefaultModel.\n const model =\n options.model === undefined\n ? getAcpPreferredDefaultModel(providerKey)\n : options.model;\n\n // ``acp_args: []`` resets any API-set ``acp_args`` that would\n // otherwise survive and concatenate to ``acp_command`` at spawn time\n // (the agent-server merges the two before exec). Callers building the\n // payload from a textarea that already shows the merged command\n // (Settings → Agent) round-trip correctly — the merged tokens land in\n // ``acp_command`` here, so no args are lost.\n return {\n agent_kind: \"acp\",\n acp_server: providerKey,\n acp_command: options.command ?? [],\n acp_args: [],\n acp_model: model ?? null,\n };\n}\n"],"mappings":"6OA0BA,SAAS,EAAa,EAA+B,CACnD,GAAI,OAAO,GAAU,SAAU,OAAO,KACtC,IAAM,EAAU,EAAM,KAAK,EAG3B,MAFI,CAAC,GACD,IAAA,cAAyC,KACtC,CACT,CAeA,SAAgB,EAAyB,EAMvB,CAChB,IAAK,IAAM,IAAa,CACtB,EAAO,YACP,EAAO,UACP,EAAO,WACP,EAAO,MACT,EAAG,CACD,IAAM,EAAQ,EAAa,CAAS,EACpC,GAAI,EAAO,OAAO,CACpB,CACA,OAAO,EAAO,iBAAmB,IACnC,CAgEA,IAAM,EAGF,CACF,cAAe,CACb,KAAM,cACN,gBAAiB,EAAA,QAAQ,wCAC3B,EACA,MAAO,CACL,KAAM,QACN,gBAAiB,EAAA,QAAQ,kCAC3B,EACA,aAAc,CACZ,KAAM,SACN,gBAAiB,EAAA,QAAQ,uCAC3B,CACF,EAoBa,EAAqC,OAAO,QACvD,CACF,EAAE,KAAK,CAAC,EAAK,KAAQ,CACnB,IAAM,EAAO,EAAA,eAAqB,CAAG,EACrC,MAAO,CACL,MACA,aAAc,GAAM,cAAgB,EACpC,gBAAiB,EAAO,CAAC,GAAG,EAAK,eAAe,EAAI,CAAC,EACrD,iBAAkB,GAAM,kBAAkB,IAAK,IAAW,CACxD,GAAI,EAAM,GACV,MAAO,EAAM,KACf,EAAE,EACF,cAAe,GAAM,eAAiB,IAAA,GACtC,gBAAiB,EAAG,gBACpB,KAAM,EAAG,IACX,CACF,CAAC,EAyDe,EAAA,QAAQ,qCAQR,EAAA,QAAQ,uCAQR,EAAA,QAAQ,qCAOR,EAAA,QAAQ,uCAIR,EAAA,QAAQ,wCAIR,EAAA,QAAQ,yCAmDxB,IAAa,EAAwB,iBAkBrC,SAAgB,EACd,EACe,CAEf,OADI,IAAQ,aAAqB,EAC1B,EAAe,CAAG,GAAG,eAAiB,IAC/C,CAuEA,SAAgB,EACd,EAC+B,CAC1B,KACL,OAAO,EAAc,KAAM,GAAa,EAAS,MAAQ,CAAG,CAC9D,CAkBA,SAAgB,EACd,EACe,CACf,IAAM,EAAQ,EAAe,CAAG,EAChC,OAAO,EAAQ,EAAM,aAAe,IACtC,CAWA,SAAgB,EACd,EACiB,CACjB,OAAO,EAAe,CAAG,GAAG,MAAA,aAC9B,CAYA,SAAgB,EACd,EACA,EACe,CAIf,OAHK,EACY,EAAe,CAClB,GAAU,kBAAkB,KAAM,GAAM,EAAE,KAAO,CAAO,GACxD,OAAS,EAHF,IAIvB"}
|
|
1
|
+
{"version":3,"file":"acp-providers.cjs","names":[],"sources":["../../src/constants/acp-providers.ts"],"sourcesContent":["import { getAcpProvider as getClientAcpProvider } from \"@openhands/typescript-client\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nexport type ACPProviderIcon =\n | \"claude-code\"\n | \"codex\"\n | \"gemini\"\n | \"cli-generic\";\n\nexport const ACP_PROVIDER_FALLBACK_ICON: ACPProviderIcon = \"cli-generic\";\n\n// Sentinel ``agent.llm.model`` returned by older SDKs for ACP conversations\n// in lieu of a real model. Suppressed at every consumer that resolves a\n// display string.\n//\n// NB: ``\"default\"`` is NOT a placeholder. claude-agent-acp 0.44+ exposes\n// ``default`` (\"Default (recommended)\") as a real, selectable model in its\n// configOptions select — the server reports it as ``currentModelId`` and lists\n// it in ``availableModels`` — so it must surface like any other model id.\nexport const ACP_MANAGED_SENTINEL = \"acp-managed\";\n\n/**\n * Filter for \"real\" ACP model strings — non-empty and not the legacy\n * ``acp-managed`` sentinel. Returns the trimmed value on success, ``null``\n * otherwise.\n */\nfunction realAcpModel(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const trimmed = value.trim();\n if (!trimmed) return null;\n if (trimmed === ACP_MANAGED_SENTINEL) return null;\n return trimmed;\n}\n\n/**\n * Single source of truth for resolving the model string to surface for an\n * ACP conversation/settings context. Consumed by the conversation adapter\n * (chip text), the conversation-creation path (concrete ``acp_model``\n * payload), the Settings → Agent form (initial value), and the chat-input\n * model label.\n *\n * Precedence: SDK runtime fields → user-configured ``acp_model`` →\n * legacy ``agent.llm.model`` → provider default (when ``providerDefault``\n * is passed). Pass ``providerDefault`` only on surfaces that should\n * silently substitute the registry default; omit it for the conversation\n * chip, which must distinguish \"no concrete model\" from \"default\".\n */\nexport function resolveEffectiveAcpModel(inputs: {\n runtimeName?: string | null;\n runtimeId?: string | null;\n configured?: string | null;\n sdkLlm?: string | null;\n providerDefault?: string | null;\n}): string | null {\n for (const candidate of [\n inputs.runtimeName,\n inputs.runtimeId,\n inputs.configured,\n inputs.sdkLlm,\n ]) {\n const value = realAcpModel(candidate);\n if (value) return value;\n }\n return inputs.providerDefault ?? null;\n}\n\n/**\n * Shape of a built-in ACP (Agent Client Protocol) provider as Canvas consumes\n * it. The data fields (display name, launch command, model picker + default)\n * are sourced at module load from ``@openhands/typescript-client``'s ACP\n * registry — the generated mirror of the Python source of truth\n * ``openhands.sdk.settings.acp_providers``. This config only adds the\n * Canvas-specific UI fields ({@link ACPProviderConfig.icon} +\n * {@link ACPProviderConfig.description_key}); see {@link ACP_PROVIDER_UI}.\n */\nexport interface ACPProviderConfig {\n /** Stable registry key, also stored on conversations as ``tags.acpserver``. */\n key: string;\n /** Human-readable name shown in dropdowns and conversation chips. */\n display_name: string;\n /**\n * Tokens passed to the agent-server as ``acp_command`` when this preset\n * is picked. Each entry must be a real ACP-protocol stdio server — the\n * SDK validates this against the {@link ACPProviderConfig.key}.\n *\n * NB: ``npx -y @openai/codex acp`` looks plausible but is **not** an\n * ACP server — the codex CLI has no ``acp`` subcommand and exits with\n * ``Error: stdin is not a terminal`` when spawned without a TTY, which\n * silently deadlocks the agent-server's ACP handshake. Use\n * ``@agentclientprotocol/codex-acp`` (the codex ACP wrapper) instead.\n */\n default_command: string[];\n /**\n * Suggested ACP model IDs for the provider's picker, sourced from the\n * typescript-client registry. Not authoritative access checks; users can\n * still enter a custom override in Settings -> Agent.\n */\n available_models?: ACPModelOption[];\n /** Model ID preselected for built-in providers so Canvas never saves blank. */\n default_model?: string;\n /**\n * i18n key for the one-line provider description rendered under the\n * onboarding tile. Stored on the registry so adding a new ACP\n * provider only requires editing this file (not the onboarding tile\n * list separately).\n */\n description_key: I18nKey;\n /**\n * Serializable icon key used by UI surfaces that render provider\n * choices. Kept as a string so the SDK mirror check can continue to\n * parse this registry without importing React components.\n */\n icon?: ACPProviderIcon;\n}\n\nexport interface ACPModelOption {\n /** Exact model ID sent as ``acp_model``. */\n id: string;\n /** Human-readable label shown in Settings -> Agent. */\n label: string;\n}\n\n// Canvas-only UI metadata per built-in provider, keyed by the ACP registry\n// key. Everything else — display name, launch command, model picker list and\n// default — comes from the typescript-client registry below. Adding a model\n// or a provider happens upstream in the SDK; Canvas only owns the brand icon\n// and the onboarding-tile description here. Its keys are the harnesses Canvas\n// offers — see {@link SURFACED_ACP_PROVIDERS}.\nconst ACP_PROVIDER_UI: Record<\n string,\n { icon: ACPProviderIcon; description_key: I18nKey }\n> = {\n \"claude-code\": {\n icon: \"claude-code\",\n description_key: I18nKey.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION,\n },\n codex: {\n icon: \"codex\",\n description_key: I18nKey.ONBOARDING$AGENT_CODEX_DESCRIPTION,\n },\n \"gemini-cli\": {\n icon: \"gemini\",\n description_key: I18nKey.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION,\n },\n};\n\nfunction getAvailableModels(key: string): ACPModelOption[] | undefined {\n return getClientAcpProvider(key)?.available_models?.map((model) => ({\n id: model.id,\n label: model.label,\n }));\n}\n\n/**\n * The ACP harnesses Canvas surfaces — its own declaration of what it offers,\n * independent of what the SDK registry happens to contain. Registering a\n * harness upstream is a no-op here: nothing in Canvas enumerates the registry,\n * so there is no list to keep in step with it.\n */\nexport const SURFACED_ACP_PROVIDERS: readonly string[] =\n Object.keys(ACP_PROVIDER_UI);\n\n// Built-in ACP providers Canvas surfaces, built by enriching each upstream\n// registry record (``@openhands/typescript-client`` → Python SDK) with the\n// Canvas UI metadata above.\nexport const ACP_PROVIDERS: ACPProviderConfig[] = Object.entries(\n ACP_PROVIDER_UI,\n).map(([key, ui]) => {\n const info = getClientAcpProvider(key);\n return {\n key,\n display_name: info?.display_name ?? key,\n default_command: info ? [...info.default_command] : [],\n available_models: getAvailableModels(key),\n default_model: info?.default_model ?? undefined,\n description_key: ui.description_key,\n icon: ui.icon,\n };\n});\n\nexport const ACP_CUSTOM_PRESET_KEY = \"custom\";\n\n/**\n * A credential an ACP provider authenticates with, surfaced during onboarding\n * so the user can populate it without leaving the flow. The {@link name} is\n * both the global-secret name and the environment variable the agent-server\n * exports into the ACP subprocess — keeping them identical is what makes a\n * saved secret actually reach the provider CLI.\n */\nexport interface ACPProviderSecretField {\n /** Secret name and env var (e.g. ``\"ANTHROPIC_API_KEY\"``). Must satisfy the\n * secret-name pattern ``^[a-zA-Z][a-zA-Z0-9_]{0,63}$``. */\n name: string;\n /** Render as a masked password input (API keys, OAuth tokens, credential\n * blobs) rather than a plain-text input (base URLs, project IDs). Doubles as\n * \"this is an actual credential\": when the onboarding step is required, only\n * a ``secret`` field satisfies it — a base URL or GCP scalar alone can't\n * authenticate anything. */\n secret?: boolean;\n /** Render as a multi-line textarea rather than a single-line input. Set for\n * file-content credentials the user pastes verbatim (Codex ``auth.json``,\n * Gemini Vertex service-account / ADC JSON) — the ones the SDK materialises\n * to disk, which a cloud backend can't consume yet (agent-canvas#1016). */\n multiline?: boolean;\n /** i18n key for the one-line helper text under the field. */\n hint_key: I18nKey;\n /**\n * Interpolation values for {@link hint_key} (e.g. ``{ file: \"~/.codex/auth.json\" }``\n * for the shared \"paste the file contents\" hint). Omitted for hints that\n * take no parameters.\n */\n hint_values?: Record<string, string>;\n}\n\n/**\n * Container credentials — beyond the registry's API key / base URL — that\n * canvas collects per provider so a *containerized* agent-server (no host login\n * state) can authenticate the ACP CLI: subscription tokens plus the file-content\n * blobs and Vertex config the SDK's ``acp_file_secrets`` materialisation\n * consumes (agent-canvas#1013/#1014). They have no registry env-var entry\n * because they're a deployment concern, not a model registry field. The Gemini\n * project/location/flag are plain config, not secrets — grouped here because\n * they travel with the SA blob.\n *\n * The blob *names* (``CODEX_AUTH_JSON`` / ``GOOGLE_APPLICATION_CREDENTIALS_JSON``)\n * duplicate the SDK registry's ``file_secrets`` specs; derive them from the\n * client registry once the pinned ``@openhands/typescript-client`` mirrors that\n * field (same bump that unblocks ``acp_isolate_data_dir``, see #1019).\n */\nconst ACP_RESERVED_CREDENTIALS: Record<string, ACPProviderSecretField[]> = {\n codex: [\n {\n name: \"CODEX_AUTH_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: { file: \"~/.codex/auth.json\" },\n },\n ],\n \"claude-code\": [\n {\n name: \"CLAUDE_CODE_OAUTH_TOKEN\",\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT,\n },\n ],\n \"gemini-cli\": [\n {\n name: \"GOOGLE_APPLICATION_CREDENTIALS_JSON\",\n secret: true,\n multiline: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,\n hint_values: {\n file: \"~/.config/gcloud/application_default_credentials.json\",\n },\n },\n {\n name: \"GOOGLE_CLOUD_PROJECT\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT,\n },\n {\n name: \"GOOGLE_CLOUD_LOCATION\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT,\n },\n {\n name: \"GOOGLE_GENAI_USE_VERTEXAI\",\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT,\n },\n ],\n};\n\n/**\n * Credential pairs that break each other at runtime, keyed by provider —\n * mirrors the SDK's ``_ENV_CONFLICT_MAP`` (software-agent-sdk#3588). Claude's\n * OAuth token (``CLAUDE_CODE_OAUTH_TOKEN``) authenticates against Anthropic\n * directly, so when it is set the SDK strips:\n * - ``ANTHROPIC_API_KEY`` — otherwise it takes precedence and silently\n * bypasses the subscription;\n * - ``ANTHROPIC_BASE_URL`` — otherwise it proxies the bearer to an endpoint\n * that rejects it (see docs/ACP_AGENTS.md).\n * Either one set alongside the token is silently ignored at runtime, so warn.\n */\nconst ACP_CREDENTIAL_CONFLICTS: Record<string, Array<[string, string]>> = {\n \"claude-code\": [\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"],\n [\"CLAUDE_CODE_OAUTH_TOKEN\", \"ANTHROPIC_BASE_URL\"],\n ],\n};\n\n/**\n * The ``[credential, conflicting]`` pairs the user currently has set for\n * ``providerKey``. ``hasValue`` should cover both typed and already-saved\n * values, since a previously saved secret conflicts just the same.\n */\nexport function getAcpCredentialConflicts(\n key: string | null | undefined,\n hasValue: (name: string) => boolean,\n): Array<[string, string]> {\n if (!key) return [];\n return (ACP_CREDENTIAL_CONFLICTS[key] ?? []).filter(\n ([credential, conflicting]) =>\n hasValue(credential) && hasValue(conflicting),\n );\n}\n\n/**\n * Vertex AI-safe ``acp_model`` for Gemini.\n *\n * Left unset, gemini-cli falls back to its own internal default — a preview\n * flash model that 404s on Google Cloud projects without preview access. And a\n * ``*-flash`` id is no safer to pin: gemini-cli re-resolves flash ids at\n * generation time to its *current default* flash (software-agent-sdk#3532), so\n * a pinned ``gemini-2.5-flash`` still ran ``gemini-3-flash``. Only a non-flash\n * id sticks; ``gemini-2.5-pro`` is broadly available on Vertex and the\n * API-key / Google-login paths, so canvas preselects it. Kept as a named\n * constant so every model-default consumer agrees.\n */\nexport const ACP_VERTEX_SAFE_MODEL = \"gemini-2.5-pro\";\n\n/**\n * The default ``acp_model`` canvas substitutes for ``providerKey`` wherever no\n * concrete model is configured — settings seeding (onboarding, Settings →\n * Agent), the {@link buildAcpAgentSettingsDiff} fallback, and the start-request\n * fallback for a saved ``null``. Overrides only Gemini (→\n * {@link ACP_VERTEX_SAFE_MODEL}, see why above); every other provider keeps its\n * registry {@link ACPProviderConfig.default_model}. Returns ``null`` when\n * there's no override and no registry default, letting the ACP server pick its\n * own.\n *\n * Distinct from {@link ACPProviderConfig.default_model} (which mirrors the SDK\n * registry verbatim, closing agent-canvas#740): this is the *preferred* default,\n * deliberately diverging for Gemini where the registry value isn't safe on\n * every backend — so every default-model surface must route through this, not\n * read ``default_model`` directly.\n */\nexport function getAcpPreferredDefaultModel(\n key: string | null | undefined,\n): string | null {\n if (key === \"gemini-cli\") return ACP_VERTEX_SAFE_MODEL;\n return getAcpProvider(key)?.default_model ?? null;\n}\n\n/**\n * List the credentials Canvas should prompt for when onboarding the given ACP\n * provider. The API-key and base-URL field *names* track the SDK registry's\n * ``api_key_env_var`` / ``base_url_env_var`` (mirrored via\n * ``@openhands/typescript-client``) so they can't drift as providers are added\n * or renamed; the per-provider container credentials (subscription / Vertex\n * blobs) come from {@link ACP_RESERVED_CREDENTIALS}, since those are a\n * containerized-deployment concern with no model-registry entry. Each field\n * name equals the env var the agent-server exports into the provider subprocess\n * (which is what makes a saved secret reach the CLI). On the wire none of this\n * is special — every saved credential travels uniformly as a ``LookupSecret``.\n *\n * Field order is: container subscription/Vertex credentials → API key →\n * optional base URL. Every field is optional at the UI level — the step is\n * skippable, and a subscription / OAuth login on the backend takes precedence\n * over a key at runtime. (Whether the *step* is required is a\n * backend-capability decision the onboarding modal makes; see\n * ``backendRequiresAcpCredentials``.)\n *\n * NB: the base URL is rendered plain-text (not ``secret``), so it never counts\n * toward a required credential step — setting ``ANTHROPIC_BASE_URL`` alongside\n * a ``CLAUDE_CODE_OAUTH_TOKEN`` breaks the token's bearer auth, which the forms\n * surface via {@link getAcpCredentialConflicts}.\n *\n * Returns ``[]`` for OpenHands, the ``\"custom\"`` preset, any unknown key, and a\n * future OAuth-only provider whose registry entry has no ``api_key_env_var`` —\n * callers treat an empty list as \"no credentials step for this provider\".\n */\nexport function getAcpProviderSecrets(\n key: string | null | undefined,\n): ACPProviderSecretField[] {\n if (!key) return [];\n // Surfaced providers only. The client registry grows with every harness the\n // SDK adds, so reading it directly would offer credential fields for one\n // Canvas never lists.\n if (!getAcpProvider(key)) return [];\n const info = getClientAcpProvider(key);\n if (!info) return [];\n // Subscription / Vertex credentials first — they're the primary auth path for\n // ACP providers (Claude Pro/Max OAuth token, Codex ChatGPT auth.json), with\n // the API key as the fallback below.\n const fields: ACPProviderSecretField[] = [\n ...(ACP_RESERVED_CREDENTIALS[key] ?? []),\n ];\n if (info.api_key_env_var) {\n fields.push({\n name: info.api_key_env_var,\n secret: true,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_API_KEY_HINT,\n });\n }\n if (info.base_url_env_var) {\n fields.push({\n name: info.base_url_env_var,\n hint_key: I18nKey.ONBOARDING$ACP_SECRET_BASE_URL_HINT,\n });\n }\n return fields;\n}\n\n/**\n * Look up a built-in ACP provider config by its registry key.\n *\n * Returns ``undefined`` for an empty / null key, for the ``\"custom\"`` preset\n * (which has no registry entry), and for any forward-compatible key Canvas's\n * registry doesn't know about yet. Centralizes the ``ACP_PROVIDERS.find(...)``\n * lookup shared by the resolvers below and by the adapter / settings surfaces\n * so the key-comparison shape lives in one place.\n */\nexport function getAcpProvider(\n key: string | null | undefined,\n): ACPProviderConfig | undefined {\n if (!key) return undefined;\n return ACP_PROVIDERS.find((provider) => provider.key === key);\n}\n\n/**\n * Resolve an ACP provider registry key (the value stored under\n * ``tags.acpserver`` on a conversation) to a human display name for the\n * sidebar chip.\n *\n * Returns ``null`` for an empty / null key and for keys not in\n * {@link ACP_PROVIDERS} — most notably ``\"custom\"`` (the user-supplied\n * command preset has no canonical brand name) and any forward-compatible\n * value Canvas's registry doesn't know about yet. Callers should fall\n * back to a generic ``\"ACP\"`` label in that case so the chip still\n * communicates \"this is an ACP conversation\".\n *\n * Kept separate from {@link buildAcpAgentSettingsDiff}'s lookup so the\n * conversation-card render path can resolve display names without\n * importing the settings-payload builder.\n */\nexport function getAcpProviderDisplayName(\n key: string | null | undefined,\n): string | null {\n const found = getAcpProvider(key);\n return found ? found.display_name : null;\n}\n\n/**\n * Resolve an ACP provider registry key to the icon discriminator the\n * conversation chip should render alongside the model text.\n *\n * Falls back to {@link ACP_PROVIDER_FALLBACK_ICON} for ``\"custom\"``,\n * unknown keys, or a missing key — the chip then shows a neutral\n * terminal glyph that still communicates \"this is an ACP conversation\"\n * without claiming a brand identity we don't know.\n */\nexport function resolveAcpProviderIcon(\n key: string | null | undefined,\n): ACPProviderIcon {\n return getAcpProvider(key)?.icon ?? ACP_PROVIDER_FALLBACK_ICON;\n}\n\n/**\n * Resolve a raw ``acp_model`` ID to the human-readable label the provider's\n * picker shows for it (e.g. ``\"claude-opus-4-7\"`` → ``\"Claude Opus 4.7\"``).\n *\n * Falls back to the raw ID when the provider is unknown or the ID isn't one\n * of its registered {@link ACPModelOption}s — so a user's custom override\n * still renders something meaningful rather than nothing. Returns ``null``\n * only when there is no model to show, letting the conversation chip decide\n * to display the provider name instead.\n */\nexport function labelForAcpModel(\n serverKey: string | null | undefined,\n modelId: string | null | undefined,\n): string | null {\n if (!modelId) return null;\n const provider = getAcpProvider(serverKey);\n const match = provider?.available_models?.find((m) => m.id === modelId);\n return match?.label ?? modelId;\n}\n\n/**\n * Build the ``agent_settings_diff`` payload PATCH /api/settings expects\n * for the agent-kind/provider choice the user just made.\n *\n * Used by both the Settings → Agent page and the onboarding \"choose\n * agent\" step — keeping the shape in one helper means a future change\n * (e.g. always seeding ``acp_command`` from the registry instead of\n * sending ``[]``, or adding new ``acp_*`` reset fields) lands in both\n * surfaces atomically.\n *\n * Returns ``null`` for an unknown ACP provider key by default — the\n * caller can skip the save (the UI shouldn't surface unknown options,\n * but the defensive path keeps a buggy preset list from corrupting\n * settings).\n *\n * Pass ``allowUnknownServer: true`` to opt into pass-through for keys\n * that aren't in {@link ACP_PROVIDERS} or ``ACP_CUSTOM_PRESET_KEY``.\n * The Settings → Agent page uses this when the user opens settings\n * that already carry an ``acp_server`` value canvas's registry\n * doesn't know about (e.g. set out-of-band via the API for a provider\n * we haven't mirrored yet) and saves without changing the command —\n * otherwise the original key would be silently demoted to ``\"custom\"``.\n */\nexport function buildAcpAgentSettingsDiff(\n providerKey: string,\n options: {\n command?: string[];\n model?: string | null;\n allowUnknownServer?: boolean;\n } = {},\n): Record<string, unknown> | null {\n if (providerKey === \"openhands\") {\n // Switching back to OpenHands. The agent-server's ``Settings.update``\n // applies a fresh ``{'agent_kind': ...}`` base whenever the kind\n // flips, so any ``acp_*`` fields would be discarded before\n // validation. Send the kind alone.\n return { agent_kind: \"openhands\" };\n }\n\n const isCustom = providerKey === ACP_CUSTOM_PRESET_KEY;\n const provider = isCustom ? undefined : getAcpProvider(providerKey);\n if (!isCustom && !provider && !options.allowUnknownServer) {\n return null;\n }\n\n // Undefined model → the *preferred* default (Vertex-safe for Gemini), not\n // the raw registry default — see getAcpPreferredDefaultModel.\n const model =\n options.model === undefined\n ? getAcpPreferredDefaultModel(providerKey)\n : options.model;\n\n // ``acp_args: []`` resets any API-set ``acp_args`` that would\n // otherwise survive and concatenate to ``acp_command`` at spawn time\n // (the agent-server merges the two before exec). Callers building the\n // payload from a textarea that already shows the merged command\n // (Settings → Agent) round-trip correctly — the merged tokens land in\n // ``acp_command`` here, so no args are lost.\n return {\n agent_kind: \"acp\",\n acp_server: providerKey,\n acp_command: options.command ?? [],\n acp_args: [],\n acp_model: model ?? null,\n };\n}\n"],"mappings":"6OA0BA,SAAS,EAAa,EAA+B,CACnD,GAAI,OAAO,GAAU,SAAU,OAAO,KACtC,IAAM,EAAU,EAAM,KAAK,EAG3B,MAFI,CAAC,GACD,IAAA,cAAyC,KACtC,CACT,CAeA,SAAgB,EAAyB,EAMvB,CAChB,IAAK,IAAM,IAAa,CACtB,EAAO,YACP,EAAO,UACP,EAAO,WACP,EAAO,MACT,EAAG,CACD,IAAM,EAAQ,EAAa,CAAS,EACpC,GAAI,EAAO,OAAO,CACpB,CACA,OAAO,EAAO,iBAAmB,IACnC,CAgEA,IAAM,EAGF,CACF,cAAe,CACb,KAAM,cACN,gBAAiB,EAAA,QAAQ,wCAC3B,EACA,MAAO,CACL,KAAM,QACN,gBAAiB,EAAA,QAAQ,kCAC3B,EACA,aAAc,CACZ,KAAM,SACN,gBAAiB,EAAA,QAAQ,uCAC3B,CACF,EAEA,SAAS,EAAmB,EAA2C,CACrE,OAAO,EAAA,eAAqB,CAAG,GAAG,kBAAkB,IAAK,IAAW,CAClE,GAAI,EAAM,GACV,MAAO,EAAM,KACf,EAAE,CACJ,CAcA,IAAa,EAAqC,OAAO,QACvD,CACF,EAAE,KAAK,CAAC,EAAK,KAAQ,CACnB,IAAM,EAAO,EAAA,eAAqB,CAAG,EACrC,MAAO,CACL,MACA,aAAc,GAAM,cAAgB,EACpC,gBAAiB,EAAO,CAAC,GAAG,EAAK,eAAe,EAAI,CAAC,EACrD,iBAAkB,EAAmB,CAAG,EACxC,cAAe,GAAM,eAAiB,IAAA,GACtC,gBAAiB,EAAG,gBACpB,KAAM,EAAG,IACX,CACF,CAAC,EAyDe,EAAA,QAAQ,qCAQR,EAAA,QAAQ,uCAQR,EAAA,QAAQ,qCAOR,EAAA,QAAQ,uCAIR,EAAA,QAAQ,wCAIR,EAAA,QAAQ,yCAmDxB,IAAa,EAAwB,iBAkBrC,SAAgB,EACd,EACe,CAEf,OADI,IAAQ,aAAqB,EAC1B,EAAe,CAAG,GAAG,eAAiB,IAC/C,CAuEA,SAAgB,EACd,EAC+B,CAC1B,KACL,OAAO,EAAc,KAAM,GAAa,EAAS,MAAQ,CAAG,CAC9D,CAkBA,SAAgB,EACd,EACe,CACf,IAAM,EAAQ,EAAe,CAAG,EAChC,OAAO,EAAQ,EAAM,aAAe,IACtC,CAWA,SAAgB,EACd,EACiB,CACjB,OAAO,EAAe,CAAG,GAAG,MAAA,aAC9B,CAYA,SAAgB,EACd,EACA,EACe,CAIf,OAHK,EACY,EAAe,CAClB,GAAU,kBAAkB,KAAM,GAAM,EAAE,KAAO,CAAO,GACxD,OAAS,EAHF,IAIvB"}
|
|
@@ -81,11 +81,6 @@ export interface ACPModelOption {
|
|
|
81
81
|
* independent of what the SDK registry happens to contain. Registering a
|
|
82
82
|
* harness upstream is a no-op here: nothing in Canvas enumerates the registry,
|
|
83
83
|
* so there is no list to keep in step with it.
|
|
84
|
-
*
|
|
85
|
-
* The same constant name carries the same meaning in
|
|
86
|
-
* ``OpenHands/enterprise`` (``openhands/app_server/acp_providers.py``), where
|
|
87
|
-
* it also fails conversation start closed. The two are declared independently
|
|
88
|
-
* and hold the same three keys today.
|
|
89
84
|
*/
|
|
90
85
|
export declare const SURFACED_ACP_PROVIDERS: readonly string[];
|
|
91
86
|
export declare const ACP_PROVIDERS: ACPProviderConfig[];
|
|
@@ -31,40 +31,44 @@ var i = {
|
|
|
31
31
|
icon: "gemini",
|
|
32
32
|
description_key: e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
|
+
function a(e) {
|
|
36
|
+
return t(e)?.available_models?.map((e) => ({
|
|
37
|
+
id: e.id,
|
|
38
|
+
label: e.label
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
var o = Object.entries(i).map(([e, n]) => {
|
|
35
42
|
let r = t(e);
|
|
36
43
|
return {
|
|
37
44
|
key: e,
|
|
38
45
|
display_name: r?.display_name ?? e,
|
|
39
46
|
default_command: r ? [...r.default_command] : [],
|
|
40
|
-
available_models:
|
|
41
|
-
id: e.id,
|
|
42
|
-
label: e.label
|
|
43
|
-
})),
|
|
47
|
+
available_models: a(e),
|
|
44
48
|
default_model: r?.default_model ?? void 0,
|
|
45
49
|
description_key: n.description_key,
|
|
46
50
|
icon: n.icon
|
|
47
51
|
};
|
|
48
52
|
});
|
|
49
53
|
e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT, e.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT, e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT, e.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT, e.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT, e.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT;
|
|
50
|
-
var
|
|
51
|
-
function s(e) {
|
|
52
|
-
return e === "gemini-cli" ? o : c(e)?.default_model ?? null;
|
|
53
|
-
}
|
|
54
|
+
var s = "gemini-2.5-pro";
|
|
54
55
|
function c(e) {
|
|
55
|
-
|
|
56
|
+
return e === "gemini-cli" ? s : l(e)?.default_model ?? null;
|
|
56
57
|
}
|
|
57
58
|
function l(e) {
|
|
58
|
-
|
|
59
|
-
return t ? t.display_name : null;
|
|
59
|
+
if (e) return o.find((t) => t.key === e);
|
|
60
60
|
}
|
|
61
61
|
function u(e) {
|
|
62
|
-
|
|
62
|
+
let t = l(e);
|
|
63
|
+
return t ? t.display_name : null;
|
|
64
|
+
}
|
|
65
|
+
function d(e) {
|
|
66
|
+
return l(e)?.icon ?? "cli-generic";
|
|
63
67
|
}
|
|
64
|
-
function
|
|
65
|
-
return t ?
|
|
68
|
+
function f(e, t) {
|
|
69
|
+
return t ? l(e)?.available_models?.find((e) => e.id === t)?.label ?? t : null;
|
|
66
70
|
}
|
|
67
71
|
//#endregion
|
|
68
|
-
export {
|
|
72
|
+
export { c as getAcpPreferredDefaultModel, l as getAcpProvider, u as getAcpProviderDisplayName, f as labelForAcpModel, d as resolveAcpProviderIcon, r as resolveEffectiveAcpModel };
|
|
69
73
|
|
|
70
74
|
//# sourceMappingURL=acp-providers.js.map
|