@openhands/agent-canvas 1.0.0-alpha.4 → 1.0.0-alpha.5
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/build/assets/acp-providers-SCPK1BIU.js +1 -0
- package/build/assets/{acp-route-guard-CY4Kktrm.js → acp-route-guard-IWlFmS6x.js} +1 -1
- package/build/assets/active-backend-context-CkP3ZEJs.js +1 -0
- package/build/assets/{add-backend-modal-MoeYcSlW.js → add-backend-modal-CqjNjGqY.js} +1 -1
- package/build/assets/{agent-server-compatibility-DnXbX5aL.js → agent-server-compatibility-DvKtnXHw.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BdEre_71.js +5 -0
- package/build/assets/{agent-settings-D9CvPVkc.js → agent-settings-DdisD2Xx.js} +1 -1
- package/build/assets/{alert-banner-BopWFWDK.js → alert-banner-CvTYN73l.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-FvOoRQJt.js → analytics-consent-form-modal-BKgT9i2w.js} +1 -1
- package/build/assets/{app-settings-Dh9WIVcy.js → app-settings-DcYXtxGP.js} +1 -1
- package/build/assets/{automation-detail-B1toFzbL.js → automation-detail-ZQs6D2d3.js} +1 -1
- package/build/assets/{automations-list-lQ_f_eVe.js → automations-list-CqHXGwSw.js} +1 -1
- package/build/assets/backend-form-modal-KudhWUX8.js +1 -0
- package/build/assets/{backend-synced-settings-badge-f7SIwZJJ.js → backend-synced-settings-badge-BFy2HylT.js} +1 -1
- package/build/assets/{base-modal-D0AZIorb.js → base-modal-B4HvlFHE.js} +1 -1
- package/build/assets/{browser-store-CYpN823z.js → browser-store-C3AqxAO7.js} +1 -1
- package/build/assets/{browser-tab-Cy5h30Rj.js → browser-tab-DTM6RyoV.js} +1 -1
- package/build/assets/{browser-CqONu_f3.js → browser-vYpdU3CR.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BLCVOBAz.js → circle-plus-check-toggle-DRvuu-RD.js} +1 -1
- package/build/assets/{color-themes-VfRROuOB.js → color-themes-DSaoIL6A.js} +1 -1
- package/build/assets/{command-store-BUJOHJw0.js → command-store-DFN_17p1.js} +1 -1
- package/build/assets/{condenser-settings-tU2QpcvW.js → condenser-settings-DduLQcpV.js} +1 -1
- package/build/assets/{confirmation-modal-C9X6T5NM.js → confirmation-modal-B-DOYMUH.js} +1 -1
- package/build/assets/{context-menu-list-item-CdiNsCXt.js → context-menu-list-item-DzjPB8aC.js} +1 -1
- package/build/assets/conversation-CeGMBOyB.js +1 -0
- package/build/assets/conversation-D8scXOe7.js +17 -0
- package/build/assets/conversation-panel-DMz46ji-.js +1 -0
- package/build/assets/{conversation-service.api-bFeuJPps.js → conversation-service.api-YTGTw0pz.js} +1 -1
- package/build/assets/conversation-state-store-Bc0slAjL.js +1 -0
- package/build/assets/{conversation-store-CAtSuhbI.js → conversation-store-Z5iMCRpc.js} +1 -1
- package/build/assets/conversation-websocket-context-B0Gd3yiT.js +3 -0
- package/build/assets/{device-verify-B3pEa6X6.js → device-verify-CTbXX9CQ.js} +1 -1
- package/build/assets/dist-yMQV8IUk.js +1 -0
- package/build/assets/{edit-automation-modal-CoJon94X.js → edit-automation-modal-DgW0Q8vr.js} +1 -1
- package/build/assets/{ellipsis-button-BMXoWChN.js → ellipsis-button-BoU2-xlG.js} +1 -1
- package/build/assets/{entry.client-DH09zdmW.js → entry.client-DU7-q4ZU.js} +2 -2
- package/build/assets/{environment-switch-overlay-akifSJ7a.js → environment-switch-overlay-DQ1n6Iu6.js} +1 -1
- package/build/assets/{extensions-hub-BTPY21Mo.js → extensions-hub-BW1FAKFJ.js} +1 -1
- package/build/assets/{extensions-navigation-Bw61uJe9.js → extensions-navigation-CbPMhSML.js} +1 -1
- package/build/assets/{files-tab-CsZQRSpv.js → files-tab-CbJ4s7Ik.js} +1 -1
- package/build/assets/files-tab-store-CDyVTXNT.js +1 -0
- package/build/assets/git-control-bar-branch-button-DhpPgadK.js +27 -0
- package/build/assets/git-provider-icon-D8RE4unY.js +1 -0
- package/build/assets/health-store-BDC2rM-X.js +1 -0
- package/build/assets/{home-7IR9W24e.js → home-D9fJfhQA.js} +1 -1
- package/build/assets/{install-server-modal-BL4pprnN.js → install-server-modal-VB5hOBpW.js} +1 -1
- package/build/assets/{launch-Bd5avLyw.js → launch-DKCU9uJH.js} +1 -1
- package/build/assets/{llm-client-BvUU4If8.js → llm-client-BpIfxETv.js} +1 -1
- package/build/assets/{llm-settings-yIFf1UoE.js → llm-settings-BOJC4vD-.js} +1 -1
- package/build/assets/llm-settings-CIdxmimN.js +1 -0
- package/build/assets/{manage-backends-modal-buYNliLv.js → manage-backends-modal-DqpzcxdI.js} +1 -1
- package/build/assets/{manage-workspaces-modal-BiTj6Z4W.js → manage-workspaces-modal-eG6XgAvw.js} +1 -1
- package/build/assets/manifest-f141dc70.js +1 -0
- package/build/assets/{markdown-renderer-CeCYDWvz.js → markdown-renderer-wZnLDbA1.js} +1 -1
- package/build/assets/{mcp-DSzTA9H1.js → mcp-BdfyCW1l.js} +1 -1
- package/build/assets/{messages-x5kGl-bQ.js → messages-BfaEAG2q.js} +1 -1
- package/build/assets/{model-selector-CED-tBXx.js → model-selector-7id-Uirf.js} +1 -1
- package/build/assets/{navigation-link-C_YVC2i-.js → navigation-link-DFQ7YcWq.js} +1 -1
- package/build/assets/{option-service.api-Bqy363N2.js → option-service.api-DN0ZcGjw.js} +1 -1
- package/build/assets/{organization-service.api-BAwDUJoL.js → organization-service.api-Ct2dZF8M.js} +1 -1
- package/build/assets/{path-utils-3ccf0YXA.js → path-utils-D1ZtqFC7.js} +1 -1
- package/build/assets/{planner-tab-b0Q_JZvr.js → planner-tab-yubfN-6U.js} +1 -1
- package/build/assets/{profiles-client-Cj9KHwuq.js → profiles-client-D4twHRVf.js} +1 -1
- package/build/assets/{providers-CdDNvcEb.js → providers-C2T07PM3.js} +1 -1
- package/build/assets/{proxy-3uQm0NJ9.js → proxy-BMZyC45G.js} +1 -1
- package/build/assets/query-client-config-CiK0GJJO.js +1 -0
- package/build/assets/{recommended-automations-launcher--puKMsm-.js → recommended-automations-launcher-Cx7svuGE.js} +17 -3
- package/build/assets/root-layout-DvYGxAnr.js +2 -0
- package/build/assets/root-luPHQiBx.js +2 -0
- package/build/assets/{sdk-section-page-Dgmjx3Nh.js → sdk-section-page-03k88tIR.js} +1 -1
- package/build/assets/{sdk-settings-schema-QrDJfOon.js → sdk-settings-schema-BY8dOy3a.js} +1 -1
- package/build/assets/{secrets-service-Dy7jaVk0.js → secrets-service-Z3qtRb_G.js} +1 -1
- package/build/assets/{secrets-settings-9X_bB7-j.js → secrets-settings-BnlByuMZ.js} +1 -1
- package/build/assets/{server-client-BvA-DepM.js → server-client-CG1zHqph.js} +1 -1
- package/build/assets/{settings-CLfgxw_Q.js → settings-DyzGLF_d.js} +1 -1
- package/build/assets/{settings-client-DjnapAI3.js → settings-client-CkXDJwIY.js} +1 -1
- package/build/assets/{settings-dropdown-input-1bMoP5ld.js → settings-dropdown-input-CAQWQgx-.js} +1 -1
- package/build/assets/{settings-index-QV1myqj-.js → settings-index-KtTw49xL.js} +1 -1
- package/build/assets/{settings-input-Bz9QClNU.js → settings-input-BWCZt9g2.js} +1 -1
- package/build/assets/{settings-list-classes-vFnNAdFx.js → settings-list-classes-xMleGkTC.js} +1 -1
- package/build/assets/{settings-modal-CmsyiNtY.js → settings-modal-Cv2YWSUY.js} +1 -1
- package/build/assets/{settings-service.api-DfJwVvYA.js → settings-service.api-Z6x0l0GU.js} +1 -1
- package/build/assets/{shared-conversation-CsGvti_a.js → shared-conversation-BfZNCsvo.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CRQrI0ED.js → sidebar-mobile-menu-toggle-DXplko7u.js} +1 -1
- package/build/assets/{sidebar-nav-link-qrRmYl8T.js → sidebar-nav-link-B4h8naZ7.js} +1 -1
- package/build/assets/{sidebar-store-CUm9qCi_.js → sidebar-store-cOeaKmIm.js} +1 -1
- package/build/assets/{skill-card-pill-row-DdaVfIxC.js → skill-card-pill-row-D0oTWx-a.js} +1 -1
- package/build/assets/{skills-plugins-BX5zDQC6.js → skills-plugins-BTnp7QcQ.js} +1 -1
- package/build/assets/{skills-settings-CuoWDnTN.js → skills-settings-CbOQvzkR.js} +1 -1
- package/build/assets/{styled-tooltip-C7QOGK28.js → styled-tooltip-Awq4HMw3.js} +1 -1
- package/build/assets/{task-list-tab-Bz7_oCIo.js → task-list-tab-B45ktzHM.js} +1 -1
- package/build/assets/{terminal-CRX7ZSEA.js → terminal-D5pzR9Ru.js} +1 -1
- package/build/assets/{typography-BqlA_dVV.js → typography-BbaUAC4V.js} +1 -1
- package/build/assets/{use-active-conversation-DOLpeZZ5.js → use-active-conversation-Bu5J9iLy.js} +1 -1
- package/build/assets/{use-agent-settings-schema-D90oKLgR.js → use-agent-settings-schema-BbtOsR7P.js} +1 -1
- package/build/assets/{use-agent-state-BqaILzms.js → use-agent-state-DN9Nc5pP.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dy9b3ahi.js → use-cloud-current-user-id-B_rMUiu8.js} +1 -1
- package/build/assets/{use-config-BD9X1AvI.js → use-config-Bcz2JL2t.js} +1 -1
- package/build/assets/{use-conversation-id-DPRiMh48.js → use-conversation-id-BOaaZahn.js} +1 -1
- package/build/assets/{use-create-conversation-B4M_yYz3.js → use-create-conversation-BWFA_FId.js} +1 -1
- package/build/assets/{use-event-store-DDhcATXi.js → use-event-store-CQZCcVz-.js} +1 -1
- package/build/assets/{use-handle-plan-click-Dno7Yfm3.js → use-handle-plan-click-CgrCGmT1.js} +1 -1
- package/build/assets/{use-is-creating-conversation-CVum0xhv.js → use-is-creating-conversation-DhoM7UAB.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-sASpuCpy.js → use-launch-skill-in-chat-DOyQsXFO.js} +1 -1
- package/build/assets/{use-llm-profiles-DHxXPcrl.js → use-llm-profiles-CAIzHJDX.js} +1 -1
- package/build/assets/{use-runtime-is-ready-C-dZi-ZU.js → use-runtime-is-ready-BQWLEyqa.js} +1 -1
- package/build/assets/{use-save-settings-pkHKHB31.js → use-save-settings-5m3w89Ph.js} +1 -1
- package/build/assets/{use-settings-ClRWXa6p.js → use-settings-DzG0C3vO.js} +1 -1
- package/build/assets/{use-settings-nav-items-CDy22kOR.js → use-settings-nav-items-BIsKeX52.js} +1 -1
- package/build/assets/use-skills-Cn-78xP1.js +1 -0
- package/build/assets/{use-task-list-BwJGWML_.js → use-task-list-Bs90uF2N.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DU7On_6w.js → use-unified-vscode-url-C5iI-Z5A.js} +1 -1
- package/build/assets/{use-user-conversation-DdUU6uqz.js → use-user-conversation-BCYpbPT1.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-CJfSHdwC.js → vendor~conversation-panel~conversation-CbjvWBSu.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-DZ7eKFW3.js → vendor~conversation-panel~conversation~index-C23ZXO4R.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-ksomn5Bg.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CM_1dibO.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B-s2ZXN7.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BbFOrAjI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-bTqZAHqW.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-By5W2oHN.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-8cYFyeHR.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CofhIDpd.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-uK_SqCPd.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js} +1 -1
- package/build/assets/{vendor~home~mcp~automations-list-a--VL9Np.js → vendor~home~mcp~automations-list-DRfWZRnF.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-WuKCleb6.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BQPOygpY.js} +2 -2
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BG3to4e4.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CyYIBiBk.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DL8iX8eY.js → vendor~root-layout~home~conversation-panel~conversation-DjAjXS5J.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-8l0SYWBt.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CFpDeb9o.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CrBN5IsU.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CuGq_cxH.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-DHbj3Bsh.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-C1p8-pMr.js} +2 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js +48 -0
- package/build/assets/{verification-settings-CiaMSkli.js → verification-settings-DbziMp4K.js} +1 -1
- package/build/assets/{vscode-tab-DkUK-4Xb.js → vscode-tab-BVhQR2rt.js} +1 -1
- package/build/index.html +4 -4
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +10 -18
- package/dist/constants/acp-providers.js +42 -209
- package/dist/constants/acp-providers.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 +2 -1
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +213 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js +10 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/query-client-config.cjs +1 -1
- package/dist/query-client-config.cjs.map +1 -1
- package/dist/query-client-config.js +30 -23
- package/dist/query-client-config.js.map +1 -1
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/build/assets/acp-providers-BhOEPsud.js +0 -1
- package/build/assets/active-backend-context-jthDtMCD.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CA7hOJAy.js +0 -5
- package/build/assets/backend-form-modal-DbriBS-v.js +0 -1
- package/build/assets/conversation-CDHXbtHw.js +0 -17
- package/build/assets/conversation-Dd7NkKCq.js +0 -1
- package/build/assets/conversation-panel-BZ1-fw2m.js +0 -1
- package/build/assets/conversation-state-store-Dpa4x70O.js +0 -1
- package/build/assets/conversation-websocket-context-BEeh-jIG.js +0 -3
- package/build/assets/dist-dxViYC8L.js +0 -1
- package/build/assets/files-tab-store-ymnFnIBO.js +0 -1
- package/build/assets/git-control-bar-branch-button-BzqhhzW4.js +0 -27
- package/build/assets/git-provider-icon-Cf-vdwYZ.js +0 -1
- package/build/assets/llm-settings-BwVWlOyB.js +0 -1
- package/build/assets/manifest-e27751af.js +0 -1
- package/build/assets/query-client-config-BtB8Yvpf.js +0 -1
- package/build/assets/root-Xt6cd1J6.js +0 -2
- package/build/assets/root-layout-Bp7iQEOJ.js +0 -2
- package/build/assets/skills-client-DOeT6HEj.js +0 -1
- package/build/assets/use-skills-C2S3iOtJ.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~automations-list~automation-~f57mv2f3-D6ItaxF-.js +0 -48
- package/scripts/check-acp-providers-sync.mjs +0 -560
- /package/build/assets/{agent-server-client-options-BvlH7qGM.js → agent-server-client-options-8OJSXbm8.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-DWLieFHA.js → agent-server-ui-style-scope-BwIZYdC1.js} +0 -0
- /package/build/assets/{brand-button-BYloqbQ3.js → brand-button-8fVVei4i.js} +0 -0
- /package/build/assets/{combobox-caret-C7rVhI_V.js → combobox-caret-BMsz5mQX.js} +0 -0
- /package/build/assets/{conversation-local-storage-BQSptoYo.js → conversation-local-storage-UYl-SX-r.js} +0 -0
- /package/build/assets/{dist-3eF0ujsw.js → dist-DZHSA2e6.js} +0 -0
- /package/build/assets/{environment-switch-store-CBXkf5bS.js → environment-switch-store-C4ulFJKp.js} +0 -0
- /package/build/assets/{loading-spinner-D-ea2dZq.js → loading-spinner-91b5FiMQ.js} +0 -0
- /package/build/assets/{middleware-iK-zKVe0.js → middleware-BC9EwbB9.js} +0 -0
- /package/build/assets/{modal-backdrop-DML21GPD.js → modal-backdrop-B04pVYAD.js} +0 -0
- /package/build/assets/{modal-body-RpEv_U1i.js → modal-body-CgUoFQA1.js} +0 -0
- /package/build/assets/{modal-close-button-SKLwT3A4.js → modal-close-button-SM_WXzDY.js} +0 -0
- /package/build/assets/{navigation-context-DtjWNE3F.js → navigation-context-BFjstyH6.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-SGdQSpMZ.js → objectWithoutPropertiesLoose-Du6eBn-V.js} +0 -0
- /package/build/assets/{openhands-logo-BRKD7Ir9.js → openhands-logo-DkDp75rC.js} +0 -0
- /package/build/assets/{query-keys-D5xWPArX.js → query-keys-tAsQcc_9.js} +0 -0
- /package/build/assets/{react-DMUxGBRt.js → react-Do0CT17Y.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-Csgp2p8o.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-iOsylxCS.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BdNVgtVT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-DFFy3NX_.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-providers.js","names":[],"sources":["../../../../../../node_modules/@openhands/typescript-client/dist/models/acp-providers.json"],"sourcesContent":["{\n \"claude-code\": {\n \"key\": \"claude-code\",\n \"display_name\": \"Claude Code\",\n \"default_command\": [\"npx\", \"-y\", \"@agentclientprotocol/claude-agent-acp\"],\n \"api_key_env_var\": \"ANTHROPIC_API_KEY\",\n \"base_url_env_var\": \"ANTHROPIC_BASE_URL\",\n \"default_session_mode\": \"bypassPermissions\",\n \"agent_name_patterns\": [\"claude-agent\"],\n \"supports_set_session_model\": false,\n \"session_meta_key\": \"claudeCode\",\n \"available_models\": [\n { \"id\": \"claude-opus-4-7\", \"label\": \"Claude Opus 4.7\" },\n { \"id\": \"claude-opus-4-6\", \"label\": \"Claude Opus 4.6\" },\n { \"id\": \"opus[1m]\", \"label\": \"Claude Opus (1M)\" },\n { \"id\": \"claude-opus-4-5\", \"label\": \"Claude Opus 4.5\" },\n { \"id\": \"claude-opus-4-1-20250805\", \"label\": \"Claude Opus 4.1\" },\n { \"id\": \"claude-sonnet-4-6\", \"label\": \"Claude Sonnet 4.6\" },\n { \"id\": \"sonnet[1m]\", \"label\": \"Claude Sonnet (1M)\" },\n { \"id\": \"claude-sonnet-4-5\", \"label\": \"Claude Sonnet 4.5\" },\n { \"id\": \"claude-haiku-4-5\", \"label\": \"Claude Haiku 4.5\" },\n { \"id\": \"opusplan\", \"label\": \"Opus (plan) + Sonnet (execute)\" }\n ],\n \"default_model\": \"claude-opus-4-7\"\n },\n \"codex\": {\n \"key\": \"codex\",\n \"display_name\": \"Codex\",\n \"default_command\": [\"npx\", \"-y\", \"@zed-industries/codex-acp\"],\n \"api_key_env_var\": \"OPENAI_API_KEY\",\n \"base_url_env_var\": \"OPENAI_BASE_URL\",\n \"default_session_mode\": \"full-access\",\n \"agent_name_patterns\": [\"codex-acp\"],\n \"supports_set_session_model\": true,\n \"session_meta_key\": null,\n \"available_models\": [\n { \"id\": \"gpt-5.5/low\", \"label\": \"GPT-5.5 (low)\" },\n { \"id\": \"gpt-5.5/medium\", \"label\": \"GPT-5.5 (medium)\" },\n { \"id\": \"gpt-5.5/high\", \"label\": \"GPT-5.5 (high)\" },\n { \"id\": \"gpt-5.5/xhigh\", \"label\": \"GPT-5.5 (xhigh)\" },\n { \"id\": \"gpt-5.4/low\", \"label\": \"GPT-5.4 (low)\" },\n { \"id\": \"gpt-5.4/medium\", \"label\": \"GPT-5.4 (medium)\" },\n { \"id\": \"gpt-5.4/high\", \"label\": \"GPT-5.4 (high)\" },\n { \"id\": \"gpt-5.4/xhigh\", \"label\": \"GPT-5.4 (xhigh)\" },\n { \"id\": \"gpt-5.4-mini/low\", \"label\": \"GPT-5.4 Mini (low)\" },\n { \"id\": \"gpt-5.4-mini/medium\", \"label\": \"GPT-5.4 Mini (medium)\" },\n { \"id\": \"gpt-5.4-mini/high\", \"label\": \"GPT-5.4 Mini (high)\" },\n { \"id\": \"gpt-5.4-mini/xhigh\", \"label\": \"GPT-5.4 Mini (xhigh)\" },\n { \"id\": \"gpt-5.3-codex/low\", \"label\": \"GPT-5.3 Codex (low)\" },\n { \"id\": \"gpt-5.3-codex/medium\", \"label\": \"GPT-5.3 Codex (medium)\" },\n { \"id\": \"gpt-5.3-codex/high\", \"label\": \"GPT-5.3 Codex (high)\" },\n { \"id\": \"gpt-5.3-codex/xhigh\", \"label\": \"GPT-5.3 Codex (xhigh)\" },\n { \"id\": \"gpt-5.2/low\", \"label\": \"GPT-5.2 (low)\" },\n { \"id\": \"gpt-5.2/medium\", \"label\": \"GPT-5.2 (medium)\" },\n { \"id\": \"gpt-5.2/high\", \"label\": \"GPT-5.2 (high)\" },\n { \"id\": \"gpt-5.2/xhigh\", \"label\": \"GPT-5.2 (xhigh)\" }\n ],\n \"default_model\": \"gpt-5.5/medium\"\n },\n \"gemini-cli\": {\n \"key\": \"gemini-cli\",\n \"display_name\": \"Gemini CLI\",\n \"default_command\": [\"npx\", \"-y\", \"@google/gemini-cli\", \"--acp\"],\n \"api_key_env_var\": \"GEMINI_API_KEY\",\n \"base_url_env_var\": \"GEMINI_BASE_URL\",\n \"default_session_mode\": \"yolo\",\n \"agent_name_patterns\": [\"gemini-cli\"],\n \"supports_set_session_model\": true,\n \"session_meta_key\": null,\n \"available_models\": [\n { \"id\": \"auto-gemini-3\", \"label\": \"Auto (Gemini 3)\" },\n { \"id\": \"auto-gemini-2.5\", \"label\": \"Auto (Gemini 2.5)\" },\n { \"id\": \"gemini-3.1-pro-preview\", \"label\": \"Gemini 3.1 Pro (preview)\" },\n { \"id\": \"gemini-3-flash-preview\", \"label\": \"Gemini 3 Flash (preview)\" },\n {\n \"id\": \"gemini-3.1-flash-lite-preview\",\n \"label\": \"Gemini 3.1 Flash Lite (preview)\"\n },\n { \"id\": \"gemini-2.5-pro\", \"label\": \"Gemini 2.5 Pro\" },\n { \"id\": \"gemini-2.5-flash\", \"label\": \"Gemini 2.5 Flash\" },\n { \"id\": \"gemini-2.5-flash-lite\", \"label\": \"Gemini 2.5 Flash Lite\" }\n ],\n \"default_model\": \"auto-gemini-2.5\"\n }\n}\n"],"x_google_ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp.cjs","names":["providersData"],"sources":["../../../../../../node_modules/@openhands/typescript-client/dist/models/acp.js"],"sourcesContent":["/**\n * ACP (Agent Client Protocol) provider registry — TypeScript mirror of the\n * Python source of truth at\n * `openhands.sdk.settings.acp_providers.ACP_PROVIDERS` in\n * https://github.com/OpenHands/software-agent-sdk.\n *\n * The data lives in `./acp-providers.json` so the Python drift check in\n * `scripts/check-acp-drift.py` can read it without executing TypeScript.\n * To add or modify a provider, edit `acp_providers.py` in software-agent-sdk\n * first, then mirror the change in `acp-providers.json` here. CI will fail\n * until the two match.\n */\nimport providersData from './acp-providers.json';\nexport const ACP_PROVIDERS = providersData;\n/**\n * Return the {@link ACPProviderInfo} for `key`, or `null` if unknown.\n * Mirrors the Python `get_acp_provider` semantics — returns `null` for the\n * UI-side `'custom'` discriminator and for any unknown / falsy value.\n */\nexport function getAcpProvider(key) {\n if (!key) {\n return null;\n }\n return ACP_PROVIDERS[key] ?? null;\n}\n/**\n * Allow-list of fields that travel on an `ACPAgent` settings payload.\n * Mirrors `openhands.sdk.settings.model.ACPAgentSettings`'s field set.\n * Clients filter ACP-only fields out when switching to a non-ACP variant.\n */\nexport const ACP_SETTINGS_KEYS = [\n 'acp_command',\n 'acp_args',\n 'acp_env',\n 'acp_model',\n 'acp_session_mode',\n 'acp_prompt_timeout',\n 'acp_server',\n];\n//# sourceMappingURL=acp.js.map"],"x_google_ignoreList":[0],"mappings":"yDAaA,IAAa,gCAAgBA,CAAAA,QAM7B,SAAgB,EAAe,EAAK,CAIhC,OAHK,EAGE,EAAc,IAAQ,KAFlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./acp-providers.js";
|
|
2
|
+
//#region node_modules/@openhands/typescript-client/dist/models/acp.js
|
|
3
|
+
var t = e;
|
|
4
|
+
function n(e) {
|
|
5
|
+
return e ? t[e] ?? null : null;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as ACP_PROVIDERS, n as getAcpProvider };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=acp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp.js","names":["providersData"],"sources":["../../../../../../node_modules/@openhands/typescript-client/dist/models/acp.js"],"sourcesContent":["/**\n * ACP (Agent Client Protocol) provider registry — TypeScript mirror of the\n * Python source of truth at\n * `openhands.sdk.settings.acp_providers.ACP_PROVIDERS` in\n * https://github.com/OpenHands/software-agent-sdk.\n *\n * The data lives in `./acp-providers.json` so the Python drift check in\n * `scripts/check-acp-drift.py` can read it without executing TypeScript.\n * To add or modify a provider, edit `acp_providers.py` in software-agent-sdk\n * first, then mirror the change in `acp-providers.json` here. CI will fail\n * until the two match.\n */\nimport providersData from './acp-providers.json';\nexport const ACP_PROVIDERS = providersData;\n/**\n * Return the {@link ACPProviderInfo} for `key`, or `null` if unknown.\n * Mirrors the Python `get_acp_provider` semantics — returns `null` for the\n * UI-side `'custom'` discriminator and for any unknown / falsy value.\n */\nexport function getAcpProvider(key) {\n if (!key) {\n return null;\n }\n return ACP_PROVIDERS[key] ?? null;\n}\n/**\n * Allow-list of fields that travel on an `ACPAgent` settings payload.\n * Mirrors `openhands.sdk.settings.model.ACPAgentSettings`'s field set.\n * Clients filter ACP-only fields out when switching to a non-ACP variant.\n */\nexport const ACP_SETTINGS_KEYS = [\n 'acp_command',\n 'acp_args',\n 'acp_env',\n 'acp_model',\n 'acp_session_mode',\n 'acp_prompt_timeout',\n 'acp_server',\n];\n//# sourceMappingURL=acp.js.map"],"x_google_ignoreList":[0],"mappings":";;AAaA,IAAa,IAAgBA;AAM7B,SAAgB,EAAe,GAAK;AAIhC,QAHK,IAGE,EAAc,MAAQ,OAFlB"}
|
package/dist/package.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./_virtual/_rolldown/runtime.cjs`);var e={name:`@openhands/agent-canvas`,version:`1.0.0-alpha.
|
|
1
|
+
require(`./_virtual/_rolldown/runtime.cjs`);var e={name:`@openhands/agent-canvas`,version:`1.0.0-alpha.5`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`git+https://github.com/OpenHands/extensions.git#b8c1869ec9dea4467bb27d5754dc695d14e27889`,"@openhands/typescript-client":`1.23.3`,"@react-router/node":`7.14.2`,"@react-router/serve":`7.14.2`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`^1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.14.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`^1.8.3`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:snapshots":`playwright test tests/e2e/snapshots --project=chromium --retries=0`,"test:e2e:snapshots:update":`playwright test tests/e2e/snapshots --project=chromium --update-snapshots`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`bash -c 'npm run typecheck:staged'`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.14.2`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{dompurify:`3.3.2`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`scripts`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.14.2`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=package.cjs.map
|
package/dist/package.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0-alpha.5\",\n \"description\": \"Agent Canvas UI for OpenHands - run AI coding agents with a visual interface\",\n \"license\": \"MIT\",\n \"private\": false,\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/OpenHands/agent-canvas\"\n },\n \"homepage\": \"https://github.com/OpenHands/agent-canvas#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/OpenHands/agent-canvas/issues\"\n },\n \"bin\": {\n \"agent-canvas\": \"bin/agent-canvas.mjs\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"dependencies\": {\n \"@heroui/react\": \"2.8.10\",\n \"@microlink/react-json-view\": \"1.31.20\",\n \"@monaco-editor/react\": \"4.7.0\",\n \"@openhands/extensions\": \"git+https://github.com/OpenHands/extensions.git#b8c1869ec9dea4467bb27d5754dc695d14e27889\",\n \"@openhands/typescript-client\": \"1.23.3\",\n \"@react-router/node\": \"7.14.2\",\n \"@react-router/serve\": \"7.14.2\",\n \"@tailwindcss/vite\": \"4.2.4\",\n \"@tanstack/react-query\": \"5.100.9\",\n \"@types/shell-quote\": \"^1.7.5\",\n \"@uidotdev/usehooks\": \"2.4.1\",\n \"@xterm/addon-fit\": \"0.11.0\",\n \"@xterm/xterm\": \"6.0.0\",\n \"axios\": \"1.16.0\",\n \"class-variance-authority\": \"0.7.1\",\n \"clsx\": \"2.1.1\",\n \"downshift\": \"9.3.2\",\n \"framer-motion\": \"12.38.0\",\n \"i18next\": \"26.0.8\",\n \"i18next-browser-languagedetector\": \"8.2.1\",\n \"i18next-http-backend\": \"4.0.0\",\n \"isbot\": \"5.1.39\",\n \"lucide-react\": \"1.14.0\",\n \"monaco-editor\": \"0.55.1\",\n \"posthog-js\": \"1.372.6\",\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-hot-toast\": \"2.6.0\",\n \"react-i18next\": \"17.0.6\",\n \"react-icons\": \"5.6.0\",\n \"react-markdown\": \"10.1.0\",\n \"react-router\": \"7.14.2\",\n \"react-syntax-highlighter\": \"16.1.1\",\n \"rehype-raw\": \"7.0.0\",\n \"rehype-sanitize\": \"6.0.0\",\n \"remark-breaks\": \"4.0.0\",\n \"remark-gfm\": \"4.0.1\",\n \"shell-quote\": \"^1.8.3\",\n \"sirv-cli\": \"3.0.1\",\n \"socket.io-client\": \"4.8.3\",\n \"tailwind-merge\": \"3.5.0\",\n \"tailwind-scrollbar\": \"4.0.2\",\n \"unist-util-visit\": \"5.1.0\",\n \"uuid\": \"14.0.0\",\n \"vite\": \"8.0.10\",\n \"zustand\": \"5.0.12\"\n },\n \"scripts\": {\n \"dev\": \"node --env-file-if-exists=.env scripts/dev-with-automation.mjs\",\n \"dev:static\": \"node --env-file-if-exists=.env scripts/dev-static.mjs\",\n \"dev:extra-backend\": \"node --env-file-if-exists=.env scripts/dev-extra-backend.mjs\",\n \"dev:minimal\": \"node --env-file-if-exists=.env scripts/dev-safe.mjs\",\n \"dev:frontend\": \"npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev\",\n \"dev:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev\",\n \"build\": \"npm run build:app\",\n \"build:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router build\",\n \"start\": \"npx sirv-cli build/ --single\",\n \"test\": \"npm run make-i18n && vitest run\",\n \"test:e2e\": \"playwright test --pass-with-no-tests\",\n \"test:e2e:live\": \"node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs\",\n \"test:e2e:snapshots\": \"playwright test tests/e2e/snapshots --project=chromium --retries=0\",\n \"test:e2e:snapshots:update\": \"playwright test tests/e2e/snapshots --project=chromium --update-snapshots\",\n \"test:coverage\": \"npm run make-i18n && vitest run --coverage\",\n \"dev_wsl\": \"VITE_WATCH_USE_POLLING=true vite\",\n \"preview\": \"vite preview\",\n \"make-i18n\": \"node scripts/make-i18n-translations.cjs\",\n \"prelint\": \"npm run make-i18n\",\n \"lint\": \"npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}\",\n \"lint:fix\": \"eslint src --fix && prettier --write src/**/*.{ts,tsx}\",\n \"prepare\": \"husky\",\n \"typecheck\": \"react-router typegen && tsc\",\n \"typecheck:staged\": \"react-router typegen && npx tsc --noEmit --skipLibCheck\",\n \"check-translation-completeness\": \"node scripts/check-translation-completeness.cjs\",\n \"build:app\": \"npm run make-i18n && react-router build\",\n \"build:lib\": \"npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json\",\n \"build:docker\": \"node scripts/docker-build.mjs\"\n },\n \"lint-staged\": {\n \"src/**/*.{ts,tsx,js}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"src/**/*.{ts,tsx}\": [\n \"bash -c 'npm run typecheck:staged'\"\n ],\n \"src/**/*\": [\n \"npm run check-translation-completeness\"\n ]\n },\n \"devDependencies\": {\n \"@eslint/eslintrc\": \"3.3.1\",\n \"@eslint/js\": \"9.39.4\",\n \"@mswjs/socket.io-binding\": \"0.2.0\",\n \"@playwright/test\": \"1.59.1\",\n \"@react-router/dev\": \"7.14.2\",\n \"@tailwindcss/typography\": \"0.5.19\",\n \"@tanstack/eslint-plugin-query\": \"5.100.9\",\n \"@testing-library/dom\": \"10.4.1\",\n \"@testing-library/jest-dom\": \"6.9.1\",\n \"@testing-library/react\": \"16.3.2\",\n \"@testing-library/user-event\": \"14.6.1\",\n \"@types/mdast\": \"4.0.4\",\n \"@types/node\": \"25.6.0\",\n \"@types/react\": \"19.2.14\",\n \"@types/react-dom\": \"19.2.3\",\n \"@types/react-syntax-highlighter\": \"15.5.13\",\n \"@typescript-eslint/eslint-plugin\": \"8.59.2\",\n \"@typescript-eslint/parser\": \"8.59.2\",\n \"@vercel/react-router\": \"1.3.0\",\n \"@vitest/coverage-v8\": \"4.1.5\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.4\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-i18next\": \"6.1.4\",\n \"eslint-plugin-import-x\": \"4.16.2\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"eslint-plugin-prettier\": \"5.5.5\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-react-hooks\": \"7.1.1\",\n \"eslint-plugin-unused-imports\": \"4.4.1\",\n \"globals\": \"16.5.0\",\n \"husky\": \"9.1.7\",\n \"jsdom\": \"29.1.1\",\n \"lint-staged\": \"16.4.0\",\n \"msw\": \"2.14.2\",\n \"postcss-prefix-selector\": \"2.1.1\",\n \"prettier\": \"3.8.3\",\n \"tailwindcss\": \"4.2.4\",\n \"typescript\": \"6.0.3\",\n \"vite-plugin-svgr\": \"5.2.0\",\n \"vitest\": \"4.1.5\"\n },\n \"packageManager\": \"npm@10.5.0\",\n \"volta\": {\n \"node\": \"22.12.0\"\n },\n \"msw\": {\n \"workerDirectory\": [\n \"public\"\n ]\n },\n \"overrides\": {\n \"dompurify\": \"3.3.2\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\",\n \"bin\",\n \"build\",\n \"scripts\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./browser\": {\n \"types\": \"./dist/components/browser/index.d.ts\",\n \"import\": \"./dist/components/browser/index.js\",\n \"require\": \"./dist/components/browser/index.cjs\"\n },\n \"./conversation\": {\n \"types\": \"./dist/components/conversation/index.d.ts\",\n \"import\": \"./dist/components/conversation/index.js\",\n \"require\": \"./dist/components/conversation/index.cjs\"\n },\n \"./files\": {\n \"types\": \"./dist/components/files/index.d.ts\",\n \"import\": \"./dist/components/files/index.js\",\n \"require\": \"./dist/components/files/index.cjs\"\n },\n \"./settings\": {\n \"types\": \"./dist/components/settings/index.d.ts\",\n \"import\": \"./dist/components/settings/index.js\",\n \"require\": \"./dist/components/settings/index.cjs\"\n },\n \"./sidebar\": {\n \"types\": \"./dist/components/sidebar/index.d.ts\",\n \"import\": \"./dist/components/sidebar/index.js\",\n \"require\": \"./dist/components/sidebar/index.cjs\"\n },\n \"./terminal\": {\n \"types\": \"./dist/components/terminal/index.d.ts\",\n \"import\": \"./dist/components/terminal/index.js\",\n \"require\": \"./dist/components/terminal/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.js\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"peerDependencies\": {\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-router\": \"7.14.2\"\n }\n}\n"],"mappings":""}
|
package/dist/package.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var e = {
|
|
2
2
|
name: "@openhands/agent-canvas",
|
|
3
|
-
version: "1.0.0-alpha.
|
|
3
|
+
version: "1.0.0-alpha.5",
|
|
4
4
|
description: "Agent Canvas UI for OpenHands - run AI coding agents with a visual interface",
|
|
5
5
|
license: "MIT",
|
|
6
6
|
private: !1,
|
|
@@ -17,8 +17,8 @@ var e = {
|
|
|
17
17
|
"@heroui/react": "2.8.10",
|
|
18
18
|
"@microlink/react-json-view": "1.31.20",
|
|
19
19
|
"@monaco-editor/react": "4.7.0",
|
|
20
|
-
"@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#
|
|
21
|
-
"@openhands/typescript-client": "
|
|
20
|
+
"@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#b8c1869ec9dea4467bb27d5754dc695d14e27889",
|
|
21
|
+
"@openhands/typescript-client": "1.23.3",
|
|
22
22
|
"@react-router/node": "7.14.2",
|
|
23
23
|
"@react-router/serve": "7.14.2",
|
|
24
24
|
"@tailwindcss/vite": "4.2.4",
|
package/dist/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0-alpha.5\",\n \"description\": \"Agent Canvas UI for OpenHands - run AI coding agents with a visual interface\",\n \"license\": \"MIT\",\n \"private\": false,\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/OpenHands/agent-canvas\"\n },\n \"homepage\": \"https://github.com/OpenHands/agent-canvas#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/OpenHands/agent-canvas/issues\"\n },\n \"bin\": {\n \"agent-canvas\": \"bin/agent-canvas.mjs\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"dependencies\": {\n \"@heroui/react\": \"2.8.10\",\n \"@microlink/react-json-view\": \"1.31.20\",\n \"@monaco-editor/react\": \"4.7.0\",\n \"@openhands/extensions\": \"git+https://github.com/OpenHands/extensions.git#b8c1869ec9dea4467bb27d5754dc695d14e27889\",\n \"@openhands/typescript-client\": \"1.23.3\",\n \"@react-router/node\": \"7.14.2\",\n \"@react-router/serve\": \"7.14.2\",\n \"@tailwindcss/vite\": \"4.2.4\",\n \"@tanstack/react-query\": \"5.100.9\",\n \"@types/shell-quote\": \"^1.7.5\",\n \"@uidotdev/usehooks\": \"2.4.1\",\n \"@xterm/addon-fit\": \"0.11.0\",\n \"@xterm/xterm\": \"6.0.0\",\n \"axios\": \"1.16.0\",\n \"class-variance-authority\": \"0.7.1\",\n \"clsx\": \"2.1.1\",\n \"downshift\": \"9.3.2\",\n \"framer-motion\": \"12.38.0\",\n \"i18next\": \"26.0.8\",\n \"i18next-browser-languagedetector\": \"8.2.1\",\n \"i18next-http-backend\": \"4.0.0\",\n \"isbot\": \"5.1.39\",\n \"lucide-react\": \"1.14.0\",\n \"monaco-editor\": \"0.55.1\",\n \"posthog-js\": \"1.372.6\",\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-hot-toast\": \"2.6.0\",\n \"react-i18next\": \"17.0.6\",\n \"react-icons\": \"5.6.0\",\n \"react-markdown\": \"10.1.0\",\n \"react-router\": \"7.14.2\",\n \"react-syntax-highlighter\": \"16.1.1\",\n \"rehype-raw\": \"7.0.0\",\n \"rehype-sanitize\": \"6.0.0\",\n \"remark-breaks\": \"4.0.0\",\n \"remark-gfm\": \"4.0.1\",\n \"shell-quote\": \"^1.8.3\",\n \"sirv-cli\": \"3.0.1\",\n \"socket.io-client\": \"4.8.3\",\n \"tailwind-merge\": \"3.5.0\",\n \"tailwind-scrollbar\": \"4.0.2\",\n \"unist-util-visit\": \"5.1.0\",\n \"uuid\": \"14.0.0\",\n \"vite\": \"8.0.10\",\n \"zustand\": \"5.0.12\"\n },\n \"scripts\": {\n \"dev\": \"node --env-file-if-exists=.env scripts/dev-with-automation.mjs\",\n \"dev:static\": \"node --env-file-if-exists=.env scripts/dev-static.mjs\",\n \"dev:extra-backend\": \"node --env-file-if-exists=.env scripts/dev-extra-backend.mjs\",\n \"dev:minimal\": \"node --env-file-if-exists=.env scripts/dev-safe.mjs\",\n \"dev:frontend\": \"npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev\",\n \"dev:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev\",\n \"build\": \"npm run build:app\",\n \"build:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router build\",\n \"start\": \"npx sirv-cli build/ --single\",\n \"test\": \"npm run make-i18n && vitest run\",\n \"test:e2e\": \"playwright test --pass-with-no-tests\",\n \"test:e2e:live\": \"node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs\",\n \"test:e2e:snapshots\": \"playwright test tests/e2e/snapshots --project=chromium --retries=0\",\n \"test:e2e:snapshots:update\": \"playwright test tests/e2e/snapshots --project=chromium --update-snapshots\",\n \"test:coverage\": \"npm run make-i18n && vitest run --coverage\",\n \"dev_wsl\": \"VITE_WATCH_USE_POLLING=true vite\",\n \"preview\": \"vite preview\",\n \"make-i18n\": \"node scripts/make-i18n-translations.cjs\",\n \"prelint\": \"npm run make-i18n\",\n \"lint\": \"npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}\",\n \"lint:fix\": \"eslint src --fix && prettier --write src/**/*.{ts,tsx}\",\n \"prepare\": \"husky\",\n \"typecheck\": \"react-router typegen && tsc\",\n \"typecheck:staged\": \"react-router typegen && npx tsc --noEmit --skipLibCheck\",\n \"check-translation-completeness\": \"node scripts/check-translation-completeness.cjs\",\n \"build:app\": \"npm run make-i18n && react-router build\",\n \"build:lib\": \"npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json\",\n \"build:docker\": \"node scripts/docker-build.mjs\"\n },\n \"lint-staged\": {\n \"src/**/*.{ts,tsx,js}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"src/**/*.{ts,tsx}\": [\n \"bash -c 'npm run typecheck:staged'\"\n ],\n \"src/**/*\": [\n \"npm run check-translation-completeness\"\n ]\n },\n \"devDependencies\": {\n \"@eslint/eslintrc\": \"3.3.1\",\n \"@eslint/js\": \"9.39.4\",\n \"@mswjs/socket.io-binding\": \"0.2.0\",\n \"@playwright/test\": \"1.59.1\",\n \"@react-router/dev\": \"7.14.2\",\n \"@tailwindcss/typography\": \"0.5.19\",\n \"@tanstack/eslint-plugin-query\": \"5.100.9\",\n \"@testing-library/dom\": \"10.4.1\",\n \"@testing-library/jest-dom\": \"6.9.1\",\n \"@testing-library/react\": \"16.3.2\",\n \"@testing-library/user-event\": \"14.6.1\",\n \"@types/mdast\": \"4.0.4\",\n \"@types/node\": \"25.6.0\",\n \"@types/react\": \"19.2.14\",\n \"@types/react-dom\": \"19.2.3\",\n \"@types/react-syntax-highlighter\": \"15.5.13\",\n \"@typescript-eslint/eslint-plugin\": \"8.59.2\",\n \"@typescript-eslint/parser\": \"8.59.2\",\n \"@vercel/react-router\": \"1.3.0\",\n \"@vitest/coverage-v8\": \"4.1.5\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.4\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-i18next\": \"6.1.4\",\n \"eslint-plugin-import-x\": \"4.16.2\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"eslint-plugin-prettier\": \"5.5.5\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-react-hooks\": \"7.1.1\",\n \"eslint-plugin-unused-imports\": \"4.4.1\",\n \"globals\": \"16.5.0\",\n \"husky\": \"9.1.7\",\n \"jsdom\": \"29.1.1\",\n \"lint-staged\": \"16.4.0\",\n \"msw\": \"2.14.2\",\n \"postcss-prefix-selector\": \"2.1.1\",\n \"prettier\": \"3.8.3\",\n \"tailwindcss\": \"4.2.4\",\n \"typescript\": \"6.0.3\",\n \"vite-plugin-svgr\": \"5.2.0\",\n \"vitest\": \"4.1.5\"\n },\n \"packageManager\": \"npm@10.5.0\",\n \"volta\": {\n \"node\": \"22.12.0\"\n },\n \"msw\": {\n \"workerDirectory\": [\n \"public\"\n ]\n },\n \"overrides\": {\n \"dompurify\": \"3.3.2\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\",\n \"bin\",\n \"build\",\n \"scripts\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./browser\": {\n \"types\": \"./dist/components/browser/index.d.ts\",\n \"import\": \"./dist/components/browser/index.js\",\n \"require\": \"./dist/components/browser/index.cjs\"\n },\n \"./conversation\": {\n \"types\": \"./dist/components/conversation/index.d.ts\",\n \"import\": \"./dist/components/conversation/index.js\",\n \"require\": \"./dist/components/conversation/index.cjs\"\n },\n \"./files\": {\n \"types\": \"./dist/components/files/index.d.ts\",\n \"import\": \"./dist/components/files/index.js\",\n \"require\": \"./dist/components/files/index.cjs\"\n },\n \"./settings\": {\n \"types\": \"./dist/components/settings/index.d.ts\",\n \"import\": \"./dist/components/settings/index.js\",\n \"require\": \"./dist/components/settings/index.cjs\"\n },\n \"./sidebar\": {\n \"types\": \"./dist/components/sidebar/index.d.ts\",\n \"import\": \"./dist/components/sidebar/index.js\",\n \"require\": \"./dist/components/sidebar/index.cjs\"\n },\n \"./terminal\": {\n \"types\": \"./dist/components/terminal/index.d.ts\",\n \"import\": \"./dist/components/terminal/index.js\",\n \"require\": \"./dist/components/terminal/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.js\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"peerDependencies\": {\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-router\": \"7.14.2\"\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./_virtual/_rolldown/runtime.cjs`);const e=require(`./i18n/declaration.cjs`),t=require(`./i18n/index.cjs`),
|
|
1
|
+
require(`./_virtual/_rolldown/runtime.cjs`);const e=require(`./i18n/declaration.cjs`),t=require(`./api/backend-registry/health-store.cjs`),n=require(`./i18n/index.cjs`),r=require(`./utils/custom-toast-handlers.cjs`),i=require(`./node_modules/@tanstack/query-core/build/modern/mutationCache.cjs`),a=require(`./node_modules/@tanstack/query-core/build/modern/queryCache.cjs`),o=require(`./node_modules/@tanstack/query-core/build/modern/queryClient.cjs`),s=require(`./utils/retrieve-axios-error-message.cjs`);var c=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},l=new Set,u=()=>{let u=new o.QueryClient({queryCache:new a.QueryCache({onSuccess:(e,n)=>{let r=n.meta?.backendId??n.options.meta?.backendId;typeof r==`string`&&t.recordBackendSuccess(r)},onError:(t,i)=>{if(i.queryKey[0]===`user`&&i.queryKey[1]===`authenticated`||c(t,u),!(i.meta?.disableToast??i.options.meta?.disableToast)){let i=s.retrieveAxiosErrorMessage(t);l.has(i||``)||(r.displayErrorToast(i||n.default.t(e.I18nKey.ERROR$GENERIC)),l.add(i||``),setTimeout(()=>{l.delete(i||``)},3e3))}}}),mutationCache:new i.MutationCache({onError:(t,i,a,o)=>{c(t,u),(o?.meta?.disableToast??o?.options.meta?.disableToast)||r.displayErrorToast(s.retrieveAxiosErrorMessage(t)||n.default.t(e.I18nKey.ERROR$GENERIC))}})});return u},d=null,f=null,p=()=>(d||=u(),d),m=()=>f??p(),h=e=>(f=e??p(),f),g=new Proxy({},{get:(e,t)=>{let n=m(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=m();return Reflect.set(r,t,n,r)}});exports.createAgentServerQueryClient=u,exports.getDefaultQueryClient=p,exports.getQueryClient=m,exports.queryClient=g,exports.setQueryClient=h;
|
|
2
2
|
//# sourceMappingURL=query-client-config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-client-config.cjs","names":[],"sources":["../src/query-client-config.ts"],"sourcesContent":["import { QueryCache, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { AxiosError } from \"axios\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"./i18n/declaration\";\nimport { retrieveAxiosErrorMessage } from \"./utils/retrieve-axios-error-message\";\nimport { displayErrorToast } from \"./utils/custom-toast-handlers\";\n\nconst handle401Error = (error: AxiosError, client: QueryClient) => {\n if (error?.response?.status === 401 || error?.status === 401) {\n client.invalidateQueries({ queryKey: [\"user\", \"authenticated\"] });\n }\n};\n\nconst shownErrors = new Set<string>();\n\nexport const createAgentServerQueryClient = () => {\n const client = new QueryClient({\n queryCache: new QueryCache({\n onError: (error, query) => {\n const isAuthQuery =\n query.queryKey[0] === \"user\" && query.queryKey[1] === \"authenticated\";\n if (!isAuthQuery) {\n handle401Error(error, client);\n }\n\n const disableToast =\n query.meta?.disableToast ?? query.options.meta?.disableToast;\n\n if (!disableToast) {\n const errorMessage = retrieveAxiosErrorMessage(error);\n\n if (!shownErrors.has(errorMessage || \"\")) {\n displayErrorToast(errorMessage || i18n.t(I18nKey.ERROR$GENERIC));\n shownErrors.add(errorMessage || \"\");\n\n setTimeout(() => {\n shownErrors.delete(errorMessage || \"\");\n }, 3000);\n }\n }\n },\n }),\n mutationCache: new MutationCache({\n onError: (error, _, __, mutation) => {\n handle401Error(error, client);\n\n const disableToast =\n mutation?.meta?.disableToast ?? mutation?.options.meta?.disableToast;\n\n if (!disableToast) {\n const message = retrieveAxiosErrorMessage(error);\n displayErrorToast(message || i18n.t(I18nKey.ERROR$GENERIC));\n }\n },\n }),\n });\n\n return client;\n};\n\nlet defaultQueryClient: QueryClient | null = null;\nlet activeQueryClient: QueryClient | null = null;\n\nexport const getDefaultQueryClient = () => {\n if (!defaultQueryClient) {\n defaultQueryClient = createAgentServerQueryClient();\n if (import.meta.env.DEV || import.meta.env.VITE_MOCK_API === \"true\") {\n (\n window as unknown as { __OH_QUERY_CLIENT__?: typeof defaultQueryClient }\n ).__OH_QUERY_CLIENT__ = defaultQueryClient;\n }\n }\n\n return defaultQueryClient;\n};\n\nexport const getQueryClient = () =>\n activeQueryClient ?? getDefaultQueryClient();\n\nexport const setQueryClient = (client?: QueryClient | null) => {\n activeQueryClient = client ?? getDefaultQueryClient();\n return activeQueryClient;\n};\n\nexport const queryClient = new Proxy({} as QueryClient, {\n get: (_target, prop) => {\n const client = getQueryClient();\n const value = Reflect.get(client, prop, client);\n return typeof value === \"function\" ? value.bind(client) : value;\n },\n set: (_target, prop, value) => {\n const client = getQueryClient();\n return Reflect.set(client, prop, value, client);\n },\n}) as QueryClient;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"query-client-config.cjs","names":[],"sources":["../src/query-client-config.ts"],"sourcesContent":["import { QueryCache, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { AxiosError } from \"axios\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"./i18n/declaration\";\nimport { retrieveAxiosErrorMessage } from \"./utils/retrieve-axios-error-message\";\nimport { displayErrorToast } from \"./utils/custom-toast-handlers\";\nimport { recordBackendSuccess } from \"#/api/backend-registry/health-store\";\n\nconst handle401Error = (error: AxiosError, client: QueryClient) => {\n if (error?.response?.status === 401 || error?.status === 401) {\n client.invalidateQueries({ queryKey: [\"user\", \"authenticated\"] });\n }\n};\n\nconst shownErrors = new Set<string>();\n\nexport const createAgentServerQueryClient = () => {\n const client = new QueryClient({\n queryCache: new QueryCache({\n onSuccess: (_data, query) => {\n const backendId =\n query.meta?.backendId ?? query.options.meta?.backendId;\n if (typeof backendId === \"string\") {\n recordBackendSuccess(backendId);\n }\n },\n onError: (error, query) => {\n const isAuthQuery =\n query.queryKey[0] === \"user\" && query.queryKey[1] === \"authenticated\";\n if (!isAuthQuery) {\n handle401Error(error, client);\n }\n\n const disableToast =\n query.meta?.disableToast ?? query.options.meta?.disableToast;\n\n if (!disableToast) {\n const errorMessage = retrieveAxiosErrorMessage(error);\n\n if (!shownErrors.has(errorMessage || \"\")) {\n displayErrorToast(errorMessage || i18n.t(I18nKey.ERROR$GENERIC));\n shownErrors.add(errorMessage || \"\");\n\n setTimeout(() => {\n shownErrors.delete(errorMessage || \"\");\n }, 3000);\n }\n }\n },\n }),\n mutationCache: new MutationCache({\n onError: (error, _, __, mutation) => {\n handle401Error(error, client);\n\n const disableToast =\n mutation?.meta?.disableToast ?? mutation?.options.meta?.disableToast;\n\n if (!disableToast) {\n const message = retrieveAxiosErrorMessage(error);\n displayErrorToast(message || i18n.t(I18nKey.ERROR$GENERIC));\n }\n },\n }),\n });\n\n return client;\n};\n\nlet defaultQueryClient: QueryClient | null = null;\nlet activeQueryClient: QueryClient | null = null;\n\nexport const getDefaultQueryClient = () => {\n if (!defaultQueryClient) {\n defaultQueryClient = createAgentServerQueryClient();\n if (import.meta.env.DEV || import.meta.env.VITE_MOCK_API === \"true\") {\n (\n window as unknown as { __OH_QUERY_CLIENT__?: typeof defaultQueryClient }\n ).__OH_QUERY_CLIENT__ = defaultQueryClient;\n }\n }\n\n return defaultQueryClient;\n};\n\nexport const getQueryClient = () =>\n activeQueryClient ?? getDefaultQueryClient();\n\nexport const setQueryClient = (client?: QueryClient | null) => {\n activeQueryClient = client ?? getDefaultQueryClient();\n return activeQueryClient;\n};\n\nexport const queryClient = new Proxy({} as QueryClient, {\n get: (_target, prop) => {\n const client = getQueryClient();\n const value = Reflect.get(client, prop, client);\n return typeof value === \"function\" ? value.bind(client) : value;\n },\n set: (_target, prop, value) => {\n const client = getQueryClient();\n return Reflect.set(client, prop, value, client);\n },\n}) as QueryClient;\n"],"mappings":"yfAQA,IAAM,GAAkB,EAAmB,IAAwB,EAC7D,GAAO,UAAU,SAAW,KAAO,GAAO,SAAW,MACvD,EAAO,kBAAkB,CAAE,SAAU,CAAC,OAAQ,gBAAgB,CAAE,CAAC,EAI/D,EAAc,IAAI,IAEX,MAAqC,CAChD,IAAM,EAAS,IAAI,EAAA,YAAY,CAC7B,WAAY,IAAI,EAAA,WAAW,CACzB,WAAY,EAAO,IAAU,CAC3B,IAAM,EACJ,EAAM,MAAM,WAAa,EAAM,QAAQ,MAAM,UAC3C,OAAO,GAAc,UACvB,EAAA,qBAAqB,EAAU,EAGnC,SAAU,EAAO,IAAU,CAUzB,GARE,EAAM,SAAS,KAAO,QAAU,EAAM,SAAS,KAAO,iBAEtD,EAAe,EAAO,EAAO,CAM3B,EAFF,EAAM,MAAM,cAAgB,EAAM,QAAQ,MAAM,cAE/B,CACjB,IAAM,EAAe,EAAA,0BAA0B,EAAM,CAEhD,EAAY,IAAI,GAAgB,GAAG,GACtC,EAAA,kBAAkB,GAAgB,EAAA,QAAK,EAAE,EAAA,QAAQ,cAAc,CAAC,CAChE,EAAY,IAAI,GAAgB,GAAG,CAEnC,eAAiB,CACf,EAAY,OAAO,GAAgB,GAAG,EACrC,IAAK,IAIf,CAAC,CACF,cAAe,IAAI,EAAA,cAAc,CAC/B,SAAU,EAAO,EAAG,EAAI,IAAa,CACnC,EAAe,EAAO,EAAO,EAG3B,GAAU,MAAM,cAAgB,GAAU,QAAQ,MAAM,eAIxD,EAAA,kBADgB,EAAA,0BAA0B,EACxB,EAAW,EAAA,QAAK,EAAE,EAAA,QAAQ,cAAc,CAAC,EAGhE,CAAC,CACH,CAAC,CAEF,OAAO,GAGL,EAAyC,KACzC,EAAwC,KAE/B,OACX,AACE,IAAqB,GAA8B,CAQ9C,GAGI,MACX,GAAqB,GAAuB,CAEjC,EAAkB,IAC7B,EAAoB,GAAU,GAAuB,CAC9C,GAGI,EAAc,IAAI,MAAM,EAAE,CAAiB,CACtD,KAAM,EAAS,IAAS,CACtB,IAAM,EAAS,GAAgB,CACzB,EAAQ,QAAQ,IAAI,EAAQ,EAAM,EAAO,CAC/C,OAAO,OAAO,GAAU,WAAa,EAAM,KAAK,EAAO,CAAG,GAE5D,KAAM,EAAS,EAAM,IAAU,CAC7B,IAAM,EAAS,GAAgB,CAC/B,OAAO,QAAQ,IAAI,EAAQ,EAAM,EAAO,EAAO,EAElD,CAAC"}
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
import { I18nKey as e } from "./i18n/declaration.js";
|
|
2
|
-
import t from "./
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { recordBackendSuccess as t } from "./api/backend-registry/health-store.js";
|
|
3
|
+
import n from "./i18n/index.js";
|
|
4
|
+
import { displayErrorToast as r } from "./utils/custom-toast-handlers.js";
|
|
5
|
+
import { MutationCache as i } from "./node_modules/@tanstack/query-core/build/modern/mutationCache.js";
|
|
6
|
+
import { QueryCache as a } from "./node_modules/@tanstack/query-core/build/modern/queryCache.js";
|
|
7
|
+
import { QueryClient as o } from "./node_modules/@tanstack/query-core/build/modern/queryClient.js";
|
|
8
|
+
import { retrieveAxiosErrorMessage as s } from "./utils/retrieve-axios-error-message.js";
|
|
8
9
|
//#region src/query-client-config.ts
|
|
9
|
-
var
|
|
10
|
+
var c = (e, t) => {
|
|
10
11
|
(e?.response?.status === 401 || e?.status === 401) && t.invalidateQueries({ queryKey: ["user", "authenticated"] });
|
|
11
|
-
},
|
|
12
|
-
let
|
|
13
|
-
queryCache: new
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
}, l = /* @__PURE__ */ new Set(), u = () => {
|
|
13
|
+
let u = new o({
|
|
14
|
+
queryCache: new a({
|
|
15
|
+
onSuccess: (e, n) => {
|
|
16
|
+
let r = n.meta?.backendId ?? n.options.meta?.backendId;
|
|
17
|
+
typeof r == "string" && t(r);
|
|
18
|
+
},
|
|
19
|
+
onError: (t, i) => {
|
|
20
|
+
if (i.queryKey[0] === "user" && i.queryKey[1] === "authenticated" || c(t, u), !(i.meta?.disableToast ?? i.options.meta?.disableToast)) {
|
|
21
|
+
let i = s(t);
|
|
22
|
+
l.has(i || "") || (r(i || n.t(e.ERROR$GENERIC)), l.add(i || ""), setTimeout(() => {
|
|
23
|
+
l.delete(i || "");
|
|
24
|
+
}, 3e3));
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
|
-
}
|
|
21
|
-
mutationCache: new
|
|
22
|
-
|
|
27
|
+
}),
|
|
28
|
+
mutationCache: new i({ onError: (t, i, a, o) => {
|
|
29
|
+
c(t, u), (o?.meta?.disableToast ?? o?.options.meta?.disableToast) || r(s(t) || n.t(e.ERROR$GENERIC));
|
|
23
30
|
} })
|
|
24
31
|
});
|
|
25
|
-
return
|
|
26
|
-
},
|
|
32
|
+
return u;
|
|
33
|
+
}, d = null, f = null, p = () => (d ||= u(), d), m = () => f ?? p(), h = (e) => (f = e ?? p(), f), g = new Proxy({}, {
|
|
27
34
|
get: (e, t) => {
|
|
28
|
-
let n =
|
|
35
|
+
let n = m(), r = Reflect.get(n, t, n);
|
|
29
36
|
return typeof r == "function" ? r.bind(n) : r;
|
|
30
37
|
},
|
|
31
38
|
set: (e, t, n) => {
|
|
32
|
-
let r =
|
|
39
|
+
let r = m();
|
|
33
40
|
return Reflect.set(r, t, n, r);
|
|
34
41
|
}
|
|
35
42
|
});
|
|
36
43
|
//#endregion
|
|
37
|
-
export {
|
|
44
|
+
export { u as createAgentServerQueryClient, p as getDefaultQueryClient, m as getQueryClient, g as queryClient, h as setQueryClient };
|
|
38
45
|
|
|
39
46
|
//# sourceMappingURL=query-client-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-client-config.js","names":[],"sources":["../src/query-client-config.ts"],"sourcesContent":["import { QueryCache, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { AxiosError } from \"axios\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"./i18n/declaration\";\nimport { retrieveAxiosErrorMessage } from \"./utils/retrieve-axios-error-message\";\nimport { displayErrorToast } from \"./utils/custom-toast-handlers\";\n\nconst handle401Error = (error: AxiosError, client: QueryClient) => {\n if (error?.response?.status === 401 || error?.status === 401) {\n client.invalidateQueries({ queryKey: [\"user\", \"authenticated\"] });\n }\n};\n\nconst shownErrors = new Set<string>();\n\nexport const createAgentServerQueryClient = () => {\n const client = new QueryClient({\n queryCache: new QueryCache({\n onError: (error, query) => {\n const isAuthQuery =\n query.queryKey[0] === \"user\" && query.queryKey[1] === \"authenticated\";\n if (!isAuthQuery) {\n handle401Error(error, client);\n }\n\n const disableToast =\n query.meta?.disableToast ?? query.options.meta?.disableToast;\n\n if (!disableToast) {\n const errorMessage = retrieveAxiosErrorMessage(error);\n\n if (!shownErrors.has(errorMessage || \"\")) {\n displayErrorToast(errorMessage || i18n.t(I18nKey.ERROR$GENERIC));\n shownErrors.add(errorMessage || \"\");\n\n setTimeout(() => {\n shownErrors.delete(errorMessage || \"\");\n }, 3000);\n }\n }\n },\n }),\n mutationCache: new MutationCache({\n onError: (error, _, __, mutation) => {\n handle401Error(error, client);\n\n const disableToast =\n mutation?.meta?.disableToast ?? mutation?.options.meta?.disableToast;\n\n if (!disableToast) {\n const message = retrieveAxiosErrorMessage(error);\n displayErrorToast(message || i18n.t(I18nKey.ERROR$GENERIC));\n }\n },\n }),\n });\n\n return client;\n};\n\nlet defaultQueryClient: QueryClient | null = null;\nlet activeQueryClient: QueryClient | null = null;\n\nexport const getDefaultQueryClient = () => {\n if (!defaultQueryClient) {\n defaultQueryClient = createAgentServerQueryClient();\n if (import.meta.env.DEV || import.meta.env.VITE_MOCK_API === \"true\") {\n (\n window as unknown as { __OH_QUERY_CLIENT__?: typeof defaultQueryClient }\n ).__OH_QUERY_CLIENT__ = defaultQueryClient;\n }\n }\n\n return defaultQueryClient;\n};\n\nexport const getQueryClient = () =>\n activeQueryClient ?? getDefaultQueryClient();\n\nexport const setQueryClient = (client?: QueryClient | null) => {\n activeQueryClient = client ?? getDefaultQueryClient();\n return activeQueryClient;\n};\n\nexport const queryClient = new Proxy({} as QueryClient, {\n get: (_target, prop) => {\n const client = getQueryClient();\n const value = Reflect.get(client, prop, client);\n return typeof value === \"function\" ? value.bind(client) : value;\n },\n set: (_target, prop, value) => {\n const client = getQueryClient();\n return Reflect.set(client, prop, value, client);\n },\n}) as QueryClient;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"query-client-config.js","names":[],"sources":["../src/query-client-config.ts"],"sourcesContent":["import { QueryCache, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { AxiosError } from \"axios\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"./i18n/declaration\";\nimport { retrieveAxiosErrorMessage } from \"./utils/retrieve-axios-error-message\";\nimport { displayErrorToast } from \"./utils/custom-toast-handlers\";\nimport { recordBackendSuccess } from \"#/api/backend-registry/health-store\";\n\nconst handle401Error = (error: AxiosError, client: QueryClient) => {\n if (error?.response?.status === 401 || error?.status === 401) {\n client.invalidateQueries({ queryKey: [\"user\", \"authenticated\"] });\n }\n};\n\nconst shownErrors = new Set<string>();\n\nexport const createAgentServerQueryClient = () => {\n const client = new QueryClient({\n queryCache: new QueryCache({\n onSuccess: (_data, query) => {\n const backendId =\n query.meta?.backendId ?? query.options.meta?.backendId;\n if (typeof backendId === \"string\") {\n recordBackendSuccess(backendId);\n }\n },\n onError: (error, query) => {\n const isAuthQuery =\n query.queryKey[0] === \"user\" && query.queryKey[1] === \"authenticated\";\n if (!isAuthQuery) {\n handle401Error(error, client);\n }\n\n const disableToast =\n query.meta?.disableToast ?? query.options.meta?.disableToast;\n\n if (!disableToast) {\n const errorMessage = retrieveAxiosErrorMessage(error);\n\n if (!shownErrors.has(errorMessage || \"\")) {\n displayErrorToast(errorMessage || i18n.t(I18nKey.ERROR$GENERIC));\n shownErrors.add(errorMessage || \"\");\n\n setTimeout(() => {\n shownErrors.delete(errorMessage || \"\");\n }, 3000);\n }\n }\n },\n }),\n mutationCache: new MutationCache({\n onError: (error, _, __, mutation) => {\n handle401Error(error, client);\n\n const disableToast =\n mutation?.meta?.disableToast ?? mutation?.options.meta?.disableToast;\n\n if (!disableToast) {\n const message = retrieveAxiosErrorMessage(error);\n displayErrorToast(message || i18n.t(I18nKey.ERROR$GENERIC));\n }\n },\n }),\n });\n\n return client;\n};\n\nlet defaultQueryClient: QueryClient | null = null;\nlet activeQueryClient: QueryClient | null = null;\n\nexport const getDefaultQueryClient = () => {\n if (!defaultQueryClient) {\n defaultQueryClient = createAgentServerQueryClient();\n if (import.meta.env.DEV || import.meta.env.VITE_MOCK_API === \"true\") {\n (\n window as unknown as { __OH_QUERY_CLIENT__?: typeof defaultQueryClient }\n ).__OH_QUERY_CLIENT__ = defaultQueryClient;\n }\n }\n\n return defaultQueryClient;\n};\n\nexport const getQueryClient = () =>\n activeQueryClient ?? getDefaultQueryClient();\n\nexport const setQueryClient = (client?: QueryClient | null) => {\n activeQueryClient = client ?? getDefaultQueryClient();\n return activeQueryClient;\n};\n\nexport const queryClient = new Proxy({} as QueryClient, {\n get: (_target, prop) => {\n const client = getQueryClient();\n const value = Reflect.get(client, prop, client);\n return typeof value === \"function\" ? value.bind(client) : value;\n },\n set: (_target, prop, value) => {\n const client = getQueryClient();\n return Reflect.set(client, prop, value, client);\n },\n}) as QueryClient;\n"],"mappings":";;;;;;;;;AAQA,IAAM,KAAkB,GAAmB,MAAwB;AACjE,EAAI,GAAO,UAAU,WAAW,OAAO,GAAO,WAAW,QACvD,EAAO,kBAAkB,EAAE,UAAU,CAAC,QAAQ,gBAAgB,EAAE,CAAC;GAI/D,oBAAc,IAAI,KAAa,EAExB,UAAqC;CAChD,IAAM,IAAS,IAAI,EAAY;EAC7B,YAAY,IAAI,EAAW;GACzB,YAAY,GAAO,MAAU;IAC3B,IAAM,IACJ,EAAM,MAAM,aAAa,EAAM,QAAQ,MAAM;AAC/C,IAAI,OAAO,KAAc,YACvB,EAAqB,EAAU;;GAGnC,UAAU,GAAO,MAAU;AAUzB,QARE,EAAM,SAAS,OAAO,UAAU,EAAM,SAAS,OAAO,mBAEtD,EAAe,GAAO,EAAO,EAM3B,EAFF,EAAM,MAAM,gBAAgB,EAAM,QAAQ,MAAM,eAE/B;KACjB,IAAM,IAAe,EAA0B,EAAM;AAErD,KAAK,EAAY,IAAI,KAAgB,GAAG,KACtC,EAAkB,KAAgB,EAAK,EAAE,EAAQ,cAAc,CAAC,EAChE,EAAY,IAAI,KAAgB,GAAG,EAEnC,iBAAiB;AACf,QAAY,OAAO,KAAgB,GAAG;QACrC,IAAK;;;GAIf,CAAC;EACF,eAAe,IAAI,EAAc,EAC/B,UAAU,GAAO,GAAG,GAAI,MAAa;AAMnC,GALA,EAAe,GAAO,EAAO,GAG3B,GAAU,MAAM,gBAAgB,GAAU,QAAQ,MAAM,iBAIxD,EADgB,EAA0B,EACxB,IAAW,EAAK,EAAE,EAAQ,cAAc,CAAC;KAGhE,CAAC;EACH,CAAC;AAEF,QAAO;GAGL,IAAyC,MACzC,IAAwC,MAE/B,WACX,AACE,MAAqB,GAA8B,EAQ9C,IAGI,UACX,KAAqB,GAAuB,EAEjC,KAAkB,OAC7B,IAAoB,KAAU,GAAuB,EAC9C,IAGI,IAAc,IAAI,MAAM,EAAE,EAAiB;CACtD,MAAM,GAAS,MAAS;EACtB,IAAM,IAAS,GAAgB,EACzB,IAAQ,QAAQ,IAAI,GAAQ,GAAM,EAAO;AAC/C,SAAO,OAAO,KAAU,aAAa,EAAM,KAAK,EAAO,GAAG;;CAE5D,MAAM,GAAS,GAAM,MAAU;EAC7B,IAAM,IAAS,GAAgB;AAC/B,SAAO,QAAQ,IAAI,GAAQ,GAAM,GAAO,EAAO;;CAElD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openhands/agent-canvas",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "Agent Canvas UI for OpenHands - run AI coding agents with a visual interface",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@heroui/react": "2.8.10",
|
|
24
24
|
"@microlink/react-json-view": "1.31.20",
|
|
25
25
|
"@monaco-editor/react": "4.7.0",
|
|
26
|
-
"@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#
|
|
27
|
-
"@openhands/typescript-client": "
|
|
26
|
+
"@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#b8c1869ec9dea4467bb27d5754dc695d14e27889",
|
|
27
|
+
"@openhands/typescript-client": "1.23.3",
|
|
28
28
|
"@react-router/node": "7.14.2",
|
|
29
29
|
"@react-router/serve": "7.14.2",
|
|
30
30
|
"@tailwindcss/vite": "4.2.4",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Usage:
|
|
21
21
|
* node scripts/check-sdk-version-sync.mjs
|
|
22
|
-
* EXPECTED_SDK_VERSION=1.23.
|
|
22
|
+
* EXPECTED_SDK_VERSION=1.23.1 node scripts/check-sdk-version-sync.mjs
|
|
23
23
|
* node scripts/check-sdk-version-sync.mjs --check-pypi
|
|
24
24
|
*
|
|
25
25
|
* Environment variables:
|
|
@@ -79,7 +79,7 @@ Triggering from other repos:
|
|
|
79
79
|
-H "Authorization: token \$GITHUB_TOKEN" \\
|
|
80
80
|
-H "Accept: application/vnd.github.v3+json" \\
|
|
81
81
|
https://api.github.com/repos/OpenHands/agent-canvas/dispatches \\
|
|
82
|
-
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.23.
|
|
82
|
+
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.23.1"}}'
|
|
83
83
|
`);
|
|
84
84
|
process.exit(0);
|
|
85
85
|
}
|
|
@@ -268,9 +268,9 @@ async function fetchPyPIDependencies(packageName, version) {
|
|
|
268
268
|
* Parse PyPI requires_dist array and extract SDK package versions
|
|
269
269
|
*
|
|
270
270
|
* PyPI returns dependencies in PEP 508 format like:
|
|
271
|
-
* "openhands-sdk>=1.23.
|
|
272
|
-
* "openhands-tools==1.23.
|
|
273
|
-
* "openhands-workspace (>=1.23.
|
|
271
|
+
* "openhands-sdk>=1.23.1,<2.0.0"
|
|
272
|
+
* "openhands-tools==1.23.1"
|
|
273
|
+
* "openhands-workspace (>=1.23.1)"
|
|
274
274
|
*/
|
|
275
275
|
function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
276
276
|
const versions = {};
|
|
@@ -284,7 +284,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
// Extract the version number - look for patterns like:
|
|
287
|
-
// ">=1.23.
|
|
287
|
+
// ">=1.23.1", "==1.23.1", "(>=1.23.1)", "~=1.23.1"
|
|
288
288
|
// After the package name and before any comma or closing paren
|
|
289
289
|
const versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;
|
|
290
290
|
const match = dep.match(versionPattern);
|
package/scripts/dev-safe.mjs
CHANGED
|
@@ -337,7 +337,7 @@ export function validateFrontendDependencies(
|
|
|
337
337
|
* edits are picked up without a manual reinstall. The agent-server itself
|
|
338
338
|
* is rebuilt from local source on each invocation (--reinstall).
|
|
339
339
|
* - OH_AGENT_SERVER_GIT_REF: Git commit SHA or branch name
|
|
340
|
-
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.23.
|
|
340
|
+
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.23.1")
|
|
341
341
|
*
|
|
342
342
|
* If none are set, defaults to the released version specified by
|
|
343
343
|
* DEFAULT_AGENT_SERVER_VERSION. Set OH_AGENT_SERVER_GIT_REF to use a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./declaration-C9nuq2Dj.js";var t=`cli-generic`,n=new Set([`default`,`default (recommended)`]);function r(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||n.has(t.toLowerCase())||t===`acp-managed`?null:t}function i(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=r(t);if(e)return e}return e.providerDefault??null}var a=[{key:`claude-code`,display_name:`Claude Code`,default_command:[`npx`,`-y`,`@agentclientprotocol/claude-agent-acp`],available_models:[{id:`claude-opus-4-7`,label:`Claude Opus 4.7`},{id:`claude-opus-4-6`,label:`Claude Opus 4.6`},{id:`opus[1m]`,label:`Claude Opus (1M)`},{id:`claude-opus-4-5`,label:`Claude Opus 4.5`},{id:`claude-opus-4-1-20250805`,label:`Claude Opus 4.1`},{id:`claude-sonnet-4-6`,label:`Claude Sonnet 4.6`},{id:`sonnet[1m]`,label:`Claude Sonnet (1M)`},{id:`claude-sonnet-4-5`,label:`Claude Sonnet 4.5`},{id:`claude-haiku-4-5`,label:`Claude Haiku 4.5`},{id:`opusplan`,label:`Opus (plan) + Sonnet (execute)`}],default_model:`claude-opus-4-7`,description_key:e.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION,icon:`claude-code`},{key:`codex`,display_name:`Codex`,default_command:[`npx`,`-y`,`@zed-industries/codex-acp`],available_models:[{id:`gpt-5.5/low`,label:`GPT-5.5 (low)`},{id:`gpt-5.5/medium`,label:`GPT-5.5 (medium)`},{id:`gpt-5.5/high`,label:`GPT-5.5 (high)`},{id:`gpt-5.5/xhigh`,label:`GPT-5.5 (xhigh)`},{id:`gpt-5.4/low`,label:`GPT-5.4 (low)`},{id:`gpt-5.4/medium`,label:`GPT-5.4 (medium)`},{id:`gpt-5.4/high`,label:`GPT-5.4 (high)`},{id:`gpt-5.4/xhigh`,label:`GPT-5.4 (xhigh)`},{id:`gpt-5.4-mini/low`,label:`GPT-5.4 Mini (low)`},{id:`gpt-5.4-mini/medium`,label:`GPT-5.4 Mini (medium)`},{id:`gpt-5.4-mini/high`,label:`GPT-5.4 Mini (high)`},{id:`gpt-5.4-mini/xhigh`,label:`GPT-5.4 Mini (xhigh)`},{id:`gpt-5.3-codex/low`,label:`GPT-5.3 Codex (low)`},{id:`gpt-5.3-codex/medium`,label:`GPT-5.3 Codex (medium)`},{id:`gpt-5.3-codex/high`,label:`GPT-5.3 Codex (high)`},{id:`gpt-5.3-codex/xhigh`,label:`GPT-5.3 Codex (xhigh)`},{id:`gpt-5.2/low`,label:`GPT-5.2 (low)`},{id:`gpt-5.2/medium`,label:`GPT-5.2 (medium)`},{id:`gpt-5.2/high`,label:`GPT-5.2 (high)`},{id:`gpt-5.2/xhigh`,label:`GPT-5.2 (xhigh)`}],default_model:`gpt-5.5/medium`,description_key:e.ONBOARDING$AGENT_CODEX_DESCRIPTION,icon:`codex`},{key:`gemini-cli`,display_name:`Gemini CLI`,default_command:[`npx`,`-y`,`@google/gemini-cli`,`--acp`],available_models:[{id:`auto-gemini-3`,label:`Auto (Gemini 3)`},{id:`auto-gemini-2.5`,label:`Auto (Gemini 2.5)`},{id:`gemini-3.1-pro-preview`,label:`Gemini 3.1 Pro (preview)`},{id:`gemini-3-flash-preview`,label:`Gemini 3 Flash (preview)`},{id:`gemini-3.1-flash-lite-preview`,label:`Gemini 3.1 Flash Lite (preview)`},{id:`gemini-2.5-pro`,label:`Gemini 2.5 Pro`},{id:`gemini-2.5-flash`,label:`Gemini 2.5 Flash`},{id:`gemini-2.5-flash-lite`,label:`Gemini 2.5 Flash Lite`}],default_model:`gemini-2.5-pro`,description_key:e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION,icon:`gemini`}],o=`custom`;function s(e){if(e)return a.find(t=>t.key===e)}function c(e){let t=s(e);return t?t.display_name:null}function l(e){return s(e)?.icon??`cli-generic`}function u(e,t){return t?s(e)?.available_models?.find(e=>e.id===t)?.label??t:null}function d(e,t={}){if(e===`openhands`)return{agent_kind:`openhands`};let n=e===o,r=n?void 0:s(e);if(!n&&!r&&!t.allowUnknownServer)return null;let i=t.model===void 0?r?.default_model??null:t.model;return{agent_kind:`acp`,acp_server:e,acp_command:t.command??[],acp_args:[],acp_model:i??null}}export{s as a,l as c,d as i,i as l,a as n,c as o,t as r,u as s,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{_ as r,d as i,f as a,h as o,l as s,m as c,p as l}from"./agent-server-client-options-BvlH7qGM.js";var u=e(t(),1),d=`openhands-backend-health`,f=500;function p(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.consecutiveFailures)&&t.consecutiveFailures>=0&&t.consecutiveFailures<=5&&(t.lastError===null||typeof t.lastError==`string`)&&(t.lastFailureAt===null||typeof t.lastFailureAt==`number`)&&typeof t.disabled==`boolean`}function m(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(d);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&e.length>0&&p(r)&&(n[e]=r);return n}catch{return{}}}function h(e){if(!(typeof window>`u`))try{if(Object.keys(e).length===0){window.localStorage.removeItem(d);return}window.localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){let t;return t=e instanceof Error?e.message||e.name||`Unknown error`:typeof e==`string`?e:`Unknown error`,t.length>f?`${t.slice(0,f)}…`:t}var _=m(),v=new Set;function y(){v.forEach(e=>e())}function b(e){_=e,h(e),y()}function x(){return _}function S(e){return v.add(e),()=>{v.delete(e)}}function C(e,t){let n=_[e],r=Math.min((n?.consecutiveFailures??0)+1,5),i=n?.disabled===!0||r>=5,a={consecutiveFailures:r,lastError:g(t),lastFailureAt:Date.now(),disabled:i};b({..._,[e]:a})}function w(e){if(!(e in _))return;let{[e]:t,...n}=_;b(n)}function T(e){if(!(e in _))return;let{[e]:t,...n}=_;b(n)}function E(e){if(!(e in _))return;let{[e]:t,...n}=_;b(n)}var D=n(),O=u.createContext(null);function k(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function A({children:e}){let t=u.useSyncExternalStore(o,a,a),n=u.useCallback((e,t)=>{let n=s()?.backendId??null,r=s()?.orgId??null,i=t??null;e===n&&i===r||l({backendId:e,orgId:i})},[]),r=u.useCallback(e=>{let t={...e,id:k()};return c([...i(),t]),l({backendId:t.id}),t},[]),d=u.useCallback((e,t)=>{let n=i().find(t=>t.id===e);c(i().map(n=>n.id===e?{...n,...t}:n));let r=t.host!==void 0&&n!==void 0&&t.host!==n.host,a=t.apiKey!==void 0&&n!==void 0&&t.apiKey!==n.apiKey;(r||a)&&T(e)},[]),f=u.useCallback(e=>{c(i().filter(t=>t.id!==e)),E(e)},[]),p=u.useMemo(()=>({backends:t.backends,active:t.active,setActive:n,addBackend:r,updateBackend:d,removeBackend:f}),[t,n,r,d,f]);return(0,D.jsx)(O.Provider,{value:p,children:e})}function j(){let e=u.useContext(O);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function M(){let e=u.useContext(O);return e?e.active:{backend:r(),orgId:null}}export{C as a,x as i,M as n,w as o,j as r,S as s,A as t};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-Dy7jaVk0.js","assets/rolldown-runtime-BFRubm34.js","assets/agent-server-client-options-BvlH7qGM.js","assets/settings-client-DjnapAI3.js","assets/proxy-3uQm0NJ9.js","assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-DFFy3NX_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./preload-helper-CT1Z6Pdu.js";import{C as t,S as n,c as r,i,t as a,u as o,y as s}from"./agent-server-client-options-BvlH7qGM.js";import{c,l,n as u,s as d,t as ee}from"./vendor~root-layout~home~conversation-panel~conversation~launch~automations-list~automation-~f57mv2f3-D6ItaxF-.js";import{t as f}from"./profiles-client-Cj9KHwuq.js";import{t as p}from"./agent-server-compatibility-DnXbX5aL.js";import{n as m,t as h}from"./proxy-3uQm0NJ9.js";import{t as g}from"./settings-D5am1n6X.js";import{t as te}from"./common-SMkEaBSr.js";import{a as _,l as v}from"./acp-providers-BhOEPsud.js";import{t as y}from"./settings-service.api-DfJwVvYA.js";var b=`openhands-agent-server-conversation-metadata`,x=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(b);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},S=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(b);return}window.localStorage.setItem(b,JSON.stringify(e))}},C=e=>x()[e]??null,w=(e,t)=>{let n=x();n[e]=t,S(n)},T=e=>{let t=x();e in t&&(delete t[e],S(t))};function E(e){if(!e?.id)return e;let t=C(e.id);return t?{...e,selected_repository:e.selected_repository??t.selected_repository??null,selected_branch:e.selected_branch??t.selected_branch??null,git_provider:e.git_provider??t.git_provider??null,selected_workspace:e.selected_workspace??t.selected_workspace??null}:e}function D(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}async function ne(e=20,t){let n=D(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await h({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>E(e)),next_page_id:i?.next_page_id??null}}async function O(e){if(e.length===0)return[];let t=D(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await h({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(E)}async function re(e){return await h({backend:D(),method:`POST`,path:`/api/v1/app-conversations`,body:e})}async function ie(e){return h({backend:D(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function ae(e){await h({backend:D(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function oe(e,t){return await h({backend:D(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function se(e){await h({backend:D(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function ce(e){await h({backend:D(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function le(e,t){let n=D(),r=new URLSearchParams;return r.append(`file_path`,t),await h({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function ue(e){let t=D(),n=new URLSearchParams;return n.set(`ids`,e),(await h({backend:t,method:`GET`,path:`/api/v1/app-conversations/start-tasks?${n.toString()}`}))?.[0]??null}var k=`canvas_ui`,de=`canvas_ui_tool`,fe=[`terminal`,`file_editor`,`task_tracker`,k],A=`browser_tool_set`,j=`task_tool_set`;function pe(){return!0}function me(){let e=(void 0)?.trim();if(!e)return null;try{let t=JSON.parse(e);return!t||typeof t!=`object`?null:t}catch{return null}}function he(){let e=me();if(!e?.services)return;let t=[];t.push(`<RUNTIME_SERVICES>`),e.mode?t.push(`You are running inside an agent-canvas dev stack started in '${e.mode}' mode.`):t.push(`You are running inside an agent-canvas dev stack.`),t.push(`The following services are reachable from your sandbox. URLs are written`,`from your point of view (i.e., as you should curl/fetch them).`,``);let{agent_server:n,ingress:r,automation:i}=e.services,a=e.services.frontend??e.services.vite;n?.url_from_agent&&t.push(`* Agent Server (you): ${n.url_from_agent}`,` ${n.description??`The agent-server hosting your tool calls.`}`),r?.url_from_agent&&t.push(`* Ingress: ${r.url_from_agent}`,` ${r.description??`Unified entry point for browser-facing traffic.`}`),a?.url_from_agent&&t.push(`* Frontend: ${a.url_from_agent}`,` ${a.description??`Frontend dev server.`}`),i?.url_from_agent?(t.push(`* Automation backend: ${i.url_from_agent}`,` ${i.description??`OpenHands Automations service.`}`),i.docs_url&&t.push(` Docs: ${i.docs_url}`),i.openapi_url&&t.push(` OpenAPI: ${i.openapi_url}`),i.auth_env_var&&t.push(` Auth: header 'X-API-Key: $${i.auth_env_var}'`)):t.push(`* Automation backend: not running in this dev mode (skip /api/automation calls).`);let o=n?.url_from_agent;return t.push(``,`Trust this block over guessing: do not assume any other URLs are running.`),o&&t.push(`In particular, ${o} inside your sandbox is the Agent Server`,`you are running inside of — NOT the automation backend.`),t.push(`</RUNTIME_SERVICES>`),t.join(`
|
|
3
|
-
`)}function ge(e){let{host:t}=a();return`${t}/api/conversations/${e}`}function M(e){return`Conversation ${e.slice(0,5)}`}function N(e){let t=C(e.id),r=e.agent?.kind===`ACPAgent`,i=r?e.tags?.acpserver??null:null;return{id:e.id,created_by_user_id:null,selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,title:e.title?.trim()?e.title:M(e.id),trigger:null,pr_number:[],agent_kind:r?`acp`:`openhands`,acp_server:i,llm_model:r?v({runtimeName:e.current_model_name,runtimeId:e.current_model_id,configured:e.agent?.acp_model,sdkLlm:e.agent?.llm?.model}):e.agent?.llm?.model??g.llm_model,metrics:e.metrics?{accumulated_cost:e.metrics.accumulated_cost??null,max_budget_per_task:e.metrics.max_budget_per_task??null,accumulated_token_usage:e.metrics.accumulated_token_usage?{prompt_tokens:e.metrics.accumulated_token_usage.prompt_tokens??0,completion_tokens:e.metrics.accumulated_token_usage.completion_tokens??0,cache_read_tokens:e.metrics.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:e.metrics.accumulated_token_usage.cache_write_tokens??0,context_window:e.metrics.accumulated_token_usage.context_window??0,per_turn_token:e.metrics.accumulated_token_usage.per_turn_token??0}:null}:null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??te.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:ge(e.id),session_api_key:a().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??n()},public:!1,sub_conversation_ids:[]}}function _e(e){return{items:e.items.map(N),next_page_id:e.next_page_id??null}}var P=[`acp_command`,`acp_args`,`acp_env`,`acp_model`,`acp_session_mode`,`acp_prompt_timeout`],ve=`acpserver`,F=new Set([`schema_version`,`agent_settings`,`workspace`,`conversation_id`,`initial_message`,`plugins`]);function I(e){return!e||typeof e!=`object`||Array.isArray(e)?{}:structuredClone(e)}function L(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function ye(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function be(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function xe(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function R(e,t){return e===A?pe()&&p(e):e===j?t.enable_sub_agents===!0&&p(e):!0}function Se(e){let t=new Map;for(let e of fe)t.set(e,{name:e,params:{}});for(let n of[A,j])R(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>xe(e)))for(let r of n)R(r.name,e)&&t.set(r.name,{name:r.name,params:I(r.params)});return Array.from(t.values())}function Ce(e,t){let n=[e?.trim(),t?.trim()].filter(Boolean);return n.length===0?null:{role:`user`,content:[{type:`text`,text:n.join(`
|
|
4
|
-
|
|
5
|
-
`)}],run:!0}}function z(e){let n=he();return{...I(e.agent_context),load_public_skills:t(),load_user_skills:!0,...n?{system_message_suffix:n}:{}}}function B(e){return I(e.agent_settings).agent_kind===`acp`}function we(e){let t=I(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function Te(e){let t=e.acp_command;if(!(Array.isArray(t)&&t.length===0)&&t!==void 0)return t;let n=_(typeof e.acp_server==`string`?e.acp_server:void 0);return n?[...n.default_command]:t}function Ee(e){let t=I(e.agent_settings),n={agent_kind:`acp`,agent_context:z(t)};for(let e of P){if(e===`acp_model`)continue;let r=e===`acp_command`?Te(t):t[e];r!=null&&(n[e]=r)}let r=_(typeof t.acp_server==`string`?t.acp_server:void 0),i=v({configured:t.acp_model,providerDefault:r?.default_model});return i&&(n.acp_model=i),n}function De(e){let t=I(e.agent_settings),n=I(t.llm);n.model=typeof n.model==`string`?n.model:g.llm_model;let r=L(n.api_key);r?n.api_key=r:delete n.api_key;let i=L(n.base_url);i?n.base_url=i:delete n.base_url;let a=I(t.mcp_config);(Object.keys(a).length===0||!(`mcpServers`in a))&&delete t.mcp_config,delete t.acp_server;for(let e of P)delete t[e];return{...t,llm:n,agent_context:z(t),tools:Se(t)}}function Oe(e){return B(e)?Ee(e):De(e)}function ke(e){let{settings:t,query:r,conversationInstructions:i,plugins:a,workingDir:o}=e,s=I(t.conversation_settings),c=Ce(r,i);return F.forEach(e=>delete s[e]),{...s,workspace:{kind:`LocalWorkspace`,working_dir:o??n()},...c?{initial_message:c}:{},...a?.length?{plugins:a.map(e=>({source:e.source,...e.ref?{ref:e.ref}:{},...e.repo_path?{repo_path:e.repo_path}:{}}))}:{}}}function Ae(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=B(t),r=Oe(t),i=n?we(t):void 0,a=ke(e.encryptedConversationSettings?{...e,settings:{...e.settings,conversation_settings:e.encryptedConversationSettings}}:e),s={agent_settings:r,workspace:a.workspace,confirmation_policy:ye(a),max_iterations:typeof a.max_iterations==`number`?a.max_iterations:500,stuck_detection:!0,autotitle:!0,worktree:!0};i&&(s.tags={[ve]:i}),e.secretsEncrypted&&(s.secrets_encrypted=!0),e.conversationId&&(s.conversation_id=e.conversationId);let c=be(a);if(c&&(s.security_analyzer=c),a.initial_message&&(s.initial_message=a.initial_message),a.plugins&&(s.plugins=a.plugins),a.hook_config&&(s.hook_config=a.hook_config),s.tool_module_qualnames={[k]:de,...a.tool_module_qualnames??{}},a.agent_definitions&&(s.agent_definitions=a.agent_definitions),e.customSecrets&&e.customSecrets.length>0){let t=m(o()),r={};for(let n of e.customSecrets){let e={kind:`LookupSecret`,url:`/api/settings/secrets/${encodeURIComponent(n.name)}`,description:n.description};Object.keys(t).length>0&&(e.headers=t),r[n.name]=e}s.secrets=r,n&&(s.agent_settings.agent_context={...s.agent_settings.agent_context,secrets:r})}return s}async function V(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-Dy7jaVk0.js`).then(e=>e.n);return{SecretsService:e}},__vite__mapDeps([0,1,2,3,4,5])),[r,i]=await Promise.all([y.getSettingsForConversation(),n.getSecrets()]),{agentSettings:a,conversationSettings:o,secretsEncrypted:s}=r;return Ae({...t,encryptedAgentSettings:a,encryptedConversationSettings:o,secretsEncrypted:s,customSecrets:i})}function je(){return{hooks:[]}}var Me=`1970-01-01T00:00:00.000Z`,Ne=`Unable to load conversations because the selected agent server returned data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`,Pe=`Unable to switch LLM profiles because the selected agent server returned profile data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`;function H(){return Error(Ne)}function U(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fe(e){return U(e)&&typeof e.model==`string`}function W(e){return typeof e==`number`?e:null}function G(e){return typeof e==`number`?e:0}function K(e){return typeof e==`string`?e:null}function q(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:Me}function Ie(e){return U(e)?{prompt_tokens:G(e.prompt_tokens),completion_tokens:G(e.completion_tokens),cache_read_tokens:G(e.cache_read_tokens),cache_write_tokens:G(e.cache_write_tokens),context_window:G(e.context_window),per_turn_token:G(e.per_turn_token)}:null}function J(e){return U(e)?{accumulated_cost:W(e.accumulated_cost),max_budget_per_task:W(e.max_budget_per_task),accumulated_token_usage:Ie(e.accumulated_token_usage)}:null}function Le(e){if(!U(e))return null;let t=U(e.llm)?{model:K(e.llm.model)}:null;return{kind:K(e.kind),acp_model:K(e.acp_model),llm:t}}function Re(e){return U(e)?{working_dir:K(e.working_dir)}:null}function ze(e){if(!U(e))return null;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function Y(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(n&&n!==`.`)if(n===`..`){if(!t.length)return null;t.pop()}else t.push(n);return`/${t.join(`/`)}`}function X(e,t){let n=Y(e),r=Y(t);if(!n||!r||n!==r&&!n.startsWith(`${r}/`))throw Error(`Conversation file path must stay inside the workspace`);return n}function Z(e){if(!U(e)||typeof e.id!=`string`||!e.id.trim())throw H();return{id:e.id.trim(),title:K(e.title),created_at:q(e,`created_at`,`createdAt`),updated_at:q(e,`updated_at`,`updatedAt`),execution_status:K(e.execution_status),sandbox_status:K(e.sandbox_status),metrics:J(e.metrics),agent:Le(e.agent),workspace:Re(e.workspace),tags:ze(e.tags),current_model_id:K(e.current_model_id),current_model_name:K(e.current_model_name)}}function Q(e){if(!Array.isArray(e))throw H();return e.map(Z)}function Be(e){if(Array.isArray(e))return{items:Q(e),next_page_id:null};if(!U(e))throw H();return{items:Q(e.items),next_page_id:typeof e.next_page_id==`string`?e.next_page_id:null}}var Ve=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function He(e){let t=e??`idle`;return Ve.has(t)?t:`idle`}function $(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var Ue=class{static async sendMessage(e,t,n){let o=r().backend,s=n?.conversationUrl??null,c=n?.sessionApiKey??null;if(o.kind===`cloud`){if(!s||!c){let[t]=await O([e]);s=t?.conversation_url?.trim()??null,c=t?.session_api_key?.trim()??null}if(!s||!c)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await h({backend:o,method:`POST`,hostOverride:i(s),path:`/api/conversations/${e}/events`,body:{...t,run:!0},authMode:`session-api-key`,sessionApiKey:c}),t}return await new l(a({conversationUrl:s,sessionApiKey:c})).sendEvent(e,t,{run:!0}),t}static async createConversation(e,t,n,i,c,u,d,f){if(r().backend.kind===`cloud`)return re({initial_message:e?{role:`user`,content:[{type:`text`,text:e}]}:null,title:t??null,selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,plugins:n??null,parent_conversation_id:u??null,agent_type:d,sandbox_id:f??null});let p=await y.getSettings(),m=ee(),h=await V({settings:p,query:e,conversationInstructions:t,plugins:n,conversationId:m,workingDir:c??s(m)}),g=await new l(a()).createConversation(h);return(i?.selected_repository||c)&&w(g.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:c??null}),{id:g.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:g.id,agent_server_url:o().host,request:{initial_message:h.initial_message,plugins:n??null},created_at:g.created_at,updated_at:g.updated_at}}static async getStartTask(e){return r().backend.kind===`cloud`?ue(e):null}static async getVSCodeUrl(e,t,n){let r=await this.resolveConversationWorkingDir(e);return{vscode_url:await new d(a({conversationUrl:t,sessionApiKey:n})).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:r})}}static async resolveConversationWorkingDir(e){let[t]=await this.batchGetAppConversations([e]);return t?.workspace?.working_dir??n()}static async batchGetAppConversations(e){return e.length===0?[]:r().backend.kind===`cloud`?O(e):Q(await new l(a()).getConversations(e)).map(e=>N(e))}static async updateConversationPublicFlag(e,t){if(r().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return oe(e,t)}static async updateConversationRepository(e,t,n,r){t?w(e,{...C(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):T(e);let[i]=await this.batchGetAppConversations([e]);return $(i,e)}static async readConversationFile(e,t){if(r().backend.kind===`cloud`)return le(e,X(t??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let n=await this.resolveConversationWorkingDir(e),i=X(t??`${n}/.agents_tmp/PLAN.md`,n);return new c(a()).downloadTextFile(i)}static async downloadConversation(e){return r().backend.kind===`cloud`?ie(e):new c(a()).downloadTrajectory(e)}static async getHooks(e){return je()}static async getRuntimeConversation(e,t,n){let o=r().backend,s=o.kind===`cloud`&&t?await h({backend:o,method:`GET`,hostOverride:i(t),path:`/api/conversations/${e}`,authMode:`session-api-key`,sessionApiKey:n}):await new l(a({conversationUrl:t,sessionApiKey:n})).getConversation(e),c=Z(s),u=U(s)?s.stats:null;return{id:c.id,title:c.title?.trim()?c.title:M(c.id),metrics:J(c.metrics),created_at:c.created_at,updated_at:c.updated_at,status:He(c.execution_status),stats:U(u)?u:{usage_to_metrics:{}}}}static async searchConversations(e=20,t){return r().backend.kind===`cloud`?ne(e,t):_e(Be(await new l(a()).searchConversations({limit:e,page_id:t,sort_order:u.UPDATED_AT_DESC})))}static async deleteConversation(e){r().backend.kind===`cloud`?await ae(e):await new l(a()).deleteConversation(e),T(e)}static async updateConversationTitle(e,t){await new l(a()).updateConversation(e,{title:t});let[n]=await this.batchGetAppConversations([e]);return $(n,e)}static async switchProfile(e,t){if(r().backend.kind===`cloud`)throw Error(`LLM profile switching is only supported for local agent-server backends.`);let n=new f(a());if(!e){await n.activateProfile(t);return}let i=await n.getProfile(t,{exposeSecrets:`encrypted`});if(!Fe(i.config))throw Error(Pe);await new l(a()).switchLLM(e,i.config)}};export{C as a,ce as i,O as n,se as r,Ue as t};
|