@openhands/agent-canvas 1.0.0-beta.5 → 1.0.0-beta.7
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 +24 -7
- package/README.windows.md +27 -0
- package/bin/agent-canvas.mjs +26 -3
- package/build/assets/{QueryClientProvider-CkGuhXg-.js → QueryClientProvider-Cnr-Yl3j.js} +1 -1
- package/build/assets/{Trans-Cvm_-SMi.js → Trans-4jmk54WC.js} +1 -1
- package/build/assets/acp-providers-CPdgcp13.js +1 -0
- package/build/assets/{acp-route-guard-B2yoBZ_4.js → acp-route-guard-BoVmCn0e.js} +1 -1
- package/build/assets/active-backend-context-Beu-LZL-.js +1 -0
- package/build/assets/add-backend-modal-BheqYXHK.js +1 -0
- package/build/assets/agent-server-client-options-HEOwGVIU.js +1 -0
- package/build/assets/agent-server-compatibility-CdI3N7dr.js +1 -0
- package/build/assets/agent-server-conversation-service.api-CORdqJZg.js +5 -0
- package/build/assets/{agent-settings-CnGSCmK8.js → agent-settings-UFvcGjoI.js} +1 -1
- package/build/assets/{alert-banner-DtzAX654.js → alert-banner-DFnn_lC6.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-CHZ3I37v.js → analytics-consent-form-modal-CVNugqzu.js} +1 -1
- package/build/assets/api-key-entry-screen-M6su2VSf.js +1 -0
- package/build/assets/{app-settings-Db9ITeJH.js → app-settings-BlvBhBdc.js} +1 -1
- package/build/assets/automation-detail-BWrQk4Oa.js +1 -0
- package/build/assets/automations-list-ux9KvYsU.js +1 -0
- package/build/assets/back-nav-button-7dQJ2k3O.js +1 -0
- package/build/assets/backend-form-modal-CDnEYjaU.js +1 -0
- package/build/assets/{backend-synced-settings-badge-Dc6c7GT4.js → backend-synced-settings-badge-BTIj-Ffq.js} +1 -1
- package/build/assets/base-modal-C2oy2EBG.js +1 -0
- package/build/assets/brand-button-DJ_S16rO.js +1 -0
- package/build/assets/{browser-D810xUYt.js → browser-CGM-k-sH.js} +2 -2
- package/build/assets/browser-store-DAsixKdU.js +1 -0
- package/build/assets/{browser-tab-B-aIqXRl.js → browser-tab-dvSPdvkm.js} +1 -1
- package/build/assets/{checkmark-DL7acQA7.js → checkmark-Dus0b6jt.js} +1 -1
- package/build/assets/{chevron-left-small-CVWf8TI6.js → chevron-left-small-_uvG7RVM.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-P7ZZToV4.js → circle-plus-check-toggle-DKS8MAVV.js} +1 -1
- package/build/assets/{close-B5LROHR3.js → close-BU5iTc66.js} +1 -1
- package/build/assets/code-tag-BzyqOtPD.js +1 -0
- package/build/assets/combobox-caret-BJC7XJsz.js +1 -0
- package/build/assets/{command-store-DFN_17p1.js → command-store-CE1weJy8.js} +1 -1
- package/build/assets/{condenser-settings-wnEKhBof.js → condenser-settings-BolbDvm5.js} +1 -1
- package/build/assets/{confirmation-modal-Dau3w_sa.js → confirmation-modal-B5Ca6qFE.js} +1 -1
- package/build/assets/context-menu-list-item-7tAcm2c3.js +1 -0
- package/build/assets/conversation-D0N4dw_p.js +19 -0
- package/build/assets/conversation-DhRJuZLG.js +1 -0
- package/build/assets/conversation-panel-CNqHbS_Z.js +1 -0
- package/build/assets/conversation-service.api-BsJy6uuL.js +1 -0
- package/build/assets/conversation-state-store-D-w0uurj.js +1 -0
- package/build/assets/conversation-store-CC-isCnP.js +1 -0
- package/build/assets/{conversation-tab-empty-state-DyssnnWa.js → conversation-tab-empty-state-CStQLPVW.js} +1 -1
- package/build/assets/conversation-websocket-context-DvHgx_FE.js +3 -0
- package/build/assets/{copy-DYgmUdIw.js → copy-Chg-sFu3.js} +1 -1
- package/build/assets/{custom-toast-handlers-C-SZFmto.js → custom-toast-handlers-ufGJ6_Rc.js} +1 -1
- package/build/assets/declaration-CR6HMp29.js +1 -0
- package/build/assets/{device-verify-DqDlphsG.js → device-verify-C6mj28zv.js} +1 -1
- package/build/assets/dist-DNeWJ2bh.js +1 -0
- package/build/assets/dropdown-classes-BsVmxlNG.js +1 -0
- package/build/assets/edit-automation-modal-BpX-t-HD.js +1 -0
- package/build/assets/ellipsis-button-Vh5MvRZa.js +1 -0
- package/build/assets/entry.client-Ck9rQCg-.js +2 -0
- package/build/assets/enum-filter-dropdown-5JeF2RLb.js +1 -0
- package/build/assets/{environment-switch-overlay-XL8yCGP6.js → environment-switch-overlay-Tf_BIfeR.js} +1 -1
- package/build/assets/extensions-hub-CE9QOb5n.js +1 -0
- package/build/assets/{extensions-navigation-BYR8Giqq.js → extensions-navigation-DSLGNGbS.js} +1 -1
- package/build/assets/file-BTY6Gyy9.js +1 -0
- package/build/assets/files-tab-cL668j1I.js +1 -0
- package/build/assets/files-tab-store-m0ARqX_E.js +1 -0
- package/build/assets/{folder-ZZJVGgd7.js → folder-D1T2W1cj.js} +1 -1
- package/build/assets/git-control-bar-branch-button-DtIrOrie.js +27 -0
- package/build/assets/git-provider-icon-CHdGBdU2.js +1 -0
- package/build/assets/globe-Bzj_0oXT.js +1 -0
- package/build/assets/home-Cz2Veg56.js +1 -0
- package/build/assets/{i18n-CTohRuoO.js → i18n-DET2iOyh.js} +1 -1
- package/build/assets/install-server-modal-B9nXCS3u.js +1 -0
- package/build/assets/launch-CWz0dm4o.js +1 -0
- package/build/assets/{lesson-plan-dH5Bj0pN.js → lesson-plan-duSsqWVs.js} +1 -1
- package/build/assets/link-external-DGxVm4Ps.js +1 -0
- package/build/assets/{llm-client-DaH1TuyR.js → llm-client-CYEaUjGx.js} +1 -1
- package/build/assets/llm-settings-DFkXHuvT.js +1 -0
- package/build/assets/llm-settings-DhrdCXqX.js +1 -0
- package/build/assets/{loading-spinner-BPtYORNK.js → loading-spinner-5GT9q1xy.js} +1 -1
- package/build/assets/manage-backends-modal-DpBD_vR9.js +1 -0
- package/build/assets/manage-workspaces-modal-CtRbxREx.js +1 -0
- package/build/assets/manifest-eed90ff5.js +1 -0
- package/build/assets/{markdown-renderer-DMzf2i4x.js → markdown-renderer-B3IAVfv4.js} +1 -1
- package/build/assets/mcp-BUe7kiYM.js +9 -0
- package/build/assets/messages-dqp_KYyl.js +36 -0
- package/build/assets/{modal-backdrop-BAbgYsqB.js → modal-backdrop-RfNCrSpK.js} +1 -1
- package/build/assets/{modal-body-BI6Ru2Qr.js → modal-body-aoa2fx5W.js} +1 -1
- package/build/assets/modal-classes-6YqcqA6y.js +1 -0
- package/build/assets/{modal-close-button-t1Gh3qmL.js → modal-close-button-CtWOUMmw.js} +1 -1
- package/build/assets/{model-selector-SM9IUz-q.js → model-selector-BvSTrkhT.js} +1 -1
- package/build/assets/{navigation-context-D0YWpT8d.js → navigation-context-BdKYH32C.js} +1 -1
- package/build/assets/{navigation-link-Cn7KP3c5.js → navigation-link-U4vY9i_C.js} +1 -1
- package/build/assets/{openhands-logo-CnrF6LKb.js → openhands-logo-CCo0wJZX.js} +1 -1
- package/build/assets/{option-service.api-KvY_mZMY.js → option-service.api-DmNVxAvS.js} +1 -1
- package/build/assets/{organization-service.api-DzYTHTYC.js → organization-service.api-DbnougaQ.js} +1 -1
- package/build/assets/{path-utils-C3bQf6lJ.js → path-utils-onx24uF5.js} +1 -1
- package/build/assets/{plan-components-atxXCF0R.js → plan-components-CRDMQzsS.js} +1 -1
- package/build/assets/{planner-tab-BlrCpv-7.js → planner-tab-CmIjLz7q.js} +1 -1
- package/build/assets/{profiles-client-D6IkTJof.js → profiles-client-fEmgWkCW.js} +1 -1
- package/build/assets/{providers-Bx6EfrzZ.js → providers-CbD7fiic.js} +1 -1
- package/build/assets/proxy-BAdHH8QB.js +1 -0
- package/build/assets/{query-client-config-B7u9asM0.js → query-client-config-CRnGSujB.js} +1 -1
- package/build/assets/{recommended-automations-launcher-BQChv2rc.js → recommended-automations-launcher-uTyODuzB.js} +3 -3
- package/build/assets/{root-BgEbw3S0.js → root-DmjpFpTu.js} +2 -2
- package/build/assets/root-Z2VHU4R3.css +1 -0
- package/build/assets/root-layout-DejMsKhy.js +2 -0
- package/build/assets/{sdk-section-page-DOIKvwSL.js → sdk-section-page-BgDlMhcq.js} +1 -1
- package/build/assets/{sdk-settings-schema-DsUf9wu1.js → sdk-settings-schema-CLmJ9sho.js} +1 -1
- package/build/assets/{search-27Owlc3A.js → search-SuJctqNJ.js} +1 -1
- package/build/assets/secrets-service-B7CxNinp.js +1 -0
- package/build/assets/secrets-settings-yK7CqIpm.js +1 -0
- package/build/assets/{server-client-DyAQ3NZ_.js → server-client-Kh4QSwDJ.js} +1 -1
- package/build/assets/{settings-BYkVX7vW.js → settings-DN5PpgRD.js} +1 -1
- package/build/assets/{settings-dropdown-input-BJYvGdg-.js → settings-dropdown-input-BtoovFre.js} +1 -1
- package/build/assets/{settings-gear-C77PgE_O.js → settings-gear-Dd8K2_8B.js} +1 -1
- package/build/assets/settings-index-DKC8IY1P.js +1 -0
- package/build/assets/{settings-input-Bn7F5C75.js → settings-input-CehsXnb3.js} +1 -1
- package/build/assets/settings-list-classes-E3v_f6QG.js +1 -0
- package/build/assets/settings-modal-DJ4kGzUx.js +1 -0
- package/build/assets/{settings-section-header-context-BgZe5YkE.js → settings-section-header-context-DewwJ0-F.js} +1 -1
- package/build/assets/settings-service.api-C3rxTtPj.js +1 -0
- package/build/assets/{settings-switch-BeIKrWms.js → settings-switch-BiBuS3xa.js} +1 -1
- package/build/assets/{settings-utils-B6Nl07io.js → settings-utils-DY04tWG1.js} +1 -1
- package/build/assets/{shared-conversation-AMyqXvpk.js → shared-conversation-h9YnBtCU.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-D0-AvsnT.js +1 -0
- package/build/assets/{sidebar-nav-link-BGjiJq-4.js → sidebar-nav-link-OhIeFyna.js} +1 -1
- package/build/assets/{sidebar-store-Uy3v0AOV.js → sidebar-store-DnQAJAE5.js} +1 -1
- package/build/assets/{skill-card-pill-row-DF1axQCG.js → skill-card-pill-row-BW9qvhoK.js} +1 -1
- package/build/assets/{skills-ChIKZPK4.js → skills-0GRKX5Xj.js} +1 -1
- package/build/assets/{skills-plugins-CcI_19lM.js → skills-plugins-DNcsNF88.js} +1 -1
- package/build/assets/skills-settings-7liFiSY6.js +2 -0
- package/build/assets/{styled-tooltip-CBzrri6o.js → styled-tooltip-hdfMXPQC.js} +1 -1
- package/build/assets/{switch-skeleton-DnC9wLp7.js → switch-skeleton-DSKqSx2A.js} +1 -1
- package/build/assets/{task-list-tab-DUJn1sgz.js → task-list-tab-DT6_zfUs.js} +1 -1
- package/build/assets/{terminal-DgQk1Ay6.js → terminal-CDhQGDua.js} +2 -2
- package/build/assets/{terminal-RmuaSdhJ.js → terminal-CPYWdo4j.js} +1 -1
- package/build/assets/{toggle-switch-Pvyp2RAN.js → toggle-switch-T2v6sJ6l.js} +1 -1
- package/build/assets/{typography-gpuWmrQO.js → typography-BDgnT7Yp.js} +1 -1
- package/build/assets/{u-check-circle-IUIfACQQ.js → u-check-circle-DOauqQKb.js} +1 -1
- package/build/assets/{u-check-circle-half-C1YxB6py.js → u-check-circle-half-steSK_JB.js} +1 -1
- package/build/assets/{u-circuit-BmVikJHu.js → u-circuit-x3ExjBbU.js} +1 -1
- package/build/assets/{u-edit-CFvXHqZk.js → u-edit-BbrptMCa.js} +1 -1
- package/build/assets/{use-active-conversation-BEFNwnFk.js → use-active-conversation-DHGcmjCK.js} +1 -1
- package/build/assets/use-agent-settings-schema-CLoTOSJI.js +1 -0
- package/build/assets/{use-agent-state-Bkrd1FZq.js → use-agent-state-PKrUPMJ3.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-CvkXFnTT.js → use-cloud-current-user-id-Ddr75hEz.js} +1 -1
- package/build/assets/{use-config-Co1O8-Ey.js → use-config-OIMQLQ2s.js} +1 -1
- package/build/assets/{use-create-conversation-CEgXpkfH.js → use-create-conversation-Bszyp13O.js} +1 -1
- package/build/assets/{use-event-store-BT_gV3ut.js → use-event-store-BomO7ywK.js} +1 -1
- package/build/assets/{use-get-secrets-DuhdIA59.js → use-get-secrets-8Jby8ele.js} +1 -1
- package/build/assets/{use-handle-plan-click-Ckkm5eIY.js → use-handle-plan-click-CohJPvvW.js} +1 -1
- package/build/assets/use-is-authed-dw2026rR.js +1 -0
- package/build/assets/{use-is-creating-conversation-BZ5hB_Bg.js → use-is-creating-conversation-DX2qSlfL.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-fNN_xGZG.js → use-launch-skill-in-chat-sQNEOLGD.js} +1 -1
- package/build/assets/use-llm-profiles-C861aFAq.js +1 -0
- package/build/assets/use-runtime-is-ready-Do2h_hRl.js +1 -0
- package/build/assets/{use-save-settings-VUrj_QNG.js → use-save-settings-DkAOEfD9.js} +1 -1
- package/build/assets/use-settings-D5hbTS9t.js +1 -0
- package/build/assets/{use-settings-nav-items-1ZvovKSr.js → use-settings-nav-items-BcSbo02d.js} +1 -1
- package/build/assets/{use-skills-DAMLFjKU.js → use-skills-D7PS0fH0.js} +1 -1
- package/build/assets/{use-task-list-CLJbuJgM.js → use-task-list-CsT10CBb.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DdSRw-6P.js → use-unified-vscode-url-DEoe-NRI.js} +1 -1
- package/build/assets/use-user-conversation-Cs5H1pUF.js +1 -0
- package/build/assets/{useMutation-DqrumCWD.js → useMutation-GSSKKebK.js} +1 -1
- package/build/assets/{useTranslation-DCOdSSMl.js → useTranslation-B6voJV4y.js} +1 -1
- package/build/assets/utils-DCVfKFRt.js +1 -0
- package/build/assets/{vendor~browser-BNjNhjFU.js → vendor~browser-BrOJLj3y.js} +1 -1
- package/build/assets/vendor~conversation-panel~conversation-C9o-K1hW.js +1 -0
- package/build/assets/vendor~conversation-panel~conversation~index-RXYdJYxU.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-DJS-rJdI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-6ByzelMS.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BED5W_c4.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-By5W2oHN.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CCbqAFiI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BbFOrAjI.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CG96FCly.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-smY2r837.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-E4d6IEfI.js} +1 -1
- package/build/assets/vendor~home~mcp~automations-list-CZSK-lT2.js +1 -0
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-Z3nsiNNq.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CjJdFLoM.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-DbfELDJu.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-m8dOii0J.js} +2 -2
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DjAjXS5J.js → vendor~root-layout~home~conversation-panel~conversation-B5WNMnt4.js} +1 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-CbAhtEMv.js +1 -0
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-6Rm8U_Sr.js +9 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BkQGKpye.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-tTR8C6m0.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-Bbs7UJ5U.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-BJbu9kpL.js} +2 -2
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-DTwbEEcX.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-hTzSytKK.js} +1 -1
- package/build/assets/{vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-CDXvdvb2.js → vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~f2l2lr17-DYXOLEck.js} +1 -1
- package/build/assets/{verification-settings-CsbvQcYS.js → verification-settings-Dlt8pINd.js} +1 -1
- package/build/assets/{vscode-tab-DjNArCgY.js → vscode-tab-DgepcYtF.js} +1 -1
- package/build/assets/{waiting-for-runtime-message-CntjExbU.js → waiting-for-runtime-message-CdK3btDZ.js} +1 -1
- package/build/assets/{x-mark-CrpjscNc.js → x-mark-BrkSPIiT.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +20 -2
- package/build/locales/ca/openhands.json +20 -2
- package/build/locales/de/openhands.json +20 -2
- package/build/locales/en/openhands.json +20 -2
- package/build/locales/es/openhands.json +20 -2
- package/build/locales/fr/openhands.json +20 -2
- package/build/locales/it/openhands.json +20 -2
- package/build/locales/ja/openhands.json +20 -2
- package/build/locales/ko-KR/openhands.json +20 -2
- package/build/locales/no/openhands.json +20 -2
- package/build/locales/pt/openhands.json +20 -2
- package/build/locales/tr/openhands.json +20 -2
- package/build/locales/uk/openhands.json +20 -2
- package/build/locales/zh-CN/openhands.json +20 -2
- package/build/locales/zh-TW/openhands.json +20 -2
- package/dist/api/acp-service/acp-service.api.d.ts +18 -0
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +54 -55
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-client-options.cjs +1 -1
- package/dist/api/agent-server-client-options.cjs.map +1 -1
- package/dist/api/agent-server-client-options.d.ts +4 -0
- package/dist/api/agent-server-client-options.js +18 -12
- package/dist/api/agent-server-client-options.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +1 -1
- package/dist/api/agent-server-compatibility.js +30 -25
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +1 -51
- package/dist/api/agent-server-config.js +20 -70
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.d.ts +11 -5
- package/dist/api/backend-registry/active-store.js +36 -27
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/auth.cjs +1 -1
- package/dist/api/backend-registry/auth.cjs.map +1 -1
- package/dist/api/backend-registry/auth.js +3 -9
- package/dist/api/backend-registry/auth.js.map +1 -1
- package/dist/api/backend-registry/default-backend.cjs +1 -1
- package/dist/api/backend-registry/default-backend.cjs.map +1 -1
- package/dist/api/backend-registry/default-backend.d.ts +9 -16
- package/dist/api/backend-registry/default-backend.js +5 -4
- package/dist/api/backend-registry/default-backend.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +67 -34
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +8 -13
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +1 -2
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/proxy.cjs +1 -1
- package/dist/api/cloud/proxy.cjs.map +1 -1
- package/dist/api/cloud/proxy.d.ts +6 -6
- package/dist/api/cloud/proxy.js +33 -24
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/cloud/sandbox-service.api.cjs.map +1 -1
- package/dist/api/cloud/sandbox-service.api.d.ts +3 -3
- package/dist/api/cloud/sandbox-service.api.js.map +1 -1
- package/dist/api/cloud/secrets-service.api.cjs.map +1 -1
- package/dist/api/cloud/secrets-service.api.d.ts +3 -4
- package/dist/api/cloud/secrets-service.api.js.map +1 -1
- package/dist/api/cloud/settings-service.api.cjs +1 -1
- package/dist/api/cloud/settings-service.api.cjs.map +1 -1
- package/dist/api/cloud/settings-service.api.js +5 -1
- package/dist/api/cloud/settings-service.api.js.map +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +5 -5
- package/dist/api/cloud/skills-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +115 -108
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/device-flow-client.cjs +1 -1
- package/dist/api/device-flow-client.cjs.map +1 -1
- package/dist/api/device-flow-client.d.ts +3 -5
- package/dist/api/device-flow-client.js +55 -66
- package/dist/api/device-flow-client.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.cjs.map +1 -1
- package/dist/api/event-service/event-service.api.d.ts +3 -3
- package/dist/api/event-service/event-service.api.js +17 -17
- package/dist/api/event-service/event-service.api.js.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.js +11 -11
- package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.js +6 -6
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-content.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-content.js +10 -10
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.d.ts +5 -5
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-result.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/features/automations/automation-action-button-classes.d.ts +2 -2
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +1 -0
- package/dist/components/features/backends/backend-form-modal.js +203 -140
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +117 -105
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/backend-status-dot.cjs +1 -1
- package/dist/components/features/backends/backend-status-dot.cjs.map +1 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +1 -1
- package/dist/components/features/backends/backend-status-dot.js +1 -1
- package/dist/components/features/backends/backend-status-dot.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +81 -70
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.cjs.map +1 -1
- package/dist/components/features/chat/change-agent-button.js +59 -57
- package/dist/components/features/chat/change-agent-button.js.map +1 -1
- package/dist/components/features/chat/change-agent-context-menu.cjs +1 -1
- package/dist/components/features/chat/change-agent-context-menu.cjs.map +1 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +3 -1
- package/dist/components/features/chat/change-agent-context-menu.js +30 -25
- package/dist/components/features/chat/change-agent-context-menu.js.map +1 -1
- package/dist/components/features/chat/chat-add-file-button.cjs +1 -1
- package/dist/components/features/chat/chat-add-file-button.cjs.map +1 -1
- package/dist/components/features/chat/chat-add-file-button.js +39 -38
- package/dist/components/features/chat/chat-add-file-button.js.map +1 -1
- package/dist/components/features/chat/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +185 -57
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +113 -113
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-model.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-model.js +52 -51
- package/dist/components/features/chat/components/chat-input-model.js.map +1 -1
- package/dist/components/features/chat/components/slash-command-menu.cjs +2 -2
- package/dist/components/features/chat/components/slash-command-menu.cjs.map +1 -1
- package/dist/components/features/chat/components/slash-command-menu.js +38 -34
- package/dist/components/features/chat/components/slash-command-menu.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-pr-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-pull-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.cjs +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.js +16 -15
- package/dist/components/features/chat/git-control-bar-push-button.js.map +1 -1
- package/dist/components/features/chat/git-control-bar.cjs +1 -1
- package/dist/components/features/chat/git-control-bar.cjs.map +1 -1
- package/dist/components/features/chat/git-control-bar.js +63 -62
- package/dist/components/features/chat/git-control-bar.js.map +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
- package/dist/components/features/chat/pending-user-messages.js +27 -23
- package/dist/components/features/chat/pending-user-messages.js.map +1 -1
- package/dist/components/features/chat/switch-profile-button.cjs +1 -1
- package/dist/components/features/chat/switch-profile-button.cjs.map +1 -1
- package/dist/components/features/chat/switch-profile-button.js +26 -25
- package/dist/components/features/chat/switch-profile-button.js.map +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.cjs +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.cjs.map +1 -1
- package/dist/components/features/chat/switch-profile-context-menu.js +77 -67
- package/dist/components/features/chat/switch-profile-context-menu.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.js +3 -2
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-icon-text.js +20 -10
- package/dist/components/features/context-menu/context-menu-icon-text.js.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +10 -9
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-status.cjs +1 -1
- package/dist/components/features/controls/agent-status.js +12 -12
- package/dist/components/features/controls/git-tools-submenu.cjs +1 -1
- package/dist/components/features/controls/git-tools-submenu.cjs.map +1 -1
- package/dist/components/features/controls/git-tools-submenu.js +1 -1
- package/dist/components/features/controls/git-tools-submenu.js.map +1 -1
- package/dist/components/features/controls/macros-submenu.cjs +1 -1
- package/dist/components/features/controls/macros-submenu.cjs.map +1 -1
- package/dist/components/features/controls/macros-submenu.js +1 -1
- package/dist/components/features/controls/macros-submenu.js.map +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.js +14 -15
- package/dist/components/features/controls/server-status-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.js +4 -4
- package/dist/components/features/controls/server-status.cjs +1 -1
- package/dist/components/features/controls/server-status.js +7 -7
- package/dist/components/features/controls/tools-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.js +16 -16
- package/dist/components/features/controls/tools-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.js +11 -11
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +11 -11
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +60 -47
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js +86 -82
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +4 -4
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +9 -9
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +93 -93
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +177 -177
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.cjs +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.cjs.map +1 -1
- package/dist/components/features/conversation-panel/ellipsis-button.js +13 -13
- package/dist/components/features/conversation-panel/ellipsis-button.js.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js +57 -53
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.cjs +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.cjs.map +1 -1
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.js +3 -2
- package/dist/components/features/conversation-panel/new-conversation-dropdown-styles.js.map +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.cjs +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.cjs.map +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.js +11 -8
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.js.map +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.cjs.map +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +2 -5
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +45 -42
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +11 -0
- package/dist/components/features/home/shared/dropdown-item.cjs +1 -1
- package/dist/components/features/home/shared/dropdown-item.cjs.map +1 -1
- package/dist/components/features/home/shared/dropdown-item.js +20 -16
- package/dist/components/features/home/shared/dropdown-item.js.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.js +23 -22
- package/dist/components/features/home/shared/generic-dropdown-menu.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +103 -102
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs.map +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js +68 -67
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +62 -60
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/index.cjs +1 -1
- package/dist/components/features/mcp-page/index.d.ts +1 -0
- package/dist/components/features/mcp-page/index.js +1 -0
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.js +150 -119
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.cjs +2 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.cjs.map +1 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +7 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.js +50 -0
- package/dist/components/features/mcp-page/save-as-secret-toggle.js.map +1 -0
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -2
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +1 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +19 -10
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +5 -0
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -0
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.js +1 -0
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +1 -1
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/shared/buttons/back-nav-button.cjs +2 -0
- package/dist/components/shared/buttons/back-nav-button.cjs.map +1 -0
- package/dist/components/shared/buttons/back-nav-button.d.ts +17 -0
- package/dist/components/shared/buttons/back-nav-button.js +33 -0
- package/dist/components/shared/buttons/back-nav-button.js.map +1 -0
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +5 -5
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +32 -31
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +14 -13
- package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.js +17 -16
- package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
- package/dist/components/shared/text-shimmer.cjs +2 -0
- package/dist/components/shared/text-shimmer.cjs.map +1 -0
- package/dist/components/shared/text-shimmer.d.ts +11 -0
- package/dist/components/shared/text-shimmer.js +43 -0
- package/dist/components/shared/text-shimmer.js.map +1 -0
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +16 -3
- package/dist/constants/acp-providers.js +0 -1
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/contexts/active-backend-context.cjs +1 -1
- package/dist/contexts/active-backend-context.cjs.map +1 -1
- package/dist/contexts/active-backend-context.js +32 -32
- package/dist/contexts/active-backend-context.js.map +1 -1
- package/dist/hooks/chat/use-chat-input-logic.cjs +1 -1
- package/dist/hooks/chat/use-chat-input-logic.cjs.map +1 -1
- package/dist/hooks/chat/use-chat-input-logic.js +13 -6
- package/dist/hooks/chat/use-chat-input-logic.js.map +1 -1
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs +2 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs.map +1 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.d.ts +9 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.js +24 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.js.map +1 -0
- package/dist/hooks/mutation/use-unified-start-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-unified-start-conversation.js +8 -8
- package/dist/hooks/mutation/use-unified-stop-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-unified-stop-conversation.js +15 -15
- package/dist/hooks/query/use-acp-auth-status.d.ts +36 -0
- package/dist/hooks/query/use-agent-settings-schema.cjs +1 -1
- package/dist/hooks/query/use-agent-settings-schema.cjs.map +1 -1
- package/dist/hooks/query/use-agent-settings-schema.js +26 -16
- package/dist/hooks/query/use-agent-settings-schema.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.d.ts +2 -0
- package/dist/hooks/query/use-backends-health.js +31 -21
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +15 -14
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/hooks/query/use-settings.cjs +1 -1
- package/dist/hooks/query/use-settings.cjs.map +1 -1
- package/dist/hooks/query/use-settings.js +65 -52
- package/dist/hooks/query/use-settings.js.map +1 -1
- package/dist/hooks/query/use-user-conversation.cjs +1 -1
- package/dist/hooks/query/use-user-conversation.cjs.map +1 -1
- package/dist/hooks/query/use-user-conversation.js +20 -11
- package/dist/hooks/query/use-user-conversation.js.map +1 -1
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.js +13 -13
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.js +10 -10
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-llm-configured.d.ts +25 -0
- package/dist/hooks/use-runtime-is-ready.cjs +1 -1
- package/dist/hooks/use-runtime-is-ready.js +5 -5
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +19 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +321 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/stop-circle.cjs +1 -1
- package/dist/icons/stop-circle.cjs.map +1 -1
- package/dist/icons/stop-circle.js +7 -10
- package/dist/icons/stop-circle.js.map +1 -1
- package/dist/locales/ar/openhands.json +20 -2
- package/dist/locales/ca/openhands.json +20 -2
- package/dist/locales/de/openhands.json +20 -2
- package/dist/locales/en/openhands.json +20 -2
- package/dist/locales/es/openhands.json +20 -2
- package/dist/locales/fr/openhands.json +20 -2
- package/dist/locales/it/openhands.json +20 -2
- package/dist/locales/ja/openhands.json +20 -2
- package/dist/locales/ko-KR/openhands.json +20 -2
- package/dist/locales/no/openhands.json +20 -2
- package/dist/locales/pt/openhands.json +20 -2
- package/dist/locales/tr/openhands.json +20 -2
- package/dist/locales/uk/openhands.json +20 -2
- package/dist/locales/zh-CN/openhands.json +20 -2
- package/dist/locales/zh-TW/openhands.json +20 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.js +2 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.js +2 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.js +3 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +8 -7
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js +2 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.js +4 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.cjs +2 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.cjs.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
- 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/conversation.cjs +1 -1
- package/dist/routes/conversation.cjs.map +1 -1
- package/dist/routes/conversation.js +1 -1
- package/dist/routes/conversation.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +55 -54
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/secrets-settings.cjs +1 -1
- package/dist/routes/secrets-settings.cjs.map +1 -1
- package/dist/routes/secrets-settings.js +19 -27
- package/dist/routes/secrets-settings.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +4 -0
- package/dist/stores/conversation-store.js +6 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/types/agent-server/core/events/acp-tool-call-event.d.ts +6 -4
- package/dist/types/agent-server/core/events/system-event.d.ts +5 -0
- package/dist/types/automation.d.ts +15 -0
- package/dist/types/settings.d.ts +3 -1
- package/dist/ui/combobox-caret.cjs +1 -1
- package/dist/ui/combobox-caret.cjs.map +1 -1
- package/dist/ui/combobox-caret.d.ts +1 -1
- package/dist/ui/combobox-caret.js +9 -8
- package/dist/ui/combobox-caret.js.map +1 -1
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.js +9 -8
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/dropdown/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown/dropdown-menu.cjs.map +1 -1
- package/dist/ui/dropdown/dropdown-menu.js +21 -17
- package/dist/ui/dropdown/dropdown-menu.js.map +1 -1
- package/dist/ui/dropdown/dropdown.cjs +1 -1
- package/dist/ui/dropdown/dropdown.cjs.map +1 -1
- package/dist/ui/dropdown/dropdown.js +2 -2
- package/dist/ui/dropdown/dropdown.js.map +1 -1
- package/dist/utils/automation-schedule.d.ts +1 -0
- package/dist/utils/dropdown-classes.cjs +2 -0
- package/dist/utils/dropdown-classes.cjs.map +1 -0
- package/dist/utils/dropdown-classes.d.ts +32 -0
- package/dist/utils/dropdown-classes.js +8 -0
- package/dist/utils/dropdown-classes.js.map +1 -0
- package/dist/utils/form-control-classes.cjs +1 -1
- package/dist/utils/form-control-classes.cjs.map +1 -1
- package/dist/utils/form-control-classes.d.ts +18 -2
- package/dist/utils/form-control-classes.js +4 -3
- package/dist/utils/form-control-classes.js.map +1 -1
- package/dist/utils/git-control-bar-classes.cjs +2 -0
- package/dist/utils/git-control-bar-classes.cjs.map +1 -0
- package/dist/utils/git-control-bar-classes.d.ts +4 -0
- package/dist/utils/git-control-bar-classes.js +14 -0
- package/dist/utils/git-control-bar-classes.js.map +1 -0
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.d.ts +6 -3
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.cjs +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.cjs.map +1 -1
- package/dist/utils/mobile-top-bar-icon-button-classes.js +3 -3
- package/dist/utils/mobile-top-bar-icon-button-classes.js.map +1 -1
- package/dist/utils/modal-classes.cjs +2 -0
- package/dist/utils/modal-classes.cjs.map +1 -0
- package/dist/utils/modal-classes.d.ts +8 -0
- package/dist/utils/modal-classes.js +7 -0
- package/dist/utils/modal-classes.js.map +1 -0
- package/dist/utils/openhands-llm.cjs +2 -0
- package/dist/utils/openhands-llm.cjs.map +1 -0
- package/dist/utils/openhands-llm.d.ts +2 -0
- package/dist/utils/openhands-llm.js +9 -0
- package/dist/utils/openhands-llm.js.map +1 -0
- package/dist/utils/redact-custom-secrets.cjs +2 -0
- package/dist/utils/redact-custom-secrets.cjs.map +1 -0
- package/dist/utils/redact-custom-secrets.d.ts +6 -0
- package/dist/utils/redact-custom-secrets.js +10 -0
- package/dist/utils/redact-custom-secrets.js.map +1 -0
- package/dist/utils/status.cjs +1 -1
- package/dist/utils/status.cjs.map +1 -1
- package/dist/utils/status.d.ts +2 -1
- package/dist/utils/status.js +9 -8
- package/dist/utils/status.js.map +1 -1
- package/dist/utils/system-message-adapter.cjs +1 -1
- package/dist/utils/system-message-adapter.cjs.map +1 -1
- package/dist/utils/system-message-adapter.js +10 -7
- package/dist/utils/system-message-adapter.js.map +1 -1
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +21 -20
- package/dist/utils/utils.js.map +1 -1
- package/package.json +2 -2
- package/scripts/dev-safe.mjs +3 -1
- package/scripts/dev-static.mjs +2 -2
- package/scripts/dev-with-automation.mjs +283 -108
- package/scripts/static-build.mjs +20 -19
- package/scripts/static-server.mjs +50 -3
- package/build/assets/acp-providers-CbiRekh9.js +0 -1
- package/build/assets/active-backend-context-cCM1vYYZ.js +0 -1
- package/build/assets/add-backend-modal-DIUQzMPa.js +0 -1
- package/build/assets/agent-server-client-options-Bc5ZorQZ.js +0 -1
- package/build/assets/agent-server-compatibility-BlkUsrX2.js +0 -1
- package/build/assets/agent-server-conversation-service.api-C2V5SlHu.js +0 -5
- package/build/assets/api-key-entry-screen-B2gynaCp.js +0 -1
- package/build/assets/automation-detail-DJvbVSYK.js +0 -1
- package/build/assets/automations-list-rMki-8au.js +0 -1
- package/build/assets/backend-form-modal-Dnk33xA_.js +0 -1
- package/build/assets/base-modal-_dYTw1ri.js +0 -1
- package/build/assets/brand-button-Br7f0kZJ.js +0 -1
- package/build/assets/browser-store-Couc4S5D.js +0 -1
- package/build/assets/clock-BRjCgHTc.js +0 -1
- package/build/assets/combobox-caret-to1O8irE.js +0 -1
- package/build/assets/context-menu-list-item-CWNFpuiC.js +0 -1
- package/build/assets/conversation-DVrKU0oz.js +0 -19
- package/build/assets/conversation-Dlys-D5A.js +0 -1
- package/build/assets/conversation-panel-iF09WjZ4.js +0 -1
- package/build/assets/conversation-service.api-CCfztilW.js +0 -1
- package/build/assets/conversation-state-store-u5jepov0.js +0 -1
- package/build/assets/conversation-store-Z5iMCRpc.js +0 -1
- package/build/assets/conversation-websocket-context-DhJhqUna.js +0 -3
- package/build/assets/declaration-BNMqORFE.js +0 -1
- package/build/assets/dist-BxBP7tFD.js +0 -1
- package/build/assets/edit-automation-modal-BGzR3nfZ.js +0 -1
- package/build/assets/ellipsis-button-ZyLMPURn.js +0 -1
- package/build/assets/entry.client-1VMHpktY.js +0 -2
- package/build/assets/enum-filter-dropdown-CEgCdu4A.js +0 -1
- package/build/assets/extensions-hub-C651jsVh.js +0 -1
- package/build/assets/files-tab-R5z0lLdY.js +0 -1
- package/build/assets/files-tab-store-CDyVTXNT.js +0 -1
- package/build/assets/git-control-bar-branch-button-COdRAYHb.js +0 -27
- package/build/assets/git-provider-icon-BzLbc0yC.js +0 -1
- package/build/assets/home-XxBpNOVq.js +0 -1
- package/build/assets/install-server-modal-f31_CLrW.js +0 -1
- package/build/assets/launch-CshDse3e.js +0 -1
- package/build/assets/link-external-D2POYx4c.js +0 -1
- package/build/assets/llm-settings-Bql-vydt.js +0 -1
- package/build/assets/llm-settings-C_tal6Ds.js +0 -1
- package/build/assets/manage-backends-modal-l7RkKfwX.js +0 -1
- package/build/assets/manage-workspaces-modal-DhKF_8z3.js +0 -1
- package/build/assets/manifest-d9077852.js +0 -1
- package/build/assets/mcp-D2onbwVk.js +0 -9
- package/build/assets/messages-D0rWot7s.js +0 -36
- package/build/assets/proxy-CxydCnis.js +0 -1
- package/build/assets/root-DHeCXo9N.css +0 -1
- package/build/assets/root-layout-Czo9Ma6Q.js +0 -2
- package/build/assets/secrets-service-BsnKFc2x.js +0 -1
- package/build/assets/secrets-settings-Bz_UohPJ.js +0 -1
- package/build/assets/settings-client-C73C7IgV.js +0 -1
- package/build/assets/settings-index-Dz0BmdJD.js +0 -1
- package/build/assets/settings-list-classes-Bf80tWtc.js +0 -1
- package/build/assets/settings-modal-Brzgh5Yw.js +0 -1
- package/build/assets/settings-service.api-CZ3uWx4v.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-Do_aA9Zm.js +0 -1
- package/build/assets/skills-settings-DlA5hlXw.js +0 -2
- package/build/assets/status-hp6M6E7E.js +0 -1
- package/build/assets/use-agent-settings-schema-33Un7UF2.js +0 -1
- package/build/assets/use-is-authed-BggE5wPj.js +0 -1
- package/build/assets/use-llm-profiles-DDOol3gK.js +0 -1
- package/build/assets/use-runtime-is-ready-B7EF4BKU.js +0 -1
- package/build/assets/use-settings-DQIZmIov.js +0 -1
- package/build/assets/use-user-conversation-C6hrMMtn.js +0 -1
- package/build/assets/utils-i18rdUj2.js +0 -1
- package/build/assets/vendor~conversation-panel~conversation-a9SyrrhV.js +0 -1
- package/build/assets/vendor~conversation-panel~conversation~index-C23ZXO4R.js +0 -1
- package/build/assets/vendor~home~mcp~automations-list-Ccy2I0KU.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DzIXV3Ui.js +0 -9
- /package/build/assets/{automation-IdgZq6ZK.js → automation-XDPAjiZi.js} +0 -0
- /package/build/assets/{color-themes-DSaoIL6A.js → color-themes-B9pm9c-R.js} +0 -0
- /package/build/assets/{common-DR1t-EeP.js → common-DqjLSBOt.js} +0 -0
- /package/build/assets/{conversation-local-storage-UYl-SX-r.js → conversation-local-storage-YmOVXxxW.js} +0 -0
- /package/build/assets/{dist-C6t0EXL7.js → dist-C3NfioQC.js} +0 -0
- /package/build/assets/{environment-switch-store-C4ulFJKp.js → environment-switch-store-CiurvTtK.js} +0 -0
- /package/build/assets/{health-store-BDC2rM-X.js → health-store-B5f0S2FY.js} +0 -0
- /package/build/assets/{map-provider-COBVzZYo.js → map-provider-BJ_8KZKU.js} +0 -0
- /package/build/assets/{middleware-BC9EwbB9.js → middleware-CfatjPYZ.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-Du6eBn-V.js → objectWithoutPropertiesLoose-DSQKyRhw.js} +0 -0
- /package/build/assets/{react-Do0CT17Y.js → react-Dy05vyj5.js} +0 -0
- /package/build/assets/{sdk-settings-field-metadata-CBPmeqYa.js → sdk-settings-field-metadata-DQiaIBie.js} +0 -0
- /package/build/assets/{settings-D_H-qsRm.js → settings-DGY6n4J2.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-I0BDBEoq.js → settings-like-page-layout-classes-D7YjdTd0.js} +0 -0
- /package/build/assets/{use-breakpoint-DbJ6FkQ-.js → use-breakpoint-DF_RiQ6s.js} +0 -0
- /package/build/assets/{use-click-outside-element-DffgWWoZ.js → use-click-outside-element-DhxCUyWl.js} +0 -0
- /package/build/assets/{v4-CNn21NXa.js → v4-khGvL7i2.js} +0 -0
- /package/build/assets/{vendor~browser-DDiZgqD3.js → vendor~browser-DisFGEp9.js} +0 -0
- /package/build/assets/{vendor~browser-tab-BgwV1mxF.js → vendor~browser-tab-BxhTtM9_.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DbvX3OcM.js → vendor~conversation-panel~conversation~alert-banner-w-I2sY6c.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-iOsylxCS.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-BClAMeFe.js} +0 -0
- /package/build/assets/{vendor~files-tab-BGKayPiK.js → vendor~files-tab-BtkpAiMX.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BW6261Sb.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CyZ-3lDQ.js} +0 -0
- /package/build/assets/{vendor~home~mcp~automations-list-DoPfwaXj.js → vendor~home~mcp~automations-list-BgV86Sti.js} +0 -0
- /package/build/assets/{vendor~launch-vdeRTWFu.js → vendor~launch-BXgl67Re.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-D9P8e98a.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~ninslayh-CLlsvdNP.js} +0 -0
- /package/build/assets/{vendor~terminal-DUrOWGFE.js → vendor~terminal-DZaJIY8A.js} +0 -0
|
@@ -1,48 +1,53 @@
|
|
|
1
1
|
import { isAuthRequired as e } from "./agent-server-config.js";
|
|
2
|
-
import {
|
|
3
|
-
import { ServerClient as
|
|
4
|
-
import { SettingsClient as
|
|
5
|
-
import { getAgentServerClientOptions as
|
|
2
|
+
import { getActiveBackend as t, getEffectiveLocalBackend as n, isNoBackend as r } from "./backend-registry/active-store.js";
|
|
3
|
+
import { ServerClient as i } from "../node_modules/@openhands/typescript-client/dist/client/server-client.js";
|
|
4
|
+
import { SettingsClient as a } from "../node_modules/@openhands/typescript-client/dist/client/settings-client.js";
|
|
5
|
+
import { getAgentServerClientOptions as o } from "./agent-server-client-options.js";
|
|
6
6
|
//#region src/api/agent-server-compatibility.ts
|
|
7
|
-
var
|
|
7
|
+
var s = 5e3, c = null, l = (e) => Array.isArray(e?.usable_tools) ? e.usable_tools : null, u = class extends Error {
|
|
8
8
|
details;
|
|
9
9
|
constructor(e) {
|
|
10
10
|
super("Agent server not found. Could not connect to the configured agent server. Start a compatible agent server and reload the page."), this.name = "AgentServerUnavailableError", this.details = e ?? null;
|
|
11
11
|
}
|
|
12
|
-
},
|
|
13
|
-
function
|
|
14
|
-
|
|
12
|
+
}, d = (e) => e instanceof u || typeof e == "object" && !!e && "name" in e && e.name === "AgentServerUnavailableError", f = (t) => e() && g(t, 401);
|
|
13
|
+
function p() {
|
|
14
|
+
c = null;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let t =
|
|
16
|
+
function m(e) {
|
|
17
|
+
let t = l(c);
|
|
18
18
|
return Array.isArray(t) ? t.includes(e) : !0;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function h(e) {
|
|
21
21
|
return e instanceof Error && e.name === "HttpError" && "status" in e && typeof e.status == "number";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function g(e, t) {
|
|
24
|
+
return h(e) && e.status === t;
|
|
25
25
|
}
|
|
26
|
-
async function
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
26
|
+
async function _() {
|
|
27
|
+
let l = n();
|
|
28
|
+
if (!l) {
|
|
29
|
+
if (p(), r(t().backend)) throw new u("No backend configured");
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
let d = o({
|
|
33
|
+
host: l.host,
|
|
34
|
+
sessionApiKey: l.apiKey || null,
|
|
35
|
+
timeout: s
|
|
36
|
+
}), f;
|
|
32
37
|
try {
|
|
33
|
-
|
|
38
|
+
f = await new i(d).getServerInfo();
|
|
34
39
|
} catch (e) {
|
|
35
|
-
throw
|
|
40
|
+
throw p(), g(e, 401) ? e : new u(e instanceof Error ? e.message : null);
|
|
36
41
|
}
|
|
37
42
|
if (e()) try {
|
|
38
|
-
await new
|
|
43
|
+
await new a(d).getSettings();
|
|
39
44
|
} catch (e) {
|
|
40
|
-
if (
|
|
45
|
+
if (g(e, 401)) throw e;
|
|
41
46
|
console.warn("[agent-server] getSettings() probe failed (non-401):", e);
|
|
42
47
|
}
|
|
43
|
-
return
|
|
48
|
+
return c = f, f;
|
|
44
49
|
}
|
|
45
50
|
//#endregion
|
|
46
|
-
export {
|
|
51
|
+
export { f as isAgentServerAuthError, m as isAgentServerToolAvailable, d as isAgentServerUnavailableError, g as isSdkHttpStatusError, _ as loadAgentServerInfo };
|
|
47
52
|
|
|
48
53
|
//# sourceMappingURL=agent-server-compatibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-server-compatibility.js","names":[],"sources":["../../src/api/agent-server-compatibility.ts"],"sourcesContent":["import {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport type { ServerInfo as BaseServerInfo } from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { isAuthRequired } from \"#/api/agent-server-config\";\nimport {
|
|
1
|
+
{"version":3,"file":"agent-server-compatibility.js","names":[],"sources":["../../src/api/agent-server-compatibility.ts"],"sourcesContent":["import {\n ServerClient,\n SettingsClient,\n} from \"@openhands/typescript-client/clients\";\nimport type { ServerInfo as BaseServerInfo } from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"#/api/agent-server-client-options\";\nimport { isAuthRequired } from \"#/api/agent-server-config\";\nimport {\n getActiveBackend,\n getEffectiveLocalBackend,\n isNoBackend,\n} from \"#/api/backend-registry/active-store\";\n\nconst AGENT_SERVER_INFO_TIMEOUT_MS = 5000;\n\nexport interface AgentServerInfo extends BaseServerInfo {\n usable_tools?: string[] | null;\n}\n\nlet cachedAgentServerInfo: AgentServerInfo | null = null;\n\nconst getAdvertisedTools = (serverInfo: AgentServerInfo | null) => {\n if (Array.isArray(serverInfo?.usable_tools)) {\n return serverInfo.usable_tools;\n }\n return null;\n};\n\nexport class AgentServerUnavailableError extends Error {\n readonly details: string | null;\n\n constructor(details?: string | null) {\n super(\n \"Agent server not found. Could not connect to the configured agent server. Start a compatible agent server and reload the page.\",\n );\n this.name = \"AgentServerUnavailableError\";\n this.details = details ?? null;\n }\n}\n\nexport const isAgentServerUnavailableError = (\n error: unknown,\n): error is AgentServerUnavailableError =>\n error instanceof AgentServerUnavailableError ||\n (typeof error === \"object\" &&\n error !== null &&\n \"name\" in error &&\n error.name === \"AgentServerUnavailableError\");\n\n/**\n * Returns true when the agent-server probe failed with HTTP 401.\n * In public mode this means the stored key is stale (server restarted\n * with a different `LOCAL_BACKEND_API_KEY`). Only meaningful when\n * auth is required — a 401 in local mode is a misconfiguration, not a\n * key-rotation event. Uses {@link isAuthRequired} so both the build-time\n * `VITE_AUTH_REQUIRED` flag and the runtime `window.__AGENT_CANVAS_AUTH_REQUIRED__`\n * injection (used by pre-built static binaries) are honoured.\n */\nexport const isAgentServerAuthError = (error: unknown): boolean =>\n isAuthRequired() && isSdkHttpStatusError(error, 401);\n\nexport function clearCachedAgentServerInfo() {\n cachedAgentServerInfo = null;\n}\n\nexport function isAgentServerToolAvailable(toolName: string) {\n const availableTools = getAdvertisedTools(cachedAgentServerInfo);\n if (!Array.isArray(availableTools)) {\n return true;\n }\n return availableTools.includes(toolName);\n}\n\nexport function isSdkHttpError(error: unknown) {\n return (\n error instanceof Error &&\n error.name === \"HttpError\" &&\n \"status\" in error &&\n typeof error.status === \"number\"\n );\n}\n\n/**\n * Narrows an SDK HTTP error to a specific status code.\n * Use instead of manually casting `(err as { status: number }).status`.\n */\nexport function isSdkHttpStatusError(error: unknown, status: number): boolean {\n return (\n isSdkHttpError(error) && (error as { status: number }).status === status\n );\n}\n\nexport async function loadAgentServerInfo() {\n // The probe is a *local* agent-server concern — it verifies the runtime\n // hosting the GUI is reachable. It must NEVER run against the active\n // backend when that backend is cloud, because cloud hosts don't\n // expose /api/server_info and would fail with a CORS error besides.\n const local = getEffectiveLocalBackend();\n if (!local) {\n clearCachedAgentServerInfo();\n\n // Empty registry (NO_BACKEND sentinel) — the user has no backend\n // configured at all. Throw so root.tsx shows the manage-backends\n // modal instead of silently rendering a broken home page.\n if (isNoBackend(getActiveBackend().backend)) {\n throw new AgentServerUnavailableError(\"No backend configured\");\n }\n\n // Active backend is cloud — no local probe needed.\n return null;\n }\n\n const clientOptions = getAgentServerClientOptions({\n host: local.host,\n sessionApiKey: local.apiKey || null,\n timeout: AGENT_SERVER_INFO_TIMEOUT_MS,\n });\n let serverInfo: AgentServerInfo;\n\n try {\n serverInfo = (await new ServerClient(\n clientOptions,\n ).getServerInfo()) as AgentServerInfo;\n } catch (error) {\n clearCachedAgentServerInfo();\n // Preserve 401 so root.tsx can show the auth screen (public mode).\n // All other HTTP errors (502, 503, etc.) mean the server is unreachable\n // or misconfigured — treat them as unavailable.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n const details = error instanceof Error ? error.message : null;\n throw new AgentServerUnavailableError(details);\n }\n\n // /server_info is unprotected, so a stale session key still gets 200.\n // In public mode, validate the key against a protected endpoint so a\n // server restart with a new LOCAL_BACKEND_API_KEY surfaces immediately\n // instead of letting the app load and fail on every subsequent call.\n if (isAuthRequired()) {\n try {\n await new SettingsClient(clientOptions).getSettings();\n } catch (error) {\n // Only rethrow 401 — that means the stored key is invalid /\n // rotated. Other HTTP errors (403, 5xx) and non-HTTP errors\n // (network, timeout) are swallowed: the server *is* up (we just\n // reached /server_info), so let the app proceed with an\n // unvalidated key rather than blocking the UI.\n // NOTE: If the connection drops between the /server_info and\n // getSettings() probes, the app loads with an unvalidated key and\n // subsequent 401s won't trigger the auth screen (they come from\n // React Query hooks, not this bootstrap path). Acceptable for now\n // since the window is narrow and a page refresh recovers.\n if (isSdkHttpStatusError(error, 401)) {\n throw error;\n }\n\n console.warn(\n \"[agent-server] getSettings() probe failed (non-401):\",\n error,\n );\n }\n }\n\n cachedAgentServerInfo = serverInfo;\n return serverInfo;\n}\n"],"mappings":";;;;;;AAaA,IAAM,IAA+B,KAMjC,IAAgD,MAE9C,KAAsB,MACtB,MAAM,QAAQ,GAAY,aAAa,GAClC,EAAW,eAEb,MAGI,IAAb,cAAiD,MAAM;CACrD;CAEA,YAAY,GAAyB;AAKnC,EAJA,MACE,iIACD,EACD,KAAK,OAAO,+BACZ,KAAK,UAAU,KAAW;;GAIjB,KACX,MAEA,aAAiB,KAChB,OAAO,KAAU,cAChB,KACA,UAAU,KACV,EAAM,SAAS,+BAWN,KAA0B,MACrC,GAAgB,IAAI,EAAqB,GAAO,IAAI;AAEtD,SAAgB,IAA6B;AAC3C,KAAwB;;AAG1B,SAAgB,EAA2B,GAAkB;CAC3D,IAAM,IAAiB,EAAmB,EAAsB;AAIhE,QAHK,MAAM,QAAQ,EAAe,GAG3B,EAAe,SAAS,EAAS,GAF/B;;AAKX,SAAgB,EAAe,GAAgB;AAC7C,QACE,aAAiB,SACjB,EAAM,SAAS,eACf,YAAY,KACZ,OAAO,EAAM,UAAW;;AAQ5B,SAAgB,EAAqB,GAAgB,GAAyB;AAC5E,QACE,EAAe,EAAM,IAAK,EAA6B,WAAW;;AAItE,eAAsB,IAAsB;CAK1C,IAAM,IAAQ,GAA0B;AACxC,KAAI,CAAC,GAAO;AAMV,MALA,GAA4B,EAKxB,EAAY,GAAkB,CAAC,QAAQ,CACzC,OAAM,IAAI,EAA4B,wBAAwB;AAIhE,SAAO;;CAGT,IAAM,IAAgB,EAA4B;EAChD,MAAM,EAAM;EACZ,eAAe,EAAM,UAAU;EAC/B,SAAS;EACV,CAAC,EACE;AAEJ,KAAI;AACF,MAAc,MAAM,IAAI,EACtB,EACD,CAAC,eAAe;UACV,GAAO;AAUd,QATA,GAA4B,EAIxB,EAAqB,GAAO,IAAI,GAC5B,IAIF,IAAI,EADM,aAAiB,QAAQ,EAAM,UAAU,KACX;;AAOhD,KAAI,GAAgB,CAClB,KAAI;AACF,QAAM,IAAI,EAAe,EAAc,CAAC,aAAa;UAC9C,GAAO;AAWd,MAAI,EAAqB,GAAO,IAAI,CAClC,OAAM;AAGR,UAAQ,KACN,wDACA,EACD;;AAKL,QADA,IAAwB,GACjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../_virtual/_rolldown/runtime.cjs`);var e=`
|
|
1
|
+
require(`../_virtual/_rolldown/runtime.cjs`);var e=`workspace/project`;function t(e){return e?.trim()||null}function n(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function r(){return n(void 0)}function i(){return t(void 0)}function a(){return r()||(typeof window<`u`?window.location.origin:null)}function o(){return i()}function s(){return(void 0)?.trim()||e}function c(e){return`${s().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function l(){let e=o();return e?{"X-Session-API-Key":e}:{}}function u(){return!0}function d(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}exports.DEFAULT_WORKING_DIR=e,exports.buildConversationWorkingDir=c,exports.getAgentServerBaseUrl=a,exports.getAgentServerHeaders=l,exports.getAgentServerSessionApiKey=o,exports.getAgentServerWorkingDir=s,exports.isAuthRequired=d,exports.shouldLoadPublicSkills=u;
|
|
2
2
|
//# sourceMappingURL=agent-server-config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-server-config.cjs","names":[],"sources":["../../src/api/agent-server-config.ts"],"sourcesContent":["export const AGENT_SERVER_CONFIG_STORAGE_KEY = \"openhands-agent-server-config\";\nexport const DEFAULT_WORKING_DIR = \"workspace/project\";\n\ninterface StoredAgentServerConfig {\n baseUrl?: string | null;\n sessionApiKey?: string | null;\n workingDir?: string | null;\n}\n\nexport interface AgentServerFormDefaults {\n baseUrl: string;\n sessionApiKey: string;\n}\n\nfunction readStoredConfig(): StoredAgentServerConfig {\n if (typeof window === \"undefined\") return {};\n\n try {\n const raw = window.localStorage.getItem(AGENT_SERVER_CONFIG_STORAGE_KEY);\n if (!raw) return {};\n const parsed = JSON.parse(raw) as StoredAgentServerConfig;\n return parsed ?? {};\n } catch {\n return {};\n }\n}\n\nfunction writeStoredConfig(config: StoredAgentServerConfig): void {\n if (typeof window === \"undefined\") return;\n\n const nextConfig = Object.fromEntries(\n Object.entries(config).flatMap(([key, value]) => {\n if (typeof value !== \"string\") return [];\n\n const trimmed = value.trim();\n if (!trimmed) return [];\n\n return [[key, trimmed]];\n }),\n ) as StoredAgentServerConfig;\n\n if (Object.keys(nextConfig).length === 0) {\n window.localStorage.removeItem(AGENT_SERVER_CONFIG_STORAGE_KEY);\n return;\n }\n\n window.localStorage.setItem(\n AGENT_SERVER_CONFIG_STORAGE_KEY,\n JSON.stringify(nextConfig),\n );\n}\n\nfunction trimToNull(value?: string | null): string | null {\n return value?.trim() || null;\n}\n\nfunction normalizeBaseUrl(value?: string | null): string | null {\n if (!value) return null;\n\n const trimmed = value.trim().replace(/\\/$/, \"\");\n if (!trimmed) return null;\n\n if (/^https?:\\/\\//i.test(trimmed)) {\n return trimmed;\n }\n\n if (typeof window !== \"undefined\") {\n return `${window.location.protocol}//${trimmed}`;\n }\n\n return `http://${trimmed}`;\n}\n\nfunction getConfiguredBaseUrl(): string | null {\n const storedUrl = normalizeBaseUrl(readStoredConfig().baseUrl);\n if (storedUrl) return storedUrl;\n\n return normalizeBaseUrl(import.meta.env.VITE_BACKEND_BASE_URL);\n}\n\n/**\n * Return the baked-in session API key from the Vite env or the runtime\n * injection by static-server.mjs. This represents the *server's* truth\n * and is only set in non-public (local) mode.\n */\nexport function getBakedSessionApiKey(): string | null {\n return trimToNull(import.meta.env.VITE_SESSION_API_KEY);\n}\n\nfunction getConfiguredSessionApiKey(): string | null {\n const storedKey = trimToNull(readStoredConfig().sessionApiKey);\n if (storedKey) return storedKey;\n\n return getBakedSessionApiKey();\n}\n\n/**\n * Sync the baked-in session API key into `openhands-agent-server-config`\n * localStorage when the stored value has drifted.\n *\n * In non-public (local) mode the dev scripts bake the session key into\n * `VITE_SESSION_API_KEY` (Vite dev) or inject it via `static-server.mjs`\n * (`--session-api-key`). That key represents the *server's* truth — the\n * agent-server was started with the same value as `OH_SESSION_API_KEYS_0`.\n *\n * If a user restarts the stack with a different `LOCAL_BACKEND_API_KEY`,\n * the baked-in key changes but the old value may still be persisted in\n * localStorage (written by the onboarding form, the Settings page, or a\n * previous key injection). Without this sync the stale stored key would\n * shadow the new baked key everywhere (`getConfiguredSessionApiKey()`\n * reads localStorage first), causing 401s.\n *\n * Must run **before** any call to `getConfiguredSessionApiKey()` or\n * `makeDefaultLocalBackend()` — called from `readStoredBackends()` in\n * `storage.ts` which is evaluated at module init time.\n */\nexport function syncBakedSessionApiKey(): void {\n const bakedKey = getBakedSessionApiKey();\n if (!bakedKey) return; // public mode or no key baked in\n\n const storedConfig = readStoredConfig();\n const storedKey = trimToNull(storedConfig.sessionApiKey);\n if (storedKey && storedKey !== bakedKey) {\n writeStoredConfig({ ...storedConfig, sessionApiKey: bakedKey });\n }\n}\n\nfunction shouldUseProxyOrigin(baseUrl: string): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n\n try {\n const configuredUrl = new URL(baseUrl);\n const localHosts = new Set([\"127.0.0.1\", \"localhost\", \"0.0.0.0\"]);\n const browserHostname = window.location.hostname;\n\n return (\n localHosts.has(configuredUrl.hostname) &&\n (!localHosts.has(browserHostname) ||\n configuredUrl.hostname !== browserHostname)\n );\n } catch {\n return false;\n }\n}\n\nfunction resolveAgentServerBaseUrl(baseUrl: string | null): string | null {\n if (!baseUrl) {\n return null;\n }\n\n if (shouldUseProxyOrigin(baseUrl)) {\n return window.location.origin;\n }\n\n return baseUrl;\n}\n\nexport function getAgentServerFormDefaults(): AgentServerFormDefaults {\n return {\n baseUrl: getConfiguredBaseUrl() ?? \"\",\n sessionApiKey: getConfiguredSessionApiKey() ?? \"\",\n };\n}\n\nexport function saveAgentServerConfig(config: AgentServerFormDefaults): void {\n const currentConfig = readStoredConfig();\n\n writeStoredConfig({\n ...currentConfig,\n baseUrl: normalizeBaseUrl(config.baseUrl),\n sessionApiKey: trimToNull(config.sessionApiKey),\n });\n}\n\nexport function getAgentServerBaseUrl(): string {\n const configuredUrl = resolveAgentServerBaseUrl(getConfiguredBaseUrl());\n if (configuredUrl) return configuredUrl;\n\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n\n return \"http://127.0.0.1:8000\";\n}\n\nexport function getAgentServerSessionApiKey(): string | null {\n return getConfiguredSessionApiKey();\n}\n\nexport function getAgentServerWorkingDir(): string {\n const envDir = import.meta.env.VITE_WORKING_DIR?.trim();\n if (envDir) return envDir;\n\n const storedDir = readStoredConfig().workingDir?.trim();\n if (storedDir) return storedDir;\n\n return DEFAULT_WORKING_DIR;\n}\n\nexport function buildConversationWorkingDir(conversationId: string): string {\n const base = getAgentServerWorkingDir().replace(/\\/+$/, \"\");\n const hex = conversationId.replace(/-/g, \"\");\n return `${base}/${hex}`;\n}\n\nexport function getConfiguredWorkerUrls(): string[] {\n const raw = import.meta.env.VITE_WORKER_URLS?.trim();\n if (!raw) return [];\n\n return raw\n .split(\",\")\n .map((url: string) => normalizeBaseUrl(url))\n .filter((url: string | null): url is string => Boolean(url));\n}\n\nexport function getAgentServerHeaders(): Record<string, string> {\n const sessionApiKey = getAgentServerSessionApiKey();\n return sessionApiKey ? { \"X-Session-API-Key\": sessionApiKey } : {};\n}\n\n/**\n * Returns whether public skills from the OpenHands extensions marketplace\n * (https://github.com/OpenHands/extensions) should be loaded.\n *\n * Defaults to true. Set VITE_LOAD_PUBLIC_SKILLS=false to disable.\n */\nexport function shouldLoadPublicSkills(): boolean {\n return import.meta.env.VITE_LOAD_PUBLIC_SKILLS !== \"false\";\n}\n\n/**\n * Whether the deployment requires an API key from the user (public mode).\n *\n * Checks both the Vite build-time env var (`VITE_AUTH_REQUIRED`) and the\n * runtime flag injected by static-server.mjs (`window.__AGENT_CANVAS_AUTH_REQUIRED__`).\n * The runtime flag is needed for pre-built static binaries where\n * `VITE_AUTH_REQUIRED` was not set at build time.\n */\nexport function isAuthRequired(): boolean {\n return (\n import.meta.env.VITE_AUTH_REQUIRED === \"true\" ||\n (typeof window !== \"undefined\" &&\n (window as unknown as Record<string, unknown>)\n .__AGENT_CANVAS_AUTH_REQUIRED__ === true)\n );\n}\n\n/**\n * Returns true when the server was started in public mode and the user\n * has not yet pasted an API key (nothing in localStorage, nothing baked\n * in via `VITE_SESSION_API_KEY`).\n *\n * Used by `root.tsx` to gate the app behind {@link ApiKeyEntryScreen}\n * before any network request is attempted.\n */\nexport function isAuthRequiredAndMissing(): boolean {\n if (!isAuthRequired()) return false;\n return !getConfiguredSessionApiKey();\n}\n"],"mappings":"6CAAA,IAAa,EAAkC,gCAClC,EAAsB,oBAanC,SAAS,GAA4C,CACnD,GAAI,OAAO,OAAW,IAAa,MAAO,EAAE,CAE5C,GAAI,CACF,IAAM,EAAM,OAAO,aAAa,QAAQ,EAAgC,CAGxE,OAFK,EACU,KAAK,MAAM,EACnB,EAAU,EAAE,CAFF,EAAE,MAGb,CACN,MAAO,EAAE,EAIb,SAAS,EAAkB,EAAuC,CAChE,GAAI,OAAO,OAAW,IAAa,OAEnC,IAAM,EAAa,OAAO,YACxB,OAAO,QAAQ,EAAO,CAAC,SAAS,CAAC,EAAK,KAAW,CAC/C,GAAI,OAAO,GAAU,SAAU,MAAO,EAAE,CAExC,IAAM,EAAU,EAAM,MAAM,CAG5B,OAFK,EAEE,CAAC,CAAC,EAAK,EAAQ,CAAC,CAFF,EAAE,EAGvB,CACH,CAED,GAAI,OAAO,KAAK,EAAW,CAAC,SAAW,EAAG,CACxC,OAAO,aAAa,WAAW,EAAgC,CAC/D,OAGF,OAAO,aAAa,QAClB,EACA,KAAK,UAAU,EAAW,CAC3B,CAGH,SAAS,EAAW,EAAsC,CACxD,OAAO,GAAO,MAAM,EAAI,KAG1B,SAAS,EAAiB,EAAsC,CAC9D,GAAI,CAAC,EAAO,OAAO,KAEnB,IAAM,EAAU,EAAM,MAAM,CAAC,QAAQ,MAAO,GAAG,CAW/C,OAVK,EAED,gBAAgB,KAAK,EAAQ,CACxB,EAGL,OAAO,OAAW,IACb,GAAG,OAAO,SAAS,SAAS,IAAI,IAGlC,UAAU,IAVI,KAavB,SAAS,GAAsC,CAI7C,OAHkB,EAAiB,GAAkB,CAAC,QAClD,EAEG,EAAA,IAAA,GAAuD,CAQhE,SAAgB,GAAuC,CACrD,OAAO,EAAA,IAAA,GAAgD,CAGzD,SAAS,GAA4C,CAInD,OAHkB,EAAW,GAAkB,CAAC,cAC5C,EAEG,GAAuB,CAuBhC,SAAgB,GAA+B,CAC7C,IAAM,EAAW,GAAuB,CACxC,GAAI,CAAC,EAAU,OAEf,IAAM,EAAe,GAAkB,CACjC,EAAY,EAAW,EAAa,cAAc,CACpD,GAAa,IAAc,GAC7B,EAAkB,CAAE,GAAG,EAAc,cAAe,EAAU,CAAC,CAInE,SAAS,EAAqB,EAA0B,CACtD,GAAI,OAAO,OAAW,IACpB,MAAO,GAGT,GAAI,CACF,IAAM,EAAgB,IAAI,IAAI,EAAQ,CAChC,EAAa,IAAI,IAAI,CAAC,YAAa,YAAa,UAAU,CAAC,CAC3D,EAAkB,OAAO,SAAS,SAExC,OACE,EAAW,IAAI,EAAc,SAAS,GACrC,CAAC,EAAW,IAAI,EAAgB,EAC/B,EAAc,WAAa,QAEzB,CACN,MAAO,IAIX,SAAS,EAA0B,EAAuC,CASxE,OARK,EAID,EAAqB,EAAQ,CACxB,OAAO,SAAS,OAGlB,EAPE,KA2BX,SAAgB,GAAgC,CAQ9C,OAPsB,EAA0B,GAAsB,CAClE,GAEA,OAAO,OAAW,IACb,OAAO,SAAS,OAGlB,yBAGT,SAAgB,GAA6C,CAC3D,OAAO,GAA4B,CAGrC,SAAgB,GAAmC,CAOjD,OANM,IAAA,KAA2C,MAAM,EAGrC,GAAkB,CAAC,YAAY,MAAM,EAGhD,EAGT,SAAgB,EAA4B,EAAgC,CAG1E,MAAO,GAFM,GAA0B,CAAC,QAAQ,OAAQ,GAE9C,CAAK,GADH,EAAe,QAAQ,KAAM,GACvB,GAapB,SAAgB,GAAgD,CAC9D,IAAM,EAAgB,GAA6B,CACnD,OAAO,EAAgB,CAAE,oBAAqB,EAAe,CAAG,EAAE,CASpE,SAAgB,GAAkC,CAChD,MAAO,GAWT,SAAgB,GAA0B,CACxC,OAEG,OAAO,OAAW,KAChB,OACE,iCAAmC"}
|
|
1
|
+
{"version":3,"file":"agent-server-config.cjs","names":[],"sources":["../../src/api/agent-server-config.ts"],"sourcesContent":["export const DEFAULT_WORKING_DIR = \"workspace/project\";\n\nexport interface AgentServerFormDefaults {\n baseUrl: string;\n sessionApiKey: string;\n}\n\nfunction trimToNull(value?: string | null): string | null {\n return value?.trim() || null;\n}\n\nfunction normalizeBaseUrl(value?: string | null): string | null {\n if (!value) return null;\n\n const trimmed = value.trim().replace(/\\/$/, \"\");\n if (!trimmed) return null;\n\n if (/^https?:\\/\\//i.test(trimmed)) {\n return trimmed;\n }\n\n if (typeof window !== \"undefined\") {\n return `${window.location.protocol}//${trimmed}`;\n }\n\n return `http://${trimmed}`;\n}\n\nfunction getConfiguredBaseUrl(): string | null {\n return normalizeBaseUrl(import.meta.env.VITE_BACKEND_BASE_URL);\n}\n\nexport function getBakedSessionApiKey(): string | null {\n return trimToNull(import.meta.env.VITE_SESSION_API_KEY);\n}\n\nexport function getAgentServerFormDefaults(): AgentServerFormDefaults {\n return {\n baseUrl: getAgentServerBaseUrl() ?? \"\",\n sessionApiKey: getAgentServerSessionApiKey() ?? \"\",\n };\n}\n\nexport function getAgentServerBaseUrl(): string | null {\n const configuredUrl = getConfiguredBaseUrl();\n if (configuredUrl) return configuredUrl;\n\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n\n return null;\n}\n\nexport function getAgentServerSessionApiKey(): string | null {\n return getBakedSessionApiKey();\n}\n\nexport function getAgentServerWorkingDir(): string {\n const envDir = import.meta.env.VITE_WORKING_DIR?.trim();\n if (envDir) return envDir;\n\n return DEFAULT_WORKING_DIR;\n}\n\nexport function buildConversationWorkingDir(conversationId: string): string {\n const base = getAgentServerWorkingDir().replace(/\\/+$/, \"\");\n const hex = conversationId.replace(/-/g, \"\");\n return `${base}/${hex}`;\n}\n\nexport function getConfiguredWorkerUrls(): string[] {\n const raw = import.meta.env.VITE_WORKER_URLS?.trim();\n if (!raw) return [];\n\n return raw\n .split(\",\")\n .map((url: string) => normalizeBaseUrl(url))\n .filter((url: string | null): url is string => Boolean(url));\n}\n\nexport function getAgentServerHeaders(): Record<string, string> {\n const sessionApiKey = getAgentServerSessionApiKey();\n return sessionApiKey ? { \"X-Session-API-Key\": sessionApiKey } : {};\n}\n\nexport function shouldLoadPublicSkills(): boolean {\n return import.meta.env.VITE_LOAD_PUBLIC_SKILLS !== \"false\";\n}\n\nexport function isAuthRequired(): boolean {\n return (\n import.meta.env.VITE_AUTH_REQUIRED === \"true\" ||\n (typeof window !== \"undefined\" &&\n (window as unknown as Record<string, unknown>)\n .__AGENT_CANVAS_AUTH_REQUIRED__ === true)\n );\n}\n\nexport function isAuthRequiredAndMissing(): boolean {\n if (!isAuthRequired()) return false;\n return !getAgentServerSessionApiKey();\n}\n"],"mappings":"6CAAA,IAAa,EAAsB,oBAOnC,SAAS,EAAW,EAAsC,CACxD,OAAO,GAAO,MAAM,EAAI,KAG1B,SAAS,EAAiB,EAAsC,CAC9D,GAAI,CAAC,EAAO,OAAO,KAEnB,IAAM,EAAU,EAAM,MAAM,CAAC,QAAQ,MAAO,GAAG,CAW/C,OAVK,EAED,gBAAgB,KAAK,EAAQ,CACxB,EAGL,OAAO,OAAW,IACb,GAAG,OAAO,SAAS,SAAS,IAAI,IAGlC,UAAU,IAVI,KAavB,SAAS,GAAsC,CAC7C,OAAO,EAAA,IAAA,GAAuD,CAGhE,SAAgB,GAAuC,CACrD,OAAO,EAAA,IAAA,GAAgD,CAUzD,SAAgB,GAAuC,CAQrD,OAPsB,GAClB,GAEA,OAAO,OAAW,IACb,OAAO,SAAS,OAGlB,MAGT,SAAgB,GAA6C,CAC3D,OAAO,GAAuB,CAGhC,SAAgB,GAAmC,CAIjD,OAHM,IAAA,KAA2C,MAAM,EAGhD,EAGT,SAAgB,EAA4B,EAAgC,CAG1E,MAAO,GAFM,GAA0B,CAAC,QAAQ,OAAQ,GAE9C,CAAK,GADH,EAAe,QAAQ,KAAM,GACvB,GAapB,SAAgB,GAAgD,CAC9D,IAAM,EAAgB,GAA6B,CACnD,OAAO,EAAgB,CAAE,oBAAqB,EAAe,CAAG,EAAE,CAGpE,SAAgB,GAAkC,CAChD,MAAO,GAGT,SAAgB,GAA0B,CACxC,OAEG,OAAO,OAAW,KAChB,OACE,iCAAmC"}
|
|
@@ -1,66 +1,16 @@
|
|
|
1
|
-
export declare const AGENT_SERVER_CONFIG_STORAGE_KEY = "openhands-agent-server-config";
|
|
2
1
|
export declare const DEFAULT_WORKING_DIR = "workspace/project";
|
|
3
2
|
export interface AgentServerFormDefaults {
|
|
4
3
|
baseUrl: string;
|
|
5
4
|
sessionApiKey: string;
|
|
6
5
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Return the baked-in session API key from the Vite env or the runtime
|
|
9
|
-
* injection by static-server.mjs. This represents the *server's* truth
|
|
10
|
-
* and is only set in non-public (local) mode.
|
|
11
|
-
*/
|
|
12
6
|
export declare function getBakedSessionApiKey(): string | null;
|
|
13
|
-
/**
|
|
14
|
-
* Sync the baked-in session API key into `openhands-agent-server-config`
|
|
15
|
-
* localStorage when the stored value has drifted.
|
|
16
|
-
*
|
|
17
|
-
* In non-public (local) mode the dev scripts bake the session key into
|
|
18
|
-
* `VITE_SESSION_API_KEY` (Vite dev) or inject it via `static-server.mjs`
|
|
19
|
-
* (`--session-api-key`). That key represents the *server's* truth — the
|
|
20
|
-
* agent-server was started with the same value as `OH_SESSION_API_KEYS_0`.
|
|
21
|
-
*
|
|
22
|
-
* If a user restarts the stack with a different `LOCAL_BACKEND_API_KEY`,
|
|
23
|
-
* the baked-in key changes but the old value may still be persisted in
|
|
24
|
-
* localStorage (written by the onboarding form, the Settings page, or a
|
|
25
|
-
* previous key injection). Without this sync the stale stored key would
|
|
26
|
-
* shadow the new baked key everywhere (`getConfiguredSessionApiKey()`
|
|
27
|
-
* reads localStorage first), causing 401s.
|
|
28
|
-
*
|
|
29
|
-
* Must run **before** any call to `getConfiguredSessionApiKey()` or
|
|
30
|
-
* `makeDefaultLocalBackend()` — called from `readStoredBackends()` in
|
|
31
|
-
* `storage.ts` which is evaluated at module init time.
|
|
32
|
-
*/
|
|
33
|
-
export declare function syncBakedSessionApiKey(): void;
|
|
34
7
|
export declare function getAgentServerFormDefaults(): AgentServerFormDefaults;
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function getAgentServerBaseUrl(): string;
|
|
8
|
+
export declare function getAgentServerBaseUrl(): string | null;
|
|
37
9
|
export declare function getAgentServerSessionApiKey(): string | null;
|
|
38
10
|
export declare function getAgentServerWorkingDir(): string;
|
|
39
11
|
export declare function buildConversationWorkingDir(conversationId: string): string;
|
|
40
12
|
export declare function getConfiguredWorkerUrls(): string[];
|
|
41
13
|
export declare function getAgentServerHeaders(): Record<string, string>;
|
|
42
|
-
/**
|
|
43
|
-
* Returns whether public skills from the OpenHands extensions marketplace
|
|
44
|
-
* (https://github.com/OpenHands/extensions) should be loaded.
|
|
45
|
-
*
|
|
46
|
-
* Defaults to true. Set VITE_LOAD_PUBLIC_SKILLS=false to disable.
|
|
47
|
-
*/
|
|
48
14
|
export declare function shouldLoadPublicSkills(): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Whether the deployment requires an API key from the user (public mode).
|
|
51
|
-
*
|
|
52
|
-
* Checks both the Vite build-time env var (`VITE_AUTH_REQUIRED`) and the
|
|
53
|
-
* runtime flag injected by static-server.mjs (`window.__AGENT_CANVAS_AUTH_REQUIRED__`).
|
|
54
|
-
* The runtime flag is needed for pre-built static binaries where
|
|
55
|
-
* `VITE_AUTH_REQUIRED` was not set at build time.
|
|
56
|
-
*/
|
|
57
15
|
export declare function isAuthRequired(): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Returns true when the server was started in public mode and the user
|
|
60
|
-
* has not yet pasted an API key (nothing in localStorage, nothing baked
|
|
61
|
-
* in via `VITE_SESSION_API_KEY`).
|
|
62
|
-
*
|
|
63
|
-
* Used by `root.tsx` to gate the app behind {@link ApiKeyEntryScreen}
|
|
64
|
-
* before any network request is attempted.
|
|
65
|
-
*/
|
|
66
16
|
export declare function isAuthRequiredAndMissing(): boolean;
|
|
@@ -1,92 +1,42 @@
|
|
|
1
1
|
//#region src/api/agent-server-config.ts
|
|
2
|
-
var e = "
|
|
3
|
-
function
|
|
4
|
-
if (typeof window > "u") return {};
|
|
5
|
-
try {
|
|
6
|
-
let t = window.localStorage.getItem(e);
|
|
7
|
-
return t ? JSON.parse(t) ?? {} : {};
|
|
8
|
-
} catch {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function r(t) {
|
|
13
|
-
if (typeof window > "u") return;
|
|
14
|
-
let n = Object.fromEntries(Object.entries(t).flatMap(([e, t]) => {
|
|
15
|
-
if (typeof t != "string") return [];
|
|
16
|
-
let n = t.trim();
|
|
17
|
-
return n ? [[e, n]] : [];
|
|
18
|
-
}));
|
|
19
|
-
if (Object.keys(n).length === 0) {
|
|
20
|
-
window.localStorage.removeItem(e);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
window.localStorage.setItem(e, JSON.stringify(n));
|
|
24
|
-
}
|
|
25
|
-
function i(e) {
|
|
2
|
+
var e = "workspace/project";
|
|
3
|
+
function t(e) {
|
|
26
4
|
return e?.trim() || null;
|
|
27
5
|
}
|
|
28
|
-
function
|
|
6
|
+
function n(e) {
|
|
29
7
|
if (!e) return null;
|
|
30
8
|
let t = e.trim().replace(/\/$/, "");
|
|
31
9
|
return t ? /^https?:\/\//i.test(t) ? t : typeof window < "u" ? `${window.location.protocol}//${t}` : `http://${t}` : null;
|
|
32
10
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
function s() {
|
|
37
|
-
return i(void 0);
|
|
38
|
-
}
|
|
39
|
-
function c() {
|
|
40
|
-
return i(n().sessionApiKey) || s();
|
|
11
|
+
function r() {
|
|
12
|
+
return n(void 0);
|
|
41
13
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
if (!e) return;
|
|
45
|
-
let t = n(), a = i(t.sessionApiKey);
|
|
46
|
-
a && a !== e && r({
|
|
47
|
-
...t,
|
|
48
|
-
sessionApiKey: e
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function u(e) {
|
|
52
|
-
if (typeof window > "u") return !1;
|
|
53
|
-
try {
|
|
54
|
-
let t = new URL(e), n = new Set([
|
|
55
|
-
"127.0.0.1",
|
|
56
|
-
"localhost",
|
|
57
|
-
"0.0.0.0"
|
|
58
|
-
]), r = window.location.hostname;
|
|
59
|
-
return n.has(t.hostname) && (!n.has(r) || t.hostname !== r);
|
|
60
|
-
} catch {
|
|
61
|
-
return !1;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function d(e) {
|
|
65
|
-
return e ? u(e) ? window.location.origin : e : null;
|
|
14
|
+
function i() {
|
|
15
|
+
return t(void 0);
|
|
66
16
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
17
|
+
function a() {
|
|
18
|
+
return r() || (typeof window < "u" ? window.location.origin : null);
|
|
69
19
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
20
|
+
function o() {
|
|
21
|
+
return i();
|
|
72
22
|
}
|
|
73
|
-
function
|
|
74
|
-
return (void 0)?.trim() ||
|
|
23
|
+
function s() {
|
|
24
|
+
return (void 0)?.trim() || e;
|
|
75
25
|
}
|
|
76
|
-
function
|
|
77
|
-
return `${
|
|
26
|
+
function c(e) {
|
|
27
|
+
return `${s().replace(/\/+$/, "")}/${e.replace(/-/g, "")}`;
|
|
78
28
|
}
|
|
79
|
-
function
|
|
80
|
-
let e =
|
|
29
|
+
function l() {
|
|
30
|
+
let e = o();
|
|
81
31
|
return e ? { "X-Session-API-Key": e } : {};
|
|
82
32
|
}
|
|
83
|
-
function
|
|
33
|
+
function u() {
|
|
84
34
|
return !0;
|
|
85
35
|
}
|
|
86
|
-
function
|
|
36
|
+
function d() {
|
|
87
37
|
return typeof window < "u" && window.__AGENT_CANVAS_AUTH_REQUIRED__ === !0;
|
|
88
38
|
}
|
|
89
39
|
//#endregion
|
|
90
|
-
export {
|
|
40
|
+
export { e as DEFAULT_WORKING_DIR, c as buildConversationWorkingDir, a as getAgentServerBaseUrl, l as getAgentServerHeaders, o as getAgentServerSessionApiKey, s as getAgentServerWorkingDir, d as isAuthRequired, u as shouldLoadPublicSkills };
|
|
91
41
|
|
|
92
42
|
//# sourceMappingURL=agent-server-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-server-config.js","names":[],"sources":["../../src/api/agent-server-config.ts"],"sourcesContent":["export const AGENT_SERVER_CONFIG_STORAGE_KEY = \"openhands-agent-server-config\";\nexport const DEFAULT_WORKING_DIR = \"workspace/project\";\n\ninterface StoredAgentServerConfig {\n baseUrl?: string | null;\n sessionApiKey?: string | null;\n workingDir?: string | null;\n}\n\nexport interface AgentServerFormDefaults {\n baseUrl: string;\n sessionApiKey: string;\n}\n\nfunction readStoredConfig(): StoredAgentServerConfig {\n if (typeof window === \"undefined\") return {};\n\n try {\n const raw = window.localStorage.getItem(AGENT_SERVER_CONFIG_STORAGE_KEY);\n if (!raw) return {};\n const parsed = JSON.parse(raw) as StoredAgentServerConfig;\n return parsed ?? {};\n } catch {\n return {};\n }\n}\n\nfunction writeStoredConfig(config: StoredAgentServerConfig): void {\n if (typeof window === \"undefined\") return;\n\n const nextConfig = Object.fromEntries(\n Object.entries(config).flatMap(([key, value]) => {\n if (typeof value !== \"string\") return [];\n\n const trimmed = value.trim();\n if (!trimmed) return [];\n\n return [[key, trimmed]];\n }),\n ) as StoredAgentServerConfig;\n\n if (Object.keys(nextConfig).length === 0) {\n window.localStorage.removeItem(AGENT_SERVER_CONFIG_STORAGE_KEY);\n return;\n }\n\n window.localStorage.setItem(\n AGENT_SERVER_CONFIG_STORAGE_KEY,\n JSON.stringify(nextConfig),\n );\n}\n\nfunction trimToNull(value?: string | null): string | null {\n return value?.trim() || null;\n}\n\nfunction normalizeBaseUrl(value?: string | null): string | null {\n if (!value) return null;\n\n const trimmed = value.trim().replace(/\\/$/, \"\");\n if (!trimmed) return null;\n\n if (/^https?:\\/\\//i.test(trimmed)) {\n return trimmed;\n }\n\n if (typeof window !== \"undefined\") {\n return `${window.location.protocol}//${trimmed}`;\n }\n\n return `http://${trimmed}`;\n}\n\nfunction getConfiguredBaseUrl(): string | null {\n const storedUrl = normalizeBaseUrl(readStoredConfig().baseUrl);\n if (storedUrl) return storedUrl;\n\n return normalizeBaseUrl(import.meta.env.VITE_BACKEND_BASE_URL);\n}\n\n/**\n * Return the baked-in session API key from the Vite env or the runtime\n * injection by static-server.mjs. This represents the *server's* truth\n * and is only set in non-public (local) mode.\n */\nexport function getBakedSessionApiKey(): string | null {\n return trimToNull(import.meta.env.VITE_SESSION_API_KEY);\n}\n\nfunction getConfiguredSessionApiKey(): string | null {\n const storedKey = trimToNull(readStoredConfig().sessionApiKey);\n if (storedKey) return storedKey;\n\n return getBakedSessionApiKey();\n}\n\n/**\n * Sync the baked-in session API key into `openhands-agent-server-config`\n * localStorage when the stored value has drifted.\n *\n * In non-public (local) mode the dev scripts bake the session key into\n * `VITE_SESSION_API_KEY` (Vite dev) or inject it via `static-server.mjs`\n * (`--session-api-key`). That key represents the *server's* truth — the\n * agent-server was started with the same value as `OH_SESSION_API_KEYS_0`.\n *\n * If a user restarts the stack with a different `LOCAL_BACKEND_API_KEY`,\n * the baked-in key changes but the old value may still be persisted in\n * localStorage (written by the onboarding form, the Settings page, or a\n * previous key injection). Without this sync the stale stored key would\n * shadow the new baked key everywhere (`getConfiguredSessionApiKey()`\n * reads localStorage first), causing 401s.\n *\n * Must run **before** any call to `getConfiguredSessionApiKey()` or\n * `makeDefaultLocalBackend()` — called from `readStoredBackends()` in\n * `storage.ts` which is evaluated at module init time.\n */\nexport function syncBakedSessionApiKey(): void {\n const bakedKey = getBakedSessionApiKey();\n if (!bakedKey) return; // public mode or no key baked in\n\n const storedConfig = readStoredConfig();\n const storedKey = trimToNull(storedConfig.sessionApiKey);\n if (storedKey && storedKey !== bakedKey) {\n writeStoredConfig({ ...storedConfig, sessionApiKey: bakedKey });\n }\n}\n\nfunction shouldUseProxyOrigin(baseUrl: string): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n\n try {\n const configuredUrl = new URL(baseUrl);\n const localHosts = new Set([\"127.0.0.1\", \"localhost\", \"0.0.0.0\"]);\n const browserHostname = window.location.hostname;\n\n return (\n localHosts.has(configuredUrl.hostname) &&\n (!localHosts.has(browserHostname) ||\n configuredUrl.hostname !== browserHostname)\n );\n } catch {\n return false;\n }\n}\n\nfunction resolveAgentServerBaseUrl(baseUrl: string | null): string | null {\n if (!baseUrl) {\n return null;\n }\n\n if (shouldUseProxyOrigin(baseUrl)) {\n return window.location.origin;\n }\n\n return baseUrl;\n}\n\nexport function getAgentServerFormDefaults(): AgentServerFormDefaults {\n return {\n baseUrl: getConfiguredBaseUrl() ?? \"\",\n sessionApiKey: getConfiguredSessionApiKey() ?? \"\",\n };\n}\n\nexport function saveAgentServerConfig(config: AgentServerFormDefaults): void {\n const currentConfig = readStoredConfig();\n\n writeStoredConfig({\n ...currentConfig,\n baseUrl: normalizeBaseUrl(config.baseUrl),\n sessionApiKey: trimToNull(config.sessionApiKey),\n });\n}\n\nexport function getAgentServerBaseUrl(): string {\n const configuredUrl = resolveAgentServerBaseUrl(getConfiguredBaseUrl());\n if (configuredUrl) return configuredUrl;\n\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n\n return \"http://127.0.0.1:8000\";\n}\n\nexport function getAgentServerSessionApiKey(): string | null {\n return getConfiguredSessionApiKey();\n}\n\nexport function getAgentServerWorkingDir(): string {\n const envDir = import.meta.env.VITE_WORKING_DIR?.trim();\n if (envDir) return envDir;\n\n const storedDir = readStoredConfig().workingDir?.trim();\n if (storedDir) return storedDir;\n\n return DEFAULT_WORKING_DIR;\n}\n\nexport function buildConversationWorkingDir(conversationId: string): string {\n const base = getAgentServerWorkingDir().replace(/\\/+$/, \"\");\n const hex = conversationId.replace(/-/g, \"\");\n return `${base}/${hex}`;\n}\n\nexport function getConfiguredWorkerUrls(): string[] {\n const raw = import.meta.env.VITE_WORKER_URLS?.trim();\n if (!raw) return [];\n\n return raw\n .split(\",\")\n .map((url: string) => normalizeBaseUrl(url))\n .filter((url: string | null): url is string => Boolean(url));\n}\n\nexport function getAgentServerHeaders(): Record<string, string> {\n const sessionApiKey = getAgentServerSessionApiKey();\n return sessionApiKey ? { \"X-Session-API-Key\": sessionApiKey } : {};\n}\n\n/**\n * Returns whether public skills from the OpenHands extensions marketplace\n * (https://github.com/OpenHands/extensions) should be loaded.\n *\n * Defaults to true. Set VITE_LOAD_PUBLIC_SKILLS=false to disable.\n */\nexport function shouldLoadPublicSkills(): boolean {\n return import.meta.env.VITE_LOAD_PUBLIC_SKILLS !== \"false\";\n}\n\n/**\n * Whether the deployment requires an API key from the user (public mode).\n *\n * Checks both the Vite build-time env var (`VITE_AUTH_REQUIRED`) and the\n * runtime flag injected by static-server.mjs (`window.__AGENT_CANVAS_AUTH_REQUIRED__`).\n * The runtime flag is needed for pre-built static binaries where\n * `VITE_AUTH_REQUIRED` was not set at build time.\n */\nexport function isAuthRequired(): boolean {\n return (\n import.meta.env.VITE_AUTH_REQUIRED === \"true\" ||\n (typeof window !== \"undefined\" &&\n (window as unknown as Record<string, unknown>)\n .__AGENT_CANVAS_AUTH_REQUIRED__ === true)\n );\n}\n\n/**\n * Returns true when the server was started in public mode and the user\n * has not yet pasted an API key (nothing in localStorage, nothing baked\n * in via `VITE_SESSION_API_KEY`).\n *\n * Used by `root.tsx` to gate the app behind {@link ApiKeyEntryScreen}\n * before any network request is attempted.\n */\nexport function isAuthRequiredAndMissing(): boolean {\n if (!isAuthRequired()) return false;\n return !getConfiguredSessionApiKey();\n}\n"],"mappings":";AAAA,IAAa,IAAkC,iCAClC,IAAsB;AAanC,SAAS,IAA4C;AACnD,KAAI,OAAO,SAAW,IAAa,QAAO,EAAE;AAE5C,KAAI;EACF,IAAM,IAAM,OAAO,aAAa,QAAQ,EAAgC;AAGxE,SAFK,IACU,KAAK,MAAM,EACnB,IAAU,EAAE,GAFF,EAAE;SAGb;AACN,SAAO,EAAE;;;AAIb,SAAS,EAAkB,GAAuC;AAChE,KAAI,OAAO,SAAW,IAAa;CAEnC,IAAM,IAAa,OAAO,YACxB,OAAO,QAAQ,EAAO,CAAC,SAAS,CAAC,GAAK,OAAW;AAC/C,MAAI,OAAO,KAAU,SAAU,QAAO,EAAE;EAExC,IAAM,IAAU,EAAM,MAAM;AAG5B,SAFK,IAEE,CAAC,CAAC,GAAK,EAAQ,CAAC,GAFF,EAAE;GAGvB,CACH;AAED,KAAI,OAAO,KAAK,EAAW,CAAC,WAAW,GAAG;AACxC,SAAO,aAAa,WAAW,EAAgC;AAC/D;;AAGF,QAAO,aAAa,QAClB,GACA,KAAK,UAAU,EAAW,CAC3B;;AAGH,SAAS,EAAW,GAAsC;AACxD,QAAO,GAAO,MAAM,IAAI;;AAG1B,SAAS,EAAiB,GAAsC;AAC9D,KAAI,CAAC,EAAO,QAAO;CAEnB,IAAM,IAAU,EAAM,MAAM,CAAC,QAAQ,OAAO,GAAG;AAW/C,QAVK,IAED,gBAAgB,KAAK,EAAQ,GACxB,IAGL,OAAO,SAAW,MACb,GAAG,OAAO,SAAS,SAAS,IAAI,MAGlC,UAAU,MAVI;;AAavB,SAAS,IAAsC;AAI7C,QAHkB,EAAiB,GAAkB,CAAC,QAClD,IAEG,EAAA,KAAA,EAAuD;;AAQhE,SAAgB,IAAuC;AACrD,QAAO,EAAA,KAAA,EAAgD;;AAGzD,SAAS,IAA4C;AAInD,QAHkB,EAAW,GAAkB,CAAC,cAC5C,IAEG,GAAuB;;AAuBhC,SAAgB,IAA+B;CAC7C,IAAM,IAAW,GAAuB;AACxC,KAAI,CAAC,EAAU;CAEf,IAAM,IAAe,GAAkB,EACjC,IAAY,EAAW,EAAa,cAAc;AACxD,CAAI,KAAa,MAAc,KAC7B,EAAkB;EAAE,GAAG;EAAc,eAAe;EAAU,CAAC;;AAInE,SAAS,EAAqB,GAA0B;AACtD,KAAI,OAAO,SAAW,IACpB,QAAO;AAGT,KAAI;EACF,IAAM,IAAgB,IAAI,IAAI,EAAQ,EAChC,IAAa,IAAI,IAAI;GAAC;GAAa;GAAa;GAAU,CAAC,EAC3D,IAAkB,OAAO,SAAS;AAExC,SACE,EAAW,IAAI,EAAc,SAAS,KACrC,CAAC,EAAW,IAAI,EAAgB,IAC/B,EAAc,aAAa;SAEzB;AACN,SAAO;;;AAIX,SAAS,EAA0B,GAAuC;AASxE,QARK,IAID,EAAqB,EAAQ,GACxB,OAAO,SAAS,SAGlB,IAPE;;AA2BX,SAAgB,IAAgC;AAQ9C,QAPsB,EAA0B,GAAsB,CAClE,KAEA,OAAO,SAAW,MACb,OAAO,SAAS,SAGlB;;AAGT,SAAgB,IAA6C;AAC3D,QAAO,GAA4B;;AAGrC,SAAgB,IAAmC;AAOjD,SANM,KAAA,IAA2C,MAAM,IAGrC,GAAkB,CAAC,YAAY,MAAM,IAGhD;;AAGT,SAAgB,EAA4B,GAAgC;AAG1E,QAAO,GAFM,GAA0B,CAAC,QAAQ,QAAQ,GAE9C,CAAK,GADH,EAAe,QAAQ,MAAM,GACvB;;AAapB,SAAgB,IAAgD;CAC9D,IAAM,IAAgB,GAA6B;AACnD,QAAO,IAAgB,EAAE,qBAAqB,GAAe,GAAG,EAAE;;AASpE,SAAgB,IAAkC;AAChD,QAAO;;AAWT,SAAgB,IAA0B;AACxC,QAEG,OAAO,SAAW,OAChB,OACE,mCAAmC"}
|
|
1
|
+
{"version":3,"file":"agent-server-config.js","names":[],"sources":["../../src/api/agent-server-config.ts"],"sourcesContent":["export const DEFAULT_WORKING_DIR = \"workspace/project\";\n\nexport interface AgentServerFormDefaults {\n baseUrl: string;\n sessionApiKey: string;\n}\n\nfunction trimToNull(value?: string | null): string | null {\n return value?.trim() || null;\n}\n\nfunction normalizeBaseUrl(value?: string | null): string | null {\n if (!value) return null;\n\n const trimmed = value.trim().replace(/\\/$/, \"\");\n if (!trimmed) return null;\n\n if (/^https?:\\/\\//i.test(trimmed)) {\n return trimmed;\n }\n\n if (typeof window !== \"undefined\") {\n return `${window.location.protocol}//${trimmed}`;\n }\n\n return `http://${trimmed}`;\n}\n\nfunction getConfiguredBaseUrl(): string | null {\n return normalizeBaseUrl(import.meta.env.VITE_BACKEND_BASE_URL);\n}\n\nexport function getBakedSessionApiKey(): string | null {\n return trimToNull(import.meta.env.VITE_SESSION_API_KEY);\n}\n\nexport function getAgentServerFormDefaults(): AgentServerFormDefaults {\n return {\n baseUrl: getAgentServerBaseUrl() ?? \"\",\n sessionApiKey: getAgentServerSessionApiKey() ?? \"\",\n };\n}\n\nexport function getAgentServerBaseUrl(): string | null {\n const configuredUrl = getConfiguredBaseUrl();\n if (configuredUrl) return configuredUrl;\n\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n\n return null;\n}\n\nexport function getAgentServerSessionApiKey(): string | null {\n return getBakedSessionApiKey();\n}\n\nexport function getAgentServerWorkingDir(): string {\n const envDir = import.meta.env.VITE_WORKING_DIR?.trim();\n if (envDir) return envDir;\n\n return DEFAULT_WORKING_DIR;\n}\n\nexport function buildConversationWorkingDir(conversationId: string): string {\n const base = getAgentServerWorkingDir().replace(/\\/+$/, \"\");\n const hex = conversationId.replace(/-/g, \"\");\n return `${base}/${hex}`;\n}\n\nexport function getConfiguredWorkerUrls(): string[] {\n const raw = import.meta.env.VITE_WORKER_URLS?.trim();\n if (!raw) return [];\n\n return raw\n .split(\",\")\n .map((url: string) => normalizeBaseUrl(url))\n .filter((url: string | null): url is string => Boolean(url));\n}\n\nexport function getAgentServerHeaders(): Record<string, string> {\n const sessionApiKey = getAgentServerSessionApiKey();\n return sessionApiKey ? { \"X-Session-API-Key\": sessionApiKey } : {};\n}\n\nexport function shouldLoadPublicSkills(): boolean {\n return import.meta.env.VITE_LOAD_PUBLIC_SKILLS !== \"false\";\n}\n\nexport function isAuthRequired(): boolean {\n return (\n import.meta.env.VITE_AUTH_REQUIRED === \"true\" ||\n (typeof window !== \"undefined\" &&\n (window as unknown as Record<string, unknown>)\n .__AGENT_CANVAS_AUTH_REQUIRED__ === true)\n );\n}\n\nexport function isAuthRequiredAndMissing(): boolean {\n if (!isAuthRequired()) return false;\n return !getAgentServerSessionApiKey();\n}\n"],"mappings":";AAAA,IAAa,IAAsB;AAOnC,SAAS,EAAW,GAAsC;AACxD,QAAO,GAAO,MAAM,IAAI;;AAG1B,SAAS,EAAiB,GAAsC;AAC9D,KAAI,CAAC,EAAO,QAAO;CAEnB,IAAM,IAAU,EAAM,MAAM,CAAC,QAAQ,OAAO,GAAG;AAW/C,QAVK,IAED,gBAAgB,KAAK,EAAQ,GACxB,IAGL,OAAO,SAAW,MACb,GAAG,OAAO,SAAS,SAAS,IAAI,MAGlC,UAAU,MAVI;;AAavB,SAAS,IAAsC;AAC7C,QAAO,EAAA,KAAA,EAAuD;;AAGhE,SAAgB,IAAuC;AACrD,QAAO,EAAA,KAAA,EAAgD;;AAUzD,SAAgB,IAAuC;AAQrD,QAPsB,GAClB,KAEA,OAAO,SAAW,MACb,OAAO,SAAS,SAGlB;;AAGT,SAAgB,IAA6C;AAC3D,QAAO,GAAuB;;AAGhC,SAAgB,IAAmC;AAIjD,SAHM,KAAA,IAA2C,MAAM,IAGhD;;AAGT,SAAgB,EAA4B,GAAgC;AAG1E,QAAO,GAFM,GAA0B,CAAC,QAAQ,QAAQ,GAE9C,CAAK,GADH,EAAe,QAAQ,MAAM,GACvB;;AAapB,SAAgB,IAAgD;CAC9D,IAAM,IAAgB,GAA6B;AACnD,QAAO,IAAgB,EAAE,qBAAqB,GAAe,GAAG,EAAE;;AAGpE,SAAgB,IAAkC;AAChD,QAAO;;AAGT,SAAgB,IAA0B;AACxC,QAEG,OAAO,SAAW,OAChB,OACE,mCAAmC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./storage.cjs`);var t=`no-backend`,n={id:t,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function r(e){return e.id===t}function i(e){return e[0]??n}function a(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=i(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}var o=a(e.readStoredBackends(),e.readStoredActiveBackend()),s=new Set;function c(){s.forEach(e=>e())}function l(){return o.active}function u(){let e=o.active.backend;return e.kind===`local`&&!r(e)?e:null}function d(){return o.backends}function f(){return o.selection}function p(){return o}function m(t){e.writeStoredActiveBackend(t),o=a(o.backends,t),c()}function h(t){e.writeStoredBackends(t);let n=o.selection;n&&!t.some(e=>e.id===n.backendId)&&(n=null,e.writeStoredActiveBackend(null)),o=a(t,n),c()}function g(e){return s.add(e),()=>{s.delete(e)}}exports.NO_BACKEND=n,exports.getActiveBackend=l,exports.getActiveSelection=f,exports.getEffectiveLocalBackend=u,exports.getRegisteredBackends=d,exports.getSnapshot=p,exports.isNoBackend=r,exports.setActiveSelection=m,exports.setRegisteredBackends=h,exports.subscribeActiveBackend=g;
|
|
2
2
|
//# sourceMappingURL=active-store.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-store.cjs","names":[],"sources":["../../../src/api/backend-registry/active-store.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"active-store.cjs","names":[],"sources":["../../../src/api/backend-registry/active-store.ts"],"sourcesContent":["import {\n readStoredActiveBackend,\n readStoredBackends,\n writeStoredActiveBackend,\n writeStoredBackends,\n} from \"./storage\";\nimport type { Backend, BackendSelection, ResolvedActiveBackend } from \"./types\";\n\ntype Listener = () => void;\n\ninterface Snapshot {\n backends: Backend[];\n selection: BackendSelection | null;\n active: ResolvedActiveBackend;\n}\n\nexport const NO_BACKEND_ID = \"no-backend\";\n\n/**\n * Sentinel returned when the registry has no usable backend. It must never be\n * persisted, and callers must check `isNoBackend()` before interpreting fields\n * like `kind`, `host`, or `apiKey`.\n */\nexport const NO_BACKEND: Backend = {\n id: NO_BACKEND_ID,\n name: \"No Backend Available\",\n host: \"\",\n apiKey: \"\",\n kind: \"local\",\n};\n\nexport function isNoBackend(backend: Backend): boolean {\n return backend.id === NO_BACKEND_ID;\n}\n\nfunction pickFallbackBackend(backends: Backend[]): Backend {\n return backends[0] ?? NO_BACKEND;\n}\n\nfunction computeSnapshot(\n backends: Backend[],\n selection: BackendSelection | null,\n): Snapshot {\n let activeBackend: Backend | null = null;\n let activeOrgId: string | null = null;\n\n if (selection) {\n const found = backends.find((b) => b.id === selection.backendId);\n if (found) {\n activeBackend = found;\n activeOrgId = selection.orgId ?? null;\n }\n // If the selection points at a removed backend, fall through to\n // the unselected case below; we also drop the orgId since it only\n // makes sense in the context of a specific cloud backend.\n }\n\n // @spec BM-003 — Fallback on active backend removal\n if (!activeBackend) {\n activeBackend = pickFallbackBackend(backends);\n activeOrgId = null;\n }\n\n return {\n backends,\n selection,\n active: { backend: activeBackend, orgId: activeOrgId },\n };\n}\n\nlet snapshot: Snapshot = computeSnapshot(\n readStoredBackends(),\n readStoredActiveBackend(),\n);\n\nconst listeners = new Set<Listener>();\n\nfunction notify(): void {\n listeners.forEach((listener) => listener());\n}\n\nexport function getActiveBackend(): ResolvedActiveBackend {\n return snapshot.active;\n}\n\n/**\n * Pick the backend to use for *local agent-server protocol* calls.\n *\n * Most of the GUI's services (settings reads/writes, conversation CRUD,\n * skills/MCP/secrets, etc.) speak the local agent-server's protocol —\n * they would fail against a cloud host. Only the active backend is eligible:\n * a cloud selection must not borrow another registered local backend.\n */\nexport function getEffectiveLocalBackend(): Backend | null {\n const active = snapshot.active.backend;\n if (active.kind === \"local\" && !isNoBackend(active)) return active;\n return null;\n}\n\nexport function getRegisteredBackends(): Backend[] {\n return snapshot.backends;\n}\n\nexport function getActiveSelection(): BackendSelection | null {\n return snapshot.selection;\n}\n\nexport function getSnapshot(): Snapshot {\n return snapshot;\n}\n\nexport function setActiveSelection(selection: BackendSelection | null): void {\n writeStoredActiveBackend(selection);\n snapshot = computeSnapshot(snapshot.backends, selection);\n notify();\n}\n\nexport function setRegisteredBackends(backends: Backend[]): void {\n writeStoredBackends(backends);\n\n let nextSelection = snapshot.selection;\n if (\n nextSelection &&\n !backends.some((b) => b.id === nextSelection!.backendId)\n ) {\n nextSelection = null;\n writeStoredActiveBackend(null);\n }\n\n snapshot = computeSnapshot(backends, nextSelection);\n notify();\n}\n\nexport function subscribeActiveBackend(listener: Listener): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Test-only: re-read storage and clear listeners. */\n\nexport function __resetActiveStoreForTests(): void {\n snapshot = computeSnapshot(readStoredBackends(), readStoredActiveBackend());\n listeners.clear();\n}\n"],"mappings":"iFAgBA,IAAa,EAAgB,aAOhB,EAAsB,CACjC,GAAI,EACJ,KAAM,uBACN,KAAM,GACN,OAAQ,GACR,KAAM,QACP,CAED,SAAgB,EAAY,EAA2B,CACrD,OAAO,EAAQ,KAAO,EAGxB,SAAS,EAAoB,EAA8B,CACzD,OAAO,EAAS,IAAM,EAGxB,SAAS,EACP,EACA,EACU,CACV,IAAI,EAAgC,KAChC,EAA6B,KAEjC,GAAI,EAAW,CACb,IAAM,EAAQ,EAAS,KAAM,GAAM,EAAE,KAAO,EAAU,UAAU,CAC5D,IACF,EAAgB,EAChB,EAAc,EAAU,OAAS,MAarC,OALK,IACH,EAAgB,EAAoB,EAAS,CAC7C,EAAc,MAGT,CACL,WACA,YACA,OAAQ,CAAE,QAAS,EAAe,MAAO,EAAa,CACvD,CAGH,IAAI,EAAqB,EACvB,EAAA,oBAAoB,CACpB,EAAA,yBAAyB,CAC1B,CAEK,EAAY,IAAI,IAEtB,SAAS,GAAe,CACtB,EAAU,QAAS,GAAa,GAAU,CAAC,CAG7C,SAAgB,GAA0C,CACxD,OAAO,EAAS,OAWlB,SAAgB,GAA2C,CACzD,IAAM,EAAS,EAAS,OAAO,QAE/B,OADI,EAAO,OAAS,SAAW,CAAC,EAAY,EAAO,CAAS,EACrD,KAGT,SAAgB,GAAmC,CACjD,OAAO,EAAS,SAGlB,SAAgB,GAA8C,CAC5D,OAAO,EAAS,UAGlB,SAAgB,GAAwB,CACtC,OAAO,EAGT,SAAgB,EAAmB,EAA0C,CAC3E,EAAA,yBAAyB,EAAU,CACnC,EAAW,EAAgB,EAAS,SAAU,EAAU,CACxD,GAAQ,CAGV,SAAgB,EAAsB,EAA2B,CAC/D,EAAA,oBAAoB,EAAS,CAE7B,IAAI,EAAgB,EAAS,UAE3B,GACA,CAAC,EAAS,KAAM,GAAM,EAAE,KAAO,EAAe,UAAU,GAExD,EAAgB,KAChB,EAAA,yBAAyB,KAAK,EAGhC,EAAW,EAAgB,EAAU,EAAc,CACnD,GAAQ,CAGV,SAAgB,EAAuB,EAAgC,CAErE,OADA,EAAU,IAAI,EAAS,KACV,CACX,EAAU,OAAO,EAAS"}
|
|
@@ -5,18 +5,24 @@ interface Snapshot {
|
|
|
5
5
|
selection: BackendSelection | null;
|
|
6
6
|
active: ResolvedActiveBackend;
|
|
7
7
|
}
|
|
8
|
+
export declare const NO_BACKEND_ID = "no-backend";
|
|
9
|
+
/**
|
|
10
|
+
* Sentinel returned when the registry has no usable backend. It must never be
|
|
11
|
+
* persisted, and callers must check `isNoBackend()` before interpreting fields
|
|
12
|
+
* like `kind`, `host`, or `apiKey`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NO_BACKEND: Backend;
|
|
15
|
+
export declare function isNoBackend(backend: Backend): boolean;
|
|
8
16
|
export declare function getActiveBackend(): ResolvedActiveBackend;
|
|
9
17
|
/**
|
|
10
18
|
* Pick the backend to use for *local agent-server protocol* calls.
|
|
11
19
|
*
|
|
12
20
|
* Most of the GUI's services (settings reads/writes, conversation CRUD,
|
|
13
21
|
* skills/MCP/secrets, etc.) speak the local agent-server's protocol —
|
|
14
|
-
* they would fail against a cloud host.
|
|
15
|
-
* cloud
|
|
16
|
-
* local backend (or the env-derived default if none exists). Cloud-only
|
|
17
|
-
* call sites import `getActiveBackend` directly.
|
|
22
|
+
* they would fail against a cloud host. Only the active backend is eligible:
|
|
23
|
+
* a cloud selection must not borrow another registered local backend.
|
|
18
24
|
*/
|
|
19
|
-
export declare function getEffectiveLocalBackend(): Backend;
|
|
25
|
+
export declare function getEffectiveLocalBackend(): Backend | null;
|
|
20
26
|
export declare function getRegisteredBackends(): Backend[];
|
|
21
27
|
export declare function getActiveSelection(): BackendSelection | null;
|
|
22
28
|
export declare function getSnapshot(): Snapshot;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { readStoredActiveBackend as t, readStoredBackends as n, writeStoredActiveBackend as r, writeStoredBackends as i } from "./storage.js";
|
|
1
|
+
import { readStoredActiveBackend as e, readStoredBackends as t, writeStoredActiveBackend as n, writeStoredBackends as r } from "./storage.js";
|
|
3
2
|
//#region src/api/backend-registry/active-store.ts
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var i = "no-backend", a = {
|
|
4
|
+
id: i,
|
|
5
|
+
name: "No Backend Available",
|
|
6
|
+
host: "",
|
|
7
|
+
apiKey: "",
|
|
8
|
+
kind: "local"
|
|
9
|
+
};
|
|
10
|
+
function o(e) {
|
|
11
|
+
return e.id === i;
|
|
6
12
|
}
|
|
7
|
-
function
|
|
13
|
+
function s(e) {
|
|
14
|
+
return e[0] ?? a;
|
|
15
|
+
}
|
|
16
|
+
function c(e, t) {
|
|
8
17
|
let n = null, r = null;
|
|
9
18
|
if (t) {
|
|
10
19
|
let i = e.find((e) => e.id === t.backendId);
|
|
11
20
|
i && (n = i, r = t.orgId ?? null);
|
|
12
21
|
}
|
|
13
|
-
return n || (n =
|
|
22
|
+
return n || (n = s(e), r = null), {
|
|
14
23
|
backends: e,
|
|
15
24
|
selection: t,
|
|
16
25
|
active: {
|
|
@@ -19,40 +28,40 @@ function o(e, t) {
|
|
|
19
28
|
}
|
|
20
29
|
};
|
|
21
30
|
}
|
|
22
|
-
var
|
|
23
|
-
function l() {
|
|
24
|
-
c.forEach((e) => e());
|
|
25
|
-
}
|
|
26
|
-
function u() {
|
|
27
|
-
return s.active;
|
|
28
|
-
}
|
|
31
|
+
var l = c(t(), e()), u = /* @__PURE__ */ new Set();
|
|
29
32
|
function d() {
|
|
30
|
-
|
|
31
|
-
return e.kind === "local" ? e : a(s.backends);
|
|
33
|
+
u.forEach((e) => e());
|
|
32
34
|
}
|
|
33
35
|
function f() {
|
|
34
|
-
return
|
|
36
|
+
return l.active;
|
|
35
37
|
}
|
|
36
38
|
function p() {
|
|
37
|
-
|
|
39
|
+
let e = l.active.backend;
|
|
40
|
+
return e.kind === "local" && !o(e) ? e : null;
|
|
38
41
|
}
|
|
39
42
|
function m() {
|
|
40
|
-
return
|
|
43
|
+
return l.backends;
|
|
41
44
|
}
|
|
42
|
-
function h(
|
|
43
|
-
|
|
45
|
+
function h() {
|
|
46
|
+
return l.selection;
|
|
44
47
|
}
|
|
45
|
-
function g(
|
|
46
|
-
|
|
47
|
-
let t = s.selection;
|
|
48
|
-
t && !e.some((e) => e.id === t.backendId) && (t = null, r(null)), s = o(e, t), l();
|
|
48
|
+
function g() {
|
|
49
|
+
return l;
|
|
49
50
|
}
|
|
50
51
|
function _(e) {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
n(e), l = c(l.backends, e), d();
|
|
53
|
+
}
|
|
54
|
+
function v(e) {
|
|
55
|
+
r(e);
|
|
56
|
+
let t = l.selection;
|
|
57
|
+
t && !e.some((e) => e.id === t.backendId) && (t = null, n(null)), l = c(e, t), d();
|
|
58
|
+
}
|
|
59
|
+
function y(e) {
|
|
60
|
+
return u.add(e), () => {
|
|
61
|
+
u.delete(e);
|
|
53
62
|
};
|
|
54
63
|
}
|
|
55
64
|
//#endregion
|
|
56
|
-
export {
|
|
65
|
+
export { a as NO_BACKEND, f as getActiveBackend, h as getActiveSelection, p as getEffectiveLocalBackend, m as getRegisteredBackends, g as getSnapshot, o as isNoBackend, _ as setActiveSelection, v as setRegisteredBackends, y as subscribeActiveBackend };
|
|
57
66
|
|
|
58
67
|
//# sourceMappingURL=active-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-store.js","names":[],"sources":["../../../src/api/backend-registry/active-store.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"active-store.js","names":[],"sources":["../../../src/api/backend-registry/active-store.ts"],"sourcesContent":["import {\n readStoredActiveBackend,\n readStoredBackends,\n writeStoredActiveBackend,\n writeStoredBackends,\n} from \"./storage\";\nimport type { Backend, BackendSelection, ResolvedActiveBackend } from \"./types\";\n\ntype Listener = () => void;\n\ninterface Snapshot {\n backends: Backend[];\n selection: BackendSelection | null;\n active: ResolvedActiveBackend;\n}\n\nexport const NO_BACKEND_ID = \"no-backend\";\n\n/**\n * Sentinel returned when the registry has no usable backend. It must never be\n * persisted, and callers must check `isNoBackend()` before interpreting fields\n * like `kind`, `host`, or `apiKey`.\n */\nexport const NO_BACKEND: Backend = {\n id: NO_BACKEND_ID,\n name: \"No Backend Available\",\n host: \"\",\n apiKey: \"\",\n kind: \"local\",\n};\n\nexport function isNoBackend(backend: Backend): boolean {\n return backend.id === NO_BACKEND_ID;\n}\n\nfunction pickFallbackBackend(backends: Backend[]): Backend {\n return backends[0] ?? NO_BACKEND;\n}\n\nfunction computeSnapshot(\n backends: Backend[],\n selection: BackendSelection | null,\n): Snapshot {\n let activeBackend: Backend | null = null;\n let activeOrgId: string | null = null;\n\n if (selection) {\n const found = backends.find((b) => b.id === selection.backendId);\n if (found) {\n activeBackend = found;\n activeOrgId = selection.orgId ?? null;\n }\n // If the selection points at a removed backend, fall through to\n // the unselected case below; we also drop the orgId since it only\n // makes sense in the context of a specific cloud backend.\n }\n\n // @spec BM-003 — Fallback on active backend removal\n if (!activeBackend) {\n activeBackend = pickFallbackBackend(backends);\n activeOrgId = null;\n }\n\n return {\n backends,\n selection,\n active: { backend: activeBackend, orgId: activeOrgId },\n };\n}\n\nlet snapshot: Snapshot = computeSnapshot(\n readStoredBackends(),\n readStoredActiveBackend(),\n);\n\nconst listeners = new Set<Listener>();\n\nfunction notify(): void {\n listeners.forEach((listener) => listener());\n}\n\nexport function getActiveBackend(): ResolvedActiveBackend {\n return snapshot.active;\n}\n\n/**\n * Pick the backend to use for *local agent-server protocol* calls.\n *\n * Most of the GUI's services (settings reads/writes, conversation CRUD,\n * skills/MCP/secrets, etc.) speak the local agent-server's protocol —\n * they would fail against a cloud host. Only the active backend is eligible:\n * a cloud selection must not borrow another registered local backend.\n */\nexport function getEffectiveLocalBackend(): Backend | null {\n const active = snapshot.active.backend;\n if (active.kind === \"local\" && !isNoBackend(active)) return active;\n return null;\n}\n\nexport function getRegisteredBackends(): Backend[] {\n return snapshot.backends;\n}\n\nexport function getActiveSelection(): BackendSelection | null {\n return snapshot.selection;\n}\n\nexport function getSnapshot(): Snapshot {\n return snapshot;\n}\n\nexport function setActiveSelection(selection: BackendSelection | null): void {\n writeStoredActiveBackend(selection);\n snapshot = computeSnapshot(snapshot.backends, selection);\n notify();\n}\n\nexport function setRegisteredBackends(backends: Backend[]): void {\n writeStoredBackends(backends);\n\n let nextSelection = snapshot.selection;\n if (\n nextSelection &&\n !backends.some((b) => b.id === nextSelection!.backendId)\n ) {\n nextSelection = null;\n writeStoredActiveBackend(null);\n }\n\n snapshot = computeSnapshot(backends, nextSelection);\n notify();\n}\n\nexport function subscribeActiveBackend(listener: Listener): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Test-only: re-read storage and clear listeners. */\n\nexport function __resetActiveStoreForTests(): void {\n snapshot = computeSnapshot(readStoredBackends(), readStoredActiveBackend());\n listeners.clear();\n}\n"],"mappings":";;AAgBA,IAAa,IAAgB,cAOhB,IAAsB;CACjC,IAAI;CACJ,MAAM;CACN,MAAM;CACN,QAAQ;CACR,MAAM;CACP;AAED,SAAgB,EAAY,GAA2B;AACrD,QAAO,EAAQ,OAAO;;AAGxB,SAAS,EAAoB,GAA8B;AACzD,QAAO,EAAS,MAAM;;AAGxB,SAAS,EACP,GACA,GACU;CACV,IAAI,IAAgC,MAChC,IAA6B;AAEjC,KAAI,GAAW;EACb,IAAM,IAAQ,EAAS,MAAM,MAAM,EAAE,OAAO,EAAU,UAAU;AAChE,EAAI,MACF,IAAgB,GAChB,IAAc,EAAU,SAAS;;AAarC,QALK,MACH,IAAgB,EAAoB,EAAS,EAC7C,IAAc,OAGT;EACL;EACA;EACA,QAAQ;GAAE,SAAS;GAAe,OAAO;GAAa;EACvD;;AAGH,IAAI,IAAqB,EACvB,GAAoB,EACpB,GAAyB,CAC1B,EAEK,oBAAY,IAAI,KAAe;AAErC,SAAS,IAAe;AACtB,GAAU,SAAS,MAAa,GAAU,CAAC;;AAG7C,SAAgB,IAA0C;AACxD,QAAO,EAAS;;AAWlB,SAAgB,IAA2C;CACzD,IAAM,IAAS,EAAS,OAAO;AAE/B,QADI,EAAO,SAAS,WAAW,CAAC,EAAY,EAAO,GAAS,IACrD;;AAGT,SAAgB,IAAmC;AACjD,QAAO,EAAS;;AAGlB,SAAgB,IAA8C;AAC5D,QAAO,EAAS;;AAGlB,SAAgB,IAAwB;AACtC,QAAO;;AAGT,SAAgB,EAAmB,GAA0C;AAG3E,CAFA,EAAyB,EAAU,EACnC,IAAW,EAAgB,EAAS,UAAU,EAAU,EACxD,GAAQ;;AAGV,SAAgB,EAAsB,GAA2B;AAC/D,GAAoB,EAAS;CAE7B,IAAI,IAAgB,EAAS;AAU7B,CARE,KACA,CAAC,EAAS,MAAM,MAAM,EAAE,OAAO,EAAe,UAAU,KAExD,IAAgB,MAChB,EAAyB,KAAK,GAGhC,IAAW,EAAgB,GAAU,EAAc,EACnD,GAAQ;;AAGV,SAAgB,EAAuB,GAAgC;AAErE,QADA,EAAU,IAAI,EAAS,QACV;AACX,IAAU,OAAO,EAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);function e(e){return e.apiKey?e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}:{}}exports.buildAuthHeaders=e;
|
|
2
2
|
//# sourceMappingURL=auth.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.cjs","names":[],"sources":["../../../src/api/backend-registry/auth.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"auth.cjs","names":[],"sources":["../../../src/api/backend-registry/auth.ts"],"sourcesContent":["import type { Backend } from \"./types\";\n\n/**\n * Build the auth headers to send to a backend.\n *\n * Local agent-server uses `X-Session-API-Key`. Cloud expects a bearer\n * token in the `Authorization` header.\n */\nexport function buildAuthHeaders(backend: Backend): Record<string, string> {\n if (!backend.apiKey) return {};\n\n if (backend.kind === \"cloud\") {\n return { Authorization: `Bearer ${backend.apiKey}` };\n }\n\n return { \"X-Session-API-Key\": backend.apiKey };\n}\n"],"mappings":"gDAQA,SAAgB,EAAiB,EAA0C,CAOzE,OANK,EAAQ,OAET,EAAQ,OAAS,QACZ,CAAE,cAAe,UAAU,EAAQ,SAAU,CAG/C,CAAE,oBAAqB,EAAQ,OAAQ,CANlB,EAAE"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { getAgentServerSessionApiKey as e } from "../agent-server-config.js";
|
|
2
|
-
import "./default-backend.js";
|
|
3
1
|
//#region src/api/backend-registry/auth.ts
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
let t = e();
|
|
7
|
-
if (t) return { "X-Session-API-Key": t };
|
|
8
|
-
}
|
|
9
|
-
return t.apiKey ? t.kind === "cloud" ? { Authorization: `Bearer ${t.apiKey}` } : { "X-Session-API-Key": t.apiKey } : {};
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.apiKey ? e.kind === "cloud" ? { Authorization: `Bearer ${e.apiKey}` } : { "X-Session-API-Key": e.apiKey } : {};
|
|
10
4
|
}
|
|
11
5
|
//#endregion
|
|
12
|
-
export {
|
|
6
|
+
export { e as buildAuthHeaders };
|
|
13
7
|
|
|
14
8
|
//# sourceMappingURL=auth.js.map
|