@xopcai/xopc 0.0.433 → 0.0.435
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/dist/browser-ext/dist/sidepanel.js +11 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-BpYGrRXw.js → activity-store-Cwn_CNwl.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DTgOSv6G.js → agent-avatar-dicebear-Cd23LnJJ.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-BUH7ljEo.js → agent-avatar-display-ByzM7u9S.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-B_FAikHA.js → agent-defaults-settings-panel-B0i37diS.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-DPabZaSE.js → agent-plugin-dialog-XN-tZ-Ox.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BAPYP1Ka.js → agents-ZDA1OaLv.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CXCAHNPj.js → agents-admin-api-B5lKH_ps.js} +1 -1
- package/dist/gateway/static/root/assets/{api-oIK4hYkJ.js → api-B9fZL-V8.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DMbimMEi.js → api-Djju8qIR.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BZ3Fy8ZR.js → app-management-settings-panel-IlyzDPJu.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DsRTj1by.js → appearance-settings-BxdFGob3.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-CxEKiOTA.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Bg1VTieK.js → archive-plugin-4gEvotPr.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-CLPsgcQN.js → automation-api-4fVKv9PJ.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-CKVnR4KG.js → automation-result-state-m7PeK2kl.js} +1 -1
- package/dist/gateway/static/root/assets/automation-run-list-CJOdy_R2.js +1 -0
- package/dist/gateway/static/root/assets/{automation-task-card-D27Mw66U.js → automation-task-card-DZWhCWJa.js} +3 -3
- package/dist/gateway/static/root/assets/{automations-page-DGNTJ8lN.js → automations-page-BjbM15eY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CqurzLYX.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CuwSdCG5.js → binary-plugins-69WyJLNW.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Dtl2BG3t.js → block-editor-DUONDIZR.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-uGK086ag.js → browser-automation-inputs-DL4YPCuN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Da_edNNS.js → browser-automations-page-1Aq6XmRs.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-control-api-k3OOX3bS.js → browser-control-api-yjru8E7R.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-C1bSw-Jq.js → browser-settings-page-CvwpT8Um.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DlHPLld_.js → capabilities-C7lnwKKm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CoeuLRt6.js → capabilities-DaeQXJT4.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-B5avAOUM.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CtY-bGIi.js → capabilities-settings-panel-_9yCS78i.js} +1 -1
- package/dist/gateway/static/root/assets/capability-links-DeO34GIF.js +1 -0
- package/dist/gateway/static/root/assets/{channels-Cn1MWBL_.js → channels-CoQb4HOF.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BB0biwc7.js → chat-agents-api-BUi_7GRo.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-QSvjx4w6.js → chat-chart-block-CcVcKsDZ.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page--wcFhTjW.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Cd51G9eG.js → chat-terminal-dock-BMXJpPuH.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-CEG10uE-.js → command-palette-api-luUjQPsh.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-Bogdq9Hy.js → composer-payload-handoff-B5XNxNCb.js} +1 -1
- package/dist/gateway/static/root/assets/computer-settings-page-CWtdyEJH.js +1 -0
- package/dist/gateway/static/root/assets/connected-providers-grid-2idMtk65.js +1 -0
- package/dist/gateway/static/root/assets/connection-usage-Cm_McddI.js +1 -0
- package/dist/gateway/static/root/assets/connection-usage-guide-Ddh0bfkj.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-k2rjyjrp.js → connector-service-page-C3msXaBk.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DtvB9Cjm.js → connectors-api-NcWECWKg.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-Crb6DILX.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-CAankdQw.js → date-picker-Cfjq1hD_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DjM73fir.js → desktop-pet-ChFn9v-3.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Rmh-GxHl.js → desktop-pet-settings-DvnVIv25.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-BgW2Riyk.js → dev-view-store-DQJ61P5L.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-UdzSpNa5.js → device-pairing-wizard-KxaIL-OX.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Rkw3f7lG.js → directory-picker-path-field-Drv864uE.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-Dudoj_Fz.js → discussion-annotation-sync-DfBRkWtw.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DxIGAO23.js → extension-debug-page-DAlBIt_R.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-63KpX6IP.js → extension-iframe-host-Bds-5kY_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-yXNUkQDA.js → extension-marketplace-api-CZg8nBwW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C811A_Ww.js → extension-page-ZTw-oucT.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-C4jLFIgh.js → extension-provider-NKWfjpdP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-WJSw5MT0.js → extension-settings-page-CT7PPt_q.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-zE9AcaHM.js → file-preview-surface-BcLeaSNe.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-D6cc6W6E.js → gateway-config-swr-Cq-ByXL4.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BSRNLciy.js → gateway-realtime-DwMd2PCt.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CHrf6-nR.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-Unun5hRL.js → gateway-restart-DdiVzbkL.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DP-DV-e5.js → gateway-settings-1QUdNwrZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C8g666Ja.js → gateway-startup-retry-PMJi5mX4.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BObi-1ww.js → global-defaults-api-DgzZh3wX.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CIcs7Mzy.js → home-page-Chn7YTiD.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-C2SqYNyD.js → image-generation-api-CjVpsckq.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C8ezUkOJ.js → imports-page-CJCvZFaQ.js} +1 -1
- package/dist/gateway/static/root/assets/index-8xLWo0Tt.js +11 -0
- package/dist/gateway/static/root/assets/index-iukJWzxG.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-Bo06Ry3H.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BRaY4-wA.js → keyboard-shortcuts-settings-BylFJeGu.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-BZtVcjF3.js → local-app-workbench-page-B3MSSFsr.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-MqP4EnJm.js → local-apps-page-BeV86rMJ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DTq9776a.js → local-session-drafts-jgw8UGsO.js} +2 -2
- package/dist/gateway/static/root/assets/{locale-store-B6OrWgY1.js → locale-store-CAZaC05J.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-hkHBjblX.js → logs-page-BMmSsUP5.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-DoX4eTM3.js → management-settings-Bu7T8ewk.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DrhYZSmg.js → markdown-view-BatP4qeK.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-BEp5E6TD.js → mcp-conversation-setup-page-rROtr0UN.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-D987i9Gc.js → media-plugins-88OV72YE.js} +1 -1
- package/dist/gateway/static/root/assets/messages-C7fckbyG.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-DXm4NS1_.js → model-selector-raBRBkN_.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-BLcha5rx.js → models-hub-cache-CzC9y3D0.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-Cl851ivY.js → note-detail-panel-BvA8Vkbm.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-D6kUDDd5.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-Ddsf7FVg.js → notes-api-zXpV6UXu.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DSwA1MU1.js → notes-page-CjYH9Kle.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-CMmu4DzH.js → oauth-api-DmxSaxM1.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-BkhnftBq.js → oauth-provider-connect-D4Gfs-Ba.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-urhQBRaN.js → page-context-capture-button-Mig3d0UX.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-BuNUerth.js → page-context-draft-C4IIZaKd.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-D7G5utVi.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-B49ueeZO.js → personal-avatar-DLa-CpaK.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-f05ceuFn.js → personal-page-BhuT79Wd.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-DLQxzPYr.js → personal-settings-panel-XSUkgcr2.js} +1 -1
- package/dist/gateway/static/root/assets/phone-dependencies-card-DYwnuVh3.js +1 -0
- package/dist/gateway/static/root/assets/phone-model-connection-2F32QTHA.js +1 -0
- package/dist/gateway/static/root/assets/phone-model-picker-DCVzIr0s.js +1 -0
- package/dist/gateway/static/root/assets/phone-settings-page-DJttE4id.js +1 -0
- package/dist/gateway/static/root/assets/{phone-workspace-store-DbqktZbO.js → phone-workspace-store-Dxp-KhFP.js} +1 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-tyjAjFjA.js +1 -0
- package/dist/gateway/static/root/assets/{preference-select-fields-BZWqG7pu.js → preference-select-fields-BVP3MhGK.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-DDQUsag7.js → product-automation-feedback-DbJvv92z.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BkRP_HmA.js → product-open-page-RImqlhCD.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-o2Y3VNE7.js → product-preview-content-DxSqrKsg.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-7Ohx-7OR.js → product-preview-modal-Cw8Q8Uom.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-B2RsSHya.js → project-detail-page-CuugOYfe.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-BIMouiYX.js → project-understanding-BMKcoUW5.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-C9R5u3tF.js → projects-page-CFsABLvs.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-BOCkRZ7X.js → providers-api-CAeXbJNF.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-C6muEHEO.js → recording-upload-CfpllTe5.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bl2guMRg.js → registry-api-fLOqFyrz.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BceSMbCs.js → remote-access-hub-BvKOxy0L.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-CUNbPkdj.js → resource-unavailable-D15jzjV_.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-BQapekpy.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-LopLjgvu.js → runtime-tools-api-D0Nrvuqv.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-9HIPerDP.js → runtime-tools-settings-panel-CA27XgL2.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-CoMI6MB1.js → service-recommendation-list-B0RoYLVT.js} +1 -1
- package/dist/gateway/static/root/assets/session-api-CHRP5Lwf.js +1 -0
- package/dist/gateway/static/root/assets/session-channel-icon-D1ktvt1P.js +1 -0
- package/dist/gateway/static/root/assets/session-identity-label-BP7OIYth.js +1 -0
- package/dist/gateway/static/root/assets/session-manager-DRRWwKE4.js +25 -0
- package/dist/gateway/static/root/assets/{sessions-page-BT0GdXdS.js → sessions-page-uJHS3-6F.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CZ4J3Kuy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CEorDLUp.js → settings-advanced-section-D-llwfSj.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-C2LZqBES.js → settings-mode-store-BspMKc9N.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C_Np_6qZ.js → settings-page-CedwaHM0.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-BAN34UQi.js → settings-page-header-LuOJvqNa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B5TVFBV2.js → settings-page-layout-CduQ8w4a.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-BYvTJW3_.js → setup-interaction-page-ujpPGl84.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-UY2dH-sK.js → setup-status-panel-BN2aCJUN.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-BMcXyzr2.js → share-link-dialog-CTATUaa4.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-UQ6eUM2_.js → share-preview-page-Dq0J3VgS.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DOeDN6Tm.js → shares-api-zegE8pSE.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-W8XhuAoL.js → shares-settings-DXpvsRXq.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-Do_c0d9n.js → skill-api-DCL1EN7f.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-DpHaXI2l.js → skill-list-api-Bv0mmHbu.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DDRd9IJ2.js → skill-reload-api-DPZbadiO.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-CaeJVKhO.js → skills-page-DMC7Gaku.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DYWlWPJL.js → system-settings-panel-BYFUhlqG.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-De0qD7xw.js → task-detail-page-_Og3plZL.js} +3 -3
- package/dist/gateway/static/root/assets/{task-result-evidence-CICR5K1t.js → task-result-evidence-Bxm8-H0B.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-BbWUcQe7.js → terminal-panel-store-Djf9l2qZ.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-TkG5mo0p.js → theme-store-8GFVtotZ.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-CYXEy4EG.js → tracing-settings-page-oWW3SBZ4.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DquDm6U2.js → tunnel-api-D-mEsSGF.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-Ot3wZ3oQ.js → understanding-activity-store-CvDjsd0I.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-C5KYFMaC.js → understanding-refresh-store-DzOZJm7A.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-1xFO4smo.js → usage-page-z-o6Uuev.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-HL8XRNR8.js → use-autosave-BVYS8UoK.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-XRlQBdNF.js → use-composer-attachments-lecOV2q5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CW956CXS.js → use-file-preview-expanded-nd_CuFsd.js} +2 -2
- package/dist/gateway/static/root/assets/{use-personal-profile-202s6tJt.js → use-personal-profile-CQi2ZCxV.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-CjydkmH1.js → use-workspace-tree-BiaddkzX.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-OGPXx3pe.js → user-model-page-Bks1n0Nj.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CxFu4MEA.js → voice-api-key-field-BbW8NFeZ.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-MHe5Pn-A.js → voice-config-api-jSMzZWWy.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-B9xc1oK8.js → voice-input-shortcut-events-_SgYmx7X.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-CVEcB6Pe.js → voice-transcribe-api-BJCfiRFU.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C-JoAg2D.js → work-discovery-overlay-DSTSNyU7.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-B5Kx29Ru.js → work-discovery-page-Dd_QJJvb.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-DGp9cNzH.js → working-directory-picker-modal-q39BUcJ6.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-HBXn8pL9.js → workspace-api-Di2OmCvz.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-B2r9wlix.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-3cpwSG2w.js → workspace-file-preview-dialog-BUGNT765.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-D0VOFvuP.js → workspace-open-location-menu-bMSvmQW7.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-BkdW2p3v.js → xopc-cloud-account-card-Bbe19Del.js} +1 -1
- package/dist/gateway/static/root/index.html +87 -85
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +33 -3
- package/dist/packages/gateway-contract/src/session-identity.js +2 -1
- package/dist/packages/gateway-contract/src/session-input-command.js +19 -2
- package/dist/packages/gateway-contract/src/specialists.js +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +2 -2
- package/dist/src/agent/embedded/run-for-session.js +23 -8
- package/dist/src/agent/embedded/run-turn.js +30 -7
- package/dist/src/agent/embedded/runs.d.ts +2 -2
- package/dist/src/agent/embedded/runs.js +4 -4
- package/dist/src/agent/embedded/session-runner.js +26 -11
- package/dist/src/agent/embedded/tool-search-extension.d.ts +8 -2
- package/dist/src/agent/embedded/tool-search-extension.js +122 -30
- package/dist/src/agent/external-tools/cliProvider.d.ts +10 -9
- package/dist/src/agent/external-tools/cliProvider.js +24 -4
- package/dist/src/agent/external-tools/composio-provider.d.ts +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +6 -3
- package/dist/src/agent/external-tools/discovery.d.ts +47 -0
- package/dist/src/agent/external-tools/discovery.js +56 -0
- package/dist/src/agent/external-tools/gateway-tools.js +26 -46
- package/dist/src/agent/external-tools/index.d.ts +1 -0
- package/dist/src/agent/external-tools/index.js +7 -0
- package/dist/src/agent/external-tools/personal-request-scope.d.ts +7 -0
- package/dist/src/agent/external-tools/personal-request-scope.js +83 -0
- package/dist/src/agent/external-tools/read-policy.js +5 -4
- package/dist/src/agent/external-tools/service.d.ts +2 -0
- package/dist/src/agent/external-tools/service.js +22 -3
- package/dist/src/agent/external-tools/tool-registry.d.ts +6 -0
- package/dist/src/agent/external-tools/types.d.ts +7 -2
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.js +3 -2
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +13 -8
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -0
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +3 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +6 -4
- package/dist/src/agent/tool-manuals/phone.d.ts +1 -1
- package/dist/src/agent/tool-manuals/phone.js +4 -4
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.js +4 -2
- package/dist/src/agent/tools/computer-use-tool.js +7 -6
- package/dist/src/agent/tools/delegation-policy.js +1 -0
- package/dist/src/agent/tools/factory.js +4 -2
- package/dist/src/agent/tools/phone-use-tool.js +2 -2
- package/dist/src/agent/tools/web.js +22 -3
- package/dist/src/agent-matching/service.js +2 -2
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/computer/batch.d.ts +108 -0
- package/dist/src/computer/batch.js +125 -0
- package/dist/src/computer/broker.d.ts +30 -2
- package/dist/src/computer/broker.js +109 -17
- package/dist/src/computer/diagnostics.d.ts +5 -1
- package/dist/src/computer/diagnostics.js +22 -3
- package/dist/src/computer/errors.d.ts +15 -0
- package/dist/src/computer/errors.js +59 -3
- package/dist/src/computer/model-adapter.d.ts +58 -0
- package/dist/src/computer/model-adapter.js +112 -66
- package/dist/src/computer/native-errors.d.ts +2 -0
- package/dist/src/computer/native-errors.js +13 -0
- package/dist/src/computer/program-runtime.d.ts +1 -1
- package/dist/src/computer/program-runtime.js +1 -0
- package/dist/src/computer/runtime.d.ts +11 -0
- package/dist/src/computer/runtime.js +102 -34
- package/dist/src/computer/semantic-actions.js +4 -0
- package/dist/src/config/schema.d.ts +6 -0
- package/dist/src/extensions/agent-plugins/formats.js +2 -1
- package/dist/src/extensions/agent-plugins/inventory.d.ts +2 -0
- package/dist/src/extensions/agent-plugins/inventory.js +4 -1
- package/dist/src/extensions/agent-plugins/validation.d.ts +1 -0
- package/dist/src/extensions/agent-plugins/validation.js +2 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/phone-dependencies.js +26 -5
- package/dist/src/gateway/hono/routes/phone-setup.js +42 -16
- package/dist/src/gateway/hono/routes/phone.js +22 -7
- package/dist/src/gateway/hono/routes/session-command-handler.js +9 -0
- package/dist/src/gateway/hono/routes/session-input-control.d.ts +3 -0
- package/dist/src/gateway/hono/routes/session-input-control.js +37 -0
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +12 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +22 -0
- package/dist/src/gateway/hono/routes/sessions.js +4 -0
- package/dist/src/gateway/service/agent-runner.js +5 -4
- package/dist/src/gateway/service/config-coordinator.d.ts +6 -0
- package/dist/src/gateway/service/session-input-coordinator.d.ts +6 -3
- package/dist/src/gateway/service/session-input-coordinator.js +47 -6
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +8 -5
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/personal-agent/capability-service.js +1 -1
- package/dist/src/personal-agent/request-access.d.ts +2 -0
- package/dist/src/personal-agent/request-access.js +22 -2
- package/dist/src/personal-agent/request-service.js +2 -2
- package/dist/src/personal-agent/specialist-capabilities.d.ts +2 -0
- package/dist/src/personal-agent/specialist-capabilities.js +9 -3
- package/dist/src/phone/adb-driver.d.ts +3 -0
- package/dist/src/phone/adb-driver.js +29 -0
- package/dist/src/phone/contracts.d.ts +14 -2
- package/dist/src/phone/contracts.js +8 -1
- package/dist/src/phone/gui-protocol.js +1 -1
- package/dist/src/phone/hdc-driver.d.ts +30 -0
- package/dist/src/phone/hdc-driver.js +331 -0
- package/dist/src/phone/hdc-video-bridge.d.ts +2 -0
- package/dist/src/phone/hdc-video-bridge.js +91 -0
- package/dist/src/phone/hdc-video-tools.d.ts +15 -0
- package/dist/src/phone/hdc-video-tools.js +123 -0
- package/dist/src/phone/hdc-video.d.ts +69 -0
- package/dist/src/phone/hdc-video.js +350 -0
- package/dist/src/phone/interactive-session.js +1 -1
- package/dist/src/phone/live-provider.d.ts +6 -0
- package/dist/src/phone/live-provider.js +1 -0
- package/dist/src/phone/model-adapter.d.ts +3 -0
- package/dist/src/phone/model-adapter.js +5 -3
- package/dist/src/phone/repository.js +2 -1
- package/dist/src/phone/runtime.d.ts +10 -4
- package/dist/src/phone/runtime.js +151 -85
- package/dist/src/phone/setup/service.d.ts +8 -6
- package/dist/src/phone/setup/service.js +33 -16
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/process/phone-process.d.ts +1 -1
- package/dist/src/process/phone-process.js +2 -2
- package/dist/src/runtime-tools/downloader.d.ts +1 -0
- package/dist/src/runtime-tools/downloader.js +8 -4
- package/dist/src/runtime-tools/harmony-dependencies.d.ts +24 -0
- package/dist/src/runtime-tools/harmony-dependencies.js +272 -0
- package/dist/src/runtime-tools/harmony-dependency-catalog.d.ts +4 -0
- package/dist/src/runtime-tools/harmony-dependency-catalog.js +54 -0
- package/dist/src/runtime-tools/harmony-paths.d.ts +9 -0
- package/dist/src/runtime-tools/harmony-paths.js +15 -0
- package/dist/src/runtime-tools/hdc-dependency-catalog.d.ts +8 -0
- package/dist/src/runtime-tools/hdc-dependency-catalog.js +83 -0
- package/dist/src/runtime-tools/hdc-files.d.ts +14 -0
- package/dist/src/runtime-tools/hdc-files.js +87 -0
- package/dist/src/runtime-tools/phone-dependencies.d.ts +6 -1
- package/dist/src/runtime-tools/phone-dependencies.js +20 -2
- package/dist/src/runtime-tools/phone-dependency-catalog.d.ts +10 -1
- package/dist/src/runtime-tools/phone-dependency-catalog.js +2 -0
- package/dist/src/runtime-tools/types.d.ts +1 -1
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +16 -0
- package/dist/src/storage/sqlite/session-creation-repository.js +3 -0
- package/dist/src/storage/sqlite/session-input-control-repository.d.ts +12 -0
- package/dist/src/storage/sqlite/session-input-control-repository.js +83 -0
- package/dist/src/storage/sqlite/session-input-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-input-repository.js +17 -5
- package/dist/src/storage/sqlite/session-repository.js +1 -0
- package/dist/src/storage/sqlite/session-turn-replace-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +14 -2
- package/dist/src/storage/sqlite/upgrades/262_session_input_control.sql +15 -0
- package/package.json +2 -2
- package/skills/tools/configure-xopc/SKILL.md +2 -2
- package/skills/tools/configure-xopc/references/phone/acceptance.md +3 -2
- package/skills/tools/configure-xopc/references/phone/dependencies.md +18 -2
- package/skills/tools/configure-xopc/references/phone/harmonyos.md +16 -0
- package/skills/tools/configure-xopc/references/phone/overview.md +2 -2
- package/skills/tools/configure-xopc/references/scene-index.md +2 -2
- package/dist/gateway/static/root/assets/apps-page-D-n71lO1.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DWDWy-SG.js +0 -9
- package/dist/gateway/static/root/assets/capabilities-page-IcwojmJK.js +0 -2
- package/dist/gateway/static/root/assets/capability-links-DzQWK1Fh.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-CwP4OMdW.js +0 -72
- package/dist/gateway/static/root/assets/computer-settings-page-DyAlOzqY.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-D0lXg22c.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DI_Q0CKz.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BFeFfApQ.js +0 -1
- package/dist/gateway/static/root/assets/index-Cz-VjTNd.css +0 -1
- package/dist/gateway/static/root/assets/index-D1_PUrJf.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-Cn4nRSyt.js +0 -1
- package/dist/gateway/static/root/assets/list-tree-B0OMswgM.js +0 -1
- package/dist/gateway/static/root/assets/messages-jwdBhfL9.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DGYRJS03.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-CEn_kPsn.js +0 -1
- package/dist/gateway/static/root/assets/phone-dependencies-card-DjmC1Z5j.js +0 -1
- package/dist/gateway/static/root/assets/phone-model-connection-BRjHSgYn.js +0 -1
- package/dist/gateway/static/root/assets/phone-model-picker-DgIiWLhR.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-DCZGCL_z.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-D4tGKip4.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-C1BKDjnu.js +0 -2
- package/dist/gateway/static/root/assets/session-api-Bfmlmn9F.js +0 -1
- package/dist/gateway/static/root/assets/session-channel-icon-SsY70Z6t.js +0 -1
- package/dist/gateway/static/root/assets/session-identity-label-B7sgG1PE.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-X4UHOjjO.js +0 -25
- package/dist/gateway/static/root/assets/settings-advanced-gate-Dk9c-Z5e.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-msZa42fU.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
4
|
-
import { COMPUTER_CONTROL_TOOL, ComputerActionSchema, ComputerAppSchema, ComputerObservationSchema, ComputerTransportTimingSchema, ComputerWindowSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
|
+
import { COMPUTER_CONTROL_TOOL, ComputerActionSchema, ComputerAppSchema, ComputerObservationSchema, ComputerTransportTimingSchema, ComputerWindowSchema, computerActionInputCount, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { ComputerServiceLimitsSchema, computerModelProfile, init_model_policy } from "./model-policy.js";
|
|
6
6
|
import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
|
|
7
7
|
import { rejectUnbudgetedCloudTransport } from "../providers/xopc-cloud-credit-budget.js";
|
|
@@ -14,6 +14,7 @@ import { ComputerFlowCapture, ComputerFlowStore, computerFlowHint, computerFlowM
|
|
|
14
14
|
import { ComputerNativeTimingSchema, ComputerSessionDiagnostics } from "./diagnostics.js";
|
|
15
15
|
import { executeComputerProgram } from "./program-runtime.js";
|
|
16
16
|
import { ComputerExpectationSchema, ComputerTaskState, verifyComputerExpectation } from "./task-state.js";
|
|
17
|
+
import { executeComputerBatch } from "./batch.js";
|
|
17
18
|
import { randomUUID } from "node:crypto";
|
|
18
19
|
import { z } from "zod";
|
|
19
20
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -45,6 +46,16 @@ const Reply = z.object({
|
|
|
45
46
|
windows: z.array(ComputerWindowSchema).max(100).optional(),
|
|
46
47
|
receipt: z.object({
|
|
47
48
|
actionId: z.string(),
|
|
49
|
+
inputCount: z.number().int().min(1).max(12).optional(),
|
|
50
|
+
steps: z.array(z.object({
|
|
51
|
+
index: z.number().int().min(0).max(11),
|
|
52
|
+
dispatch: z.enum([
|
|
53
|
+
"notStarted",
|
|
54
|
+
"started",
|
|
55
|
+
"completed",
|
|
56
|
+
"unknown"
|
|
57
|
+
])
|
|
58
|
+
}).strict()).max(12).optional(),
|
|
48
59
|
dispatch: z.enum([
|
|
49
60
|
"notStarted",
|
|
50
61
|
"started",
|
|
@@ -264,6 +275,7 @@ var ComputerRuntime = class {
|
|
|
264
275
|
const combined = AbortSignal.any([signal, s.controller.signal]);
|
|
265
276
|
let current;
|
|
266
277
|
let actions = 0;
|
|
278
|
+
const receipts = [];
|
|
267
279
|
let imageRef;
|
|
268
280
|
const observe = async (observationSignal = combined) => {
|
|
269
281
|
current?.frame?.fill(0);
|
|
@@ -295,12 +307,41 @@ var ComputerRuntime = class {
|
|
|
295
307
|
return observation;
|
|
296
308
|
};
|
|
297
309
|
try {
|
|
298
|
-
const
|
|
310
|
+
const host = async (method, args, callSignal) => {
|
|
299
311
|
callSignal.throwIfAborted();
|
|
300
312
|
if (!this.getConfig().computer.enabled || Date.now() - s.createdAt >= this.getConfig().computer.maxSessionDurationMs) throw new Error("COMPUTER_SESSION_BUDGET");
|
|
301
313
|
if (JSON.stringify(computerAgentTurn(owner).binding) !== JSON.stringify(s.binding)) throw new Error("COMPUTER_AGENT_MODEL_CHANGED");
|
|
302
314
|
await turn.authorize?.(method, args);
|
|
303
315
|
const hostResult = await (async () => {
|
|
316
|
+
if (method === "batch") {
|
|
317
|
+
if (s.mode === "observe") throw new Error("COMPUTER_READ_ONLY");
|
|
318
|
+
return executeComputerBatch(args, host, {
|
|
319
|
+
remainingInputs: (input.maxActions ?? 6) - actions,
|
|
320
|
+
signal: callSignal,
|
|
321
|
+
state: (id) => {
|
|
322
|
+
const observation = snapshot(id);
|
|
323
|
+
let data;
|
|
324
|
+
try {
|
|
325
|
+
data = JSON.parse(observation.summary);
|
|
326
|
+
} catch {
|
|
327
|
+
data = {
|
|
328
|
+
text: observation.summary,
|
|
329
|
+
elements: [],
|
|
330
|
+
truncated: true
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
...data,
|
|
335
|
+
snapshotId: id
|
|
336
|
+
};
|
|
337
|
+
},
|
|
338
|
+
verify: (expect) => {
|
|
339
|
+
const verification = verifyComputerExpectation(expect, current?.value.observation);
|
|
340
|
+
s.diagnostics.verify(verification);
|
|
341
|
+
return verification;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
304
345
|
if (method === "observe") {
|
|
305
346
|
const options = z.object({ visual: z.boolean().optional() }).strict().parse(args ?? {});
|
|
306
347
|
const state = await observe(callSignal);
|
|
@@ -328,18 +369,36 @@ var ComputerRuntime = class {
|
|
|
328
369
|
if (method === "verify" || method === "waitFor") {
|
|
329
370
|
const value = z.object({
|
|
330
371
|
expect: ComputerExpectationSchema,
|
|
331
|
-
timeoutMs: z.number().int().min(0).max(5e3).optional()
|
|
372
|
+
timeoutMs: z.number().int().min(0).max(5e3).optional(),
|
|
373
|
+
fresh: z.boolean().optional()
|
|
332
374
|
}).strict().parse(args);
|
|
333
375
|
const deadline = Date.now() + (method === "waitFor" ? value.timeoutMs ?? 2e3 : 0);
|
|
334
376
|
for (let sample = 0; sample < 20; sample++) {
|
|
335
|
-
const
|
|
377
|
+
const cached = current?.value.observation;
|
|
378
|
+
const reuse = sample === 0 && !value.fresh && cached && Date.now() - cached.capturedAt >= 0 && Date.now() - cached.capturedAt <= 5e3;
|
|
379
|
+
let state;
|
|
380
|
+
if (reuse) try {
|
|
381
|
+
state = {
|
|
382
|
+
...JSON.parse(cached.summary),
|
|
383
|
+
snapshotId: cached.id
|
|
384
|
+
};
|
|
385
|
+
} catch {
|
|
386
|
+
state = {
|
|
387
|
+
text: cached.summary,
|
|
388
|
+
elements: [],
|
|
389
|
+
truncated: true,
|
|
390
|
+
snapshotId: cached.id
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
else state = await observe(callSignal);
|
|
336
394
|
const verification = verifyComputerExpectation(value.expect, current.value.observation);
|
|
337
395
|
s.diagnostics.verify(verification);
|
|
338
396
|
if (verification?.status === "satisfied" || Date.now() >= deadline || sample === 19) return {
|
|
339
397
|
...state,
|
|
340
|
-
verification
|
|
398
|
+
verification,
|
|
399
|
+
observationReused: Boolean(reuse)
|
|
341
400
|
};
|
|
342
|
-
await setTimeout(
|
|
401
|
+
await setTimeout(Math.min(25 * 2 ** Math.min(sample, 3), 200, Math.max(0, deadline - Date.now())), void 0, { signal: callSignal });
|
|
343
402
|
}
|
|
344
403
|
}
|
|
345
404
|
if (method === "act") {
|
|
@@ -350,7 +409,7 @@ var ComputerRuntime = class {
|
|
|
350
409
|
expect: ComputerExpectationSchema.optional()
|
|
351
410
|
}).strict().parse(args);
|
|
352
411
|
const before = snapshot(value.snapshotId);
|
|
353
|
-
if (
|
|
412
|
+
if ((actions += computerActionInputCount(value.action)) > (input.maxActions ?? 6)) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
354
413
|
const action = groundComputerAction(value.action, before);
|
|
355
414
|
s.task.assertProgress(action, before);
|
|
356
415
|
s.pendingContext = {
|
|
@@ -371,7 +430,7 @@ var ComputerRuntime = class {
|
|
|
371
430
|
const context = {
|
|
372
431
|
observationsReused: 0,
|
|
373
432
|
stabilityObservations: 0,
|
|
374
|
-
actionsRemaining:
|
|
433
|
+
actionsRemaining: computerActionInputCount(action),
|
|
375
434
|
nativeMs: {
|
|
376
435
|
precheckMs: 0,
|
|
377
436
|
inputMs: 0,
|
|
@@ -382,14 +441,9 @@ var ComputerRuntime = class {
|
|
|
382
441
|
imageRef = void 0;
|
|
383
442
|
current?.frame?.fill(0);
|
|
384
443
|
current = void 0;
|
|
385
|
-
const
|
|
386
|
-
let reply = await this.dispatchAction(s, envelope, callSignal, context);
|
|
387
|
-
while (reply.status === "pending_action") {
|
|
388
|
-
if (Date.now() >= authorizationDeadline) throw new Error("COMPUTER_AUTHORIZATION_TIMEOUT");
|
|
389
|
-
await setTimeout(250, void 0, { signal: callSignal });
|
|
390
|
-
reply = await this.dispatchAction(s, envelope, callSignal, context);
|
|
391
|
-
}
|
|
444
|
+
const reply = await this.dispatchAction(s, envelope, callSignal, context);
|
|
392
445
|
current = context.observation;
|
|
446
|
+
if (reply.receipt) receipts.push(reply.receipt);
|
|
393
447
|
if (reply.errorCode || reply.receipt?.dispatch !== "completed") throw new Error(reply.errorCode ?? "COMPUTER_NATIVE_ACTION_FAILED");
|
|
394
448
|
let state = {};
|
|
395
449
|
try {
|
|
@@ -407,17 +461,20 @@ var ComputerRuntime = class {
|
|
|
407
461
|
throw new Error("COMPUTER_INVALID_INPUT");
|
|
408
462
|
})();
|
|
409
463
|
return await turn.complete?.(method, hostResult) ?? hostResult;
|
|
410
|
-
}
|
|
464
|
+
};
|
|
465
|
+
const result = await executeComputerProgram(input.code, host, s.programStore ??= Object.create(null), combined, input.timeoutMs);
|
|
411
466
|
if (result.status === "program_error") {
|
|
412
467
|
await this.close(owner);
|
|
413
468
|
return {
|
|
414
469
|
...result,
|
|
415
|
-
sessionId: s.id
|
|
470
|
+
sessionId: s.id,
|
|
471
|
+
receipts
|
|
416
472
|
};
|
|
417
473
|
}
|
|
418
474
|
return {
|
|
419
475
|
...result,
|
|
420
476
|
sessionId: s.id,
|
|
477
|
+
receipts,
|
|
421
478
|
...imageRef ? { imageRef } : {},
|
|
422
479
|
budget: this.budget(s)
|
|
423
480
|
};
|
|
@@ -466,18 +523,8 @@ var ComputerRuntime = class {
|
|
|
466
523
|
signal.throwIfAborted();
|
|
467
524
|
context.actionsRemaining = (input.maxActions ?? 6) - actionsExecuted;
|
|
468
525
|
let result = await this.executeInput(owner, step, signal, diagnostics, context);
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
const authorizingSession = result.status === "pending_authorization";
|
|
472
|
-
if (Date.now() >= authorizationDeadline) {
|
|
473
|
-
await this.close(owner);
|
|
474
|
-
throw new Error("COMPUTER_AUTHORIZATION_TIMEOUT");
|
|
475
|
-
}
|
|
476
|
-
await setTimeout(250, void 0, { signal });
|
|
477
|
-
result = await this.executeInput(owner, authorizingSession ? { op: "observe" } : step, signal, diagnostics, context);
|
|
478
|
-
if (authorizingSession && result.status === "ready" && !result.errorCode) result = await this.executeInput(owner, step, signal, diagnostics, context);
|
|
479
|
-
}
|
|
480
|
-
if (result.receipt?.dispatch === "completed") actionsExecuted++;
|
|
526
|
+
if (result.receipt?.dispatch === "completed") actionsExecuted += result.receipt.inputCount ?? 1;
|
|
527
|
+
else actionsExecuted += result.receipt?.steps?.filter((step) => step.dispatch === "completed").length ?? 0;
|
|
481
528
|
if (result.errorCode || result.pending || result.receipt && result.receipt.dispatch !== "completed") return finish(result, "handoff");
|
|
482
529
|
if (result.verified) return finish({
|
|
483
530
|
...result,
|
|
@@ -645,11 +692,16 @@ var ComputerRuntime = class {
|
|
|
645
692
|
...reply.value.status !== "stopped" ? { budget: this.budget(s) } : {}
|
|
646
693
|
};
|
|
647
694
|
}
|
|
648
|
-
|
|
695
|
+
let status = goalContext?.observation ?? await this.send(s, {
|
|
649
696
|
op: "status",
|
|
650
697
|
sessionId: s.id,
|
|
651
698
|
owner
|
|
652
699
|
}, signal);
|
|
700
|
+
if (status.value.status === "pending_authorization") status = await this.send(s, {
|
|
701
|
+
op: "settle",
|
|
702
|
+
sessionId: s.id,
|
|
703
|
+
owner
|
|
704
|
+
}, signal);
|
|
653
705
|
if (status.value.status === "stopped") {
|
|
654
706
|
if (status.value.errorCode) s.diagnostics.fail(new Error(status.value.errorCode), "observe", "notStarted");
|
|
655
707
|
this.forget(s);
|
|
@@ -785,6 +837,7 @@ var ComputerRuntime = class {
|
|
|
785
837
|
};
|
|
786
838
|
}
|
|
787
839
|
const action = groundComputerAction(proposal.action, o);
|
|
840
|
+
if ((action.kind === "activateSequence" || action.kind === "batch") && !goalContext) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
788
841
|
const e = {
|
|
789
842
|
actionId: randomUUID(),
|
|
790
843
|
sessionId: s.id,
|
|
@@ -838,10 +891,10 @@ var ComputerRuntime = class {
|
|
|
838
891
|
}
|
|
839
892
|
async dispatchAction(s, envelope, signal, goalContext) {
|
|
840
893
|
if (!s.pending) {
|
|
841
|
-
if (s.actions
|
|
842
|
-
s.actions
|
|
894
|
+
if (s.actions + computerActionInputCount(envelope.action) > this.getConfig().computer.maxActionsPerSession || goalContext && computerActionInputCount(envelope.action) > goalContext.actionsRemaining) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
895
|
+
s.actions += computerActionInputCount(envelope.action);
|
|
843
896
|
s.pending = envelope;
|
|
844
|
-
s.diagnostics.propose(envelope.actionId, envelope.action.kind);
|
|
897
|
+
s.diagnostics.propose(envelope.actionId, envelope.action.kind, computerActionInputCount(envelope.action));
|
|
845
898
|
}
|
|
846
899
|
let reply = await this.send(s, {
|
|
847
900
|
op: "act",
|
|
@@ -849,6 +902,21 @@ var ComputerRuntime = class {
|
|
|
849
902
|
owner: s.owner,
|
|
850
903
|
envelope
|
|
851
904
|
}, signal);
|
|
905
|
+
if (reply.value.status === "pending_action") {
|
|
906
|
+
reply.frame?.fill(0);
|
|
907
|
+
const settled = await this.send(s, {
|
|
908
|
+
op: "settle",
|
|
909
|
+
sessionId: s.id,
|
|
910
|
+
owner: s.owner
|
|
911
|
+
}, signal);
|
|
912
|
+
if (settled.value.status !== "pending_action" || settled.value.errorCode) reply = settled;
|
|
913
|
+
else reply = await this.send(s, {
|
|
914
|
+
op: "act",
|
|
915
|
+
sessionId: s.id,
|
|
916
|
+
owner: s.owner,
|
|
917
|
+
envelope
|
|
918
|
+
}, signal);
|
|
919
|
+
}
|
|
852
920
|
if (reply.value.receipt && reply.value.receipt.actionId !== envelope.actionId) {
|
|
853
921
|
reply.frame?.fill(0);
|
|
854
922
|
throw new Error("COMPUTER_RECEIPT_MISMATCH");
|
|
@@ -905,7 +973,7 @@ var ComputerRuntime = class {
|
|
|
905
973
|
} else reply.frame?.fill(0);
|
|
906
974
|
if (reply.value.status === "ready" && reply.value.errorCode === "COMPUTER_OBSERVATION_CHANGED" && !reply.value.receipt) {
|
|
907
975
|
s.diagnostics.discard();
|
|
908
|
-
s.actions
|
|
976
|
+
s.actions -= computerActionInputCount(envelope.action);
|
|
909
977
|
s.pendingContext = void 0;
|
|
910
978
|
return {
|
|
911
979
|
...this.present(reply.value),
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
//#region src/computer/semantic-actions.ts
|
|
2
2
|
/** Ground only an unambiguous single click; never reinterpret double clicks or text entry. */
|
|
3
3
|
function groundComputerAction(action, observation) {
|
|
4
|
+
if (action.kind === "batch") return {
|
|
5
|
+
...action,
|
|
6
|
+
actions: action.actions.map((input) => groundComputerAction(input, observation))
|
|
7
|
+
};
|
|
4
8
|
if (action.kind !== "click" || action.count !== 1 || action.point.x < 0 || action.point.y < 0 || action.point.x >= observation.imageWidth || action.point.y >= observation.imageHeight) return action;
|
|
5
9
|
const kind = action.button === "left" ? "activate" : "showMenu";
|
|
6
10
|
try {
|
|
@@ -1787,6 +1787,12 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1787
1787
|
direct: "direct";
|
|
1788
1788
|
}>>;
|
|
1789
1789
|
adbPath: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
hdcPath: z.ZodOptional<z.ZodString>;
|
|
1791
|
+
hdcVideo: z.ZodOptional<z.ZodObject<{
|
|
1792
|
+
sdkJar: z.ZodOptional<z.ZodString>;
|
|
1793
|
+
devecoPath: z.ZodOptional<z.ZodString>;
|
|
1794
|
+
javaHome: z.ZodOptional<z.ZodString>;
|
|
1795
|
+
}, z.core.$strict>>;
|
|
1790
1796
|
autoGlmPrompt: z.ZodDefault<z.ZodEnum<{
|
|
1791
1797
|
current: "current";
|
|
1792
1798
|
upstream: "upstream";
|
|
@@ -67,7 +67,8 @@ function readPluginLayout(root, read, safe, importManifest) {
|
|
|
67
67
|
};
|
|
68
68
|
const defaults = has("skills") ? guarded("skills", () => [safe(join(root, "skills"))], []) : [];
|
|
69
69
|
const declared = paths(overlay.skills, "skills");
|
|
70
|
-
const
|
|
70
|
+
const catalogSelection = !path && importManifest?.skills !== void 0;
|
|
71
|
+
const skillRoots = [...new Set(catalogSelection ? declared : dialect === "portable" ? defaults : dialect === "claude" ? [...defaults, ...declared] : overlay.skills === void 0 ? defaults : declared)];
|
|
71
72
|
const mcpConfigs = [];
|
|
72
73
|
if (dialect === "portable" && has("mcp.json")) {
|
|
73
74
|
const config = guarded("mcp", () => json("mcp.json"), void 0);
|
|
@@ -3,6 +3,7 @@ export declare function agentPluginInventoryRow(plugin: InstalledAgentPlugin, st
|
|
|
3
3
|
components: {
|
|
4
4
|
skills: {
|
|
5
5
|
name: string;
|
|
6
|
+
description: string;
|
|
6
7
|
}[];
|
|
7
8
|
mcp: {
|
|
8
9
|
connectionAuth?: {
|
|
@@ -117,6 +118,7 @@ export declare function listAgentPluginInventory(): {
|
|
|
117
118
|
components: {
|
|
118
119
|
skills: {
|
|
119
120
|
name: string;
|
|
121
|
+
description: string;
|
|
120
122
|
}[];
|
|
121
123
|
mcp: {
|
|
122
124
|
connectionAuth?: {
|
|
@@ -37,7 +37,10 @@ function agentPluginInventoryRow(plugin, store = new AgentPluginStore()) {
|
|
|
37
37
|
canRollback: !!plugin.receipt.previous,
|
|
38
38
|
...plugin.receipt.provenance ? { provenance: plugin.receipt.provenance } : {},
|
|
39
39
|
components: {
|
|
40
|
-
skills: plugin.skills.map((skill) => ({
|
|
40
|
+
skills: plugin.skills.map((skill) => ({
|
|
41
|
+
name: skill.name,
|
|
42
|
+
description: skill.description
|
|
43
|
+
})),
|
|
41
44
|
mcp: Object.entries(plugin.servers).map(([name, server]) => ({
|
|
42
45
|
name,
|
|
43
46
|
id: pluginServerId(plugin.id, name),
|
|
@@ -204,7 +204,8 @@ function inspectAgentPlugin(rootDir, dataDir = join(rootDir, ".inspection-data")
|
|
|
204
204
|
seenSkills.add(name);
|
|
205
205
|
result.skills.push({
|
|
206
206
|
name,
|
|
207
|
-
filePath
|
|
207
|
+
filePath,
|
|
208
|
+
description: metadata.description
|
|
208
209
|
});
|
|
209
210
|
const references = [...new Set(content.match(/\bmcp__[A-Za-z0-9_-]+__[A-Za-z0-9_-]+|\bfunctions\.(?:exec_command|apply_patch|spawn_agent|send_input|wait_agent)|\$\{(?:CLAUDE_)?PLUGIN_(?:ROOT|DATA|RESOURCES)\}/g) ?? [])].slice(0, 20);
|
|
210
211
|
const message = references.length ? `Host-specific references need execution verification: ${references.join(", ")}` : "Skill format accepted; business execution is not verified.";
|
|
@@ -277,4 +277,4 @@ export declare const GATEWAY_BUILTIN_TOOLS: readonly [{
|
|
|
277
277
|
readonly zh: "使用已验证的参数执行选定的外部工具。";
|
|
278
278
|
};
|
|
279
279
|
}];
|
|
280
|
-
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "
|
|
280
|
+
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "xopc_tool_search" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "xopc_tool_describe" | "phone_use" | "skill_view" | "skills_list" | "image_generate" | "skill_manage" | "skills_marketplace_search" | "computer_use" | "send_message" | "text_to_speech" | "execute_code" | "send_media" | "create_share" | "memory_maintenance" | "skill_install" | "delegate_task" | "create_desktop_pet")[];
|
|
@@ -27,6 +27,14 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
27
27
|
return { register: registerPhoneRoutes };
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
id: "session-input-control",
|
|
32
|
+
match: (path) => /^\/api\/sessions\/[^/]+\/input-control$/.test(path),
|
|
33
|
+
load: async () => {
|
|
34
|
+
const { registerSessionInputControlRoutes } = await import("./session-input-control.js");
|
|
35
|
+
return { register: registerSessionInputControlRoutes };
|
|
36
|
+
}
|
|
37
|
+
},
|
|
30
38
|
{
|
|
31
39
|
id: "next-turn-suggestions",
|
|
32
40
|
match: (path) => /^\/api\/sessions\/[^/]+\/(?:next-turn-suggestion|next-turn-suggestion-feedback)$/.test(path),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../../config/paths-state.js";
|
|
2
|
+
import { managedHdcPath, managedHosJar, managedJavaHome } from "../../../runtime-tools/harmony-paths.js";
|
|
2
3
|
import { resolveAdbPath } from "../../../phone/adb-driver.js";
|
|
3
4
|
import { getPhoneRuntime } from "../../../phone/runtime.js";
|
|
4
5
|
import { RuntimeError } from "../../../runtime-tools/errors.js";
|
|
@@ -16,7 +17,8 @@ function registerPhoneDependencyRoutes(parent, deps) {
|
|
|
16
17
|
const manager = () => new PhoneDependencyManager({
|
|
17
18
|
stateDir: resolveStateDir(),
|
|
18
19
|
config: deps.service.currentConfig.runtimeTools,
|
|
19
|
-
adbPath: deps.service.currentConfig.phone.adbPath
|
|
20
|
+
adbPath: deps.service.currentConfig.phone.adbPath,
|
|
21
|
+
phone: deps.service.currentConfig.phone
|
|
20
22
|
});
|
|
21
23
|
const adbBusy = () => getPhoneRuntime().reports().some((report) => report.status !== "closed");
|
|
22
24
|
app.use(`${base}/*`, bodyLimit({ maxSize: 8192 }));
|
|
@@ -68,7 +70,13 @@ function registerPhoneDependencyRoutes(parent, deps) {
|
|
|
68
70
|
return c.json({ ok: true });
|
|
69
71
|
});
|
|
70
72
|
app.post(`${base}/:kind/:action/stream`, deps.strictRateLimitMiddleware, async (c) => {
|
|
71
|
-
const kind = z.enum([
|
|
73
|
+
const kind = z.enum([
|
|
74
|
+
"adb",
|
|
75
|
+
"scrcpy",
|
|
76
|
+
"hdc",
|
|
77
|
+
"hoscrcpy",
|
|
78
|
+
"java"
|
|
79
|
+
]).parse(c.req.param("kind"));
|
|
72
80
|
const action = z.enum([
|
|
73
81
|
"install",
|
|
74
82
|
"repair",
|
|
@@ -79,9 +87,9 @@ function registerPhoneDependencyRoutes(parent, deps) {
|
|
|
79
87
|
ok: false,
|
|
80
88
|
message: "Only scrcpy server imports accept a file path"
|
|
81
89
|
}, 400);
|
|
82
|
-
if (kind
|
|
90
|
+
if (kind !== "scrcpy" && adbBusy()) return c.json({
|
|
83
91
|
ok: false,
|
|
84
|
-
message: "Close the current phone session before installing or repairing
|
|
92
|
+
message: "Close the current phone session before installing or repairing shared phone dependencies",
|
|
85
93
|
error: "PHONE_DEPENDENCY_BUSY"
|
|
86
94
|
}, 409);
|
|
87
95
|
const runtime = manager();
|
|
@@ -99,10 +107,23 @@ function registerPhoneDependencyRoutes(parent, deps) {
|
|
|
99
107
|
};
|
|
100
108
|
runtime.on("progress", progress);
|
|
101
109
|
try {
|
|
110
|
+
const config = deps.service.currentConfig;
|
|
102
111
|
await runtime.install(kind, {
|
|
103
112
|
repair: action === "repair",
|
|
104
|
-
sourcePath: input.path
|
|
113
|
+
sourcePath: input.path,
|
|
114
|
+
beforeCommit: () => {
|
|
115
|
+
if (kind !== "scrcpy" && adbBusy()) throw new Error("Close active phone sessions before changing shared phone dependencies");
|
|
116
|
+
}
|
|
105
117
|
});
|
|
118
|
+
if (kind === "hdc" || kind === "hoscrcpy" || kind === "java") {
|
|
119
|
+
const next = structuredClone(config);
|
|
120
|
+
if (kind === "hdc") next.phone.hdcPath = managedHdcPath();
|
|
121
|
+
else next.phone.hdcVideo = {
|
|
122
|
+
...next.phone.hdcVideo,
|
|
123
|
+
...kind === "java" ? { javaHome: managedJavaHome() } : { sdkJar: managedHosJar() }
|
|
124
|
+
};
|
|
125
|
+
if (!(await deps.service.saveConfig(next, config)).saved) throw new Error("Phone configuration changed; refresh before using the installed dependency");
|
|
126
|
+
}
|
|
106
127
|
await writes;
|
|
107
128
|
deps.service.emit("runtime-tools.updated", { dependency: kind });
|
|
108
129
|
await stream.writeSSE({
|
|
@@ -6,6 +6,7 @@ import { resolveEffectiveAgentConfigForAgent } from "../../../config/agent-profi
|
|
|
6
6
|
import { phoneModelProfile } from "../../../phone/model-policy.js";
|
|
7
7
|
import { getAllModels, init_providers, isProviderConfiguredSync, resolveModel } from "../../../providers/index.js";
|
|
8
8
|
import { phoneAllowsApp } from "../../../phone/app-access.js";
|
|
9
|
+
import { managedHdcPath, managedHosJar, managedJavaHome } from "../../../runtime-tools/harmony-paths.js";
|
|
9
10
|
import { managedPhoneAdbPath } from "../../../runtime-tools/phone-dependency-catalog.js";
|
|
10
11
|
import "../../../phone/model-adapter.js";
|
|
11
12
|
import { getPhoneRuntime } from "../../../phone/runtime.js";
|
|
@@ -31,7 +32,8 @@ function createPhoneSetupService(service) {
|
|
|
31
32
|
const manager = () => new PhoneDependencyManager({
|
|
32
33
|
stateDir: resolveStateDir(),
|
|
33
34
|
config: service.currentConfig.runtimeTools,
|
|
34
|
-
adbPath: service.currentConfig.phone.adbPath
|
|
35
|
+
adbPath: service.currentConfig.phone.adbPath,
|
|
36
|
+
phone: service.currentConfig.phone
|
|
35
37
|
});
|
|
36
38
|
const requireIdle = () => {
|
|
37
39
|
if (runtime.reports().some((report) => ![
|
|
@@ -75,14 +77,26 @@ function createPhoneSetupService(service) {
|
|
|
75
77
|
},
|
|
76
78
|
install: async (kind, repair, mutation) => {
|
|
77
79
|
mutation?.check();
|
|
78
|
-
if (kind
|
|
80
|
+
if (kind !== "scrcpy") requireIdle();
|
|
79
81
|
const config = service.currentConfig;
|
|
80
82
|
await manager().install(kind, {
|
|
81
83
|
repair,
|
|
82
84
|
signal: mutation?.signal,
|
|
83
|
-
beforeCommit:
|
|
85
|
+
beforeCommit: () => {
|
|
86
|
+
mutation?.check();
|
|
87
|
+
if (kind !== "scrcpy") requireIdle();
|
|
88
|
+
}
|
|
84
89
|
});
|
|
85
90
|
mutation?.check();
|
|
91
|
+
if (kind === "hdc" || kind === "hoscrcpy" || kind === "java") {
|
|
92
|
+
const next = structuredClone(config);
|
|
93
|
+
if (kind === "hdc") next.phone.hdcPath = managedHdcPath();
|
|
94
|
+
else next.phone.hdcVideo = {
|
|
95
|
+
...next.phone.hdcVideo,
|
|
96
|
+
...kind === "java" ? { javaHome: managedJavaHome() } : { sdkJar: managedHosJar() }
|
|
97
|
+
};
|
|
98
|
+
if (!(await service.saveConfig(next, config, mutation?.check)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
99
|
+
}
|
|
86
100
|
if (kind === "adb" && config.phone.adbPath) {
|
|
87
101
|
const path = managedPhoneAdbPath(resolveStateDir());
|
|
88
102
|
await probePhoneAdb(path);
|
|
@@ -92,16 +106,17 @@ function createPhoneSetupService(service) {
|
|
|
92
106
|
if (!(await service.saveConfig(next, config, mutation?.check)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
93
107
|
}
|
|
94
108
|
},
|
|
95
|
-
registerLocal: async (serial, name, mutation) => {
|
|
96
|
-
const discovered = (await runtime.discover(service.currentConfig)).find((phone) => phone.serial === serial && phone.state === "device");
|
|
109
|
+
registerLocal: async (serial, name, mutation, platform = "android") => {
|
|
110
|
+
const discovered = (await runtime.discover(service.currentConfig, mutation?.signal, platform)).find((phone) => phone.serial === serial && phone.state === "device" && (phone.platform ?? "android") === platform);
|
|
97
111
|
mutation?.check();
|
|
98
112
|
if (!discovered) throw new Error("PHONE_SETUP_DEVICE_OFFLINE: Select an online discovered local phone.");
|
|
99
|
-
if (!runtime.repository.list().some((phone) => phone.serial === serial)) runtime.repository.save({
|
|
113
|
+
if (!runtime.repository.list().some((phone) => phone.serial === serial && (phone.platform ?? "android") === platform)) runtime.repository.save({
|
|
100
114
|
serial,
|
|
115
|
+
platform,
|
|
101
116
|
name: name?.trim() || discovered.name,
|
|
102
117
|
enabled: true,
|
|
103
118
|
appAccess: "selected",
|
|
104
|
-
allowedApps: ["com.android.settings"]
|
|
119
|
+
allowedApps: [platform === "harmonyos" ? "com.huawei.hmos.settings" : "com.android.settings"]
|
|
105
120
|
});
|
|
106
121
|
},
|
|
107
122
|
revision: (context, deviceId) => {
|
|
@@ -139,12 +154,17 @@ function createPhoneSetupService(service) {
|
|
|
139
154
|
const dependencies = await new PhoneDependencyManager({
|
|
140
155
|
stateDir: resolveStateDir(),
|
|
141
156
|
config: config.runtimeTools,
|
|
142
|
-
adbPath: config.phone.adbPath
|
|
143
|
-
|
|
157
|
+
adbPath: config.phone.adbPath,
|
|
158
|
+
phone: config.phone
|
|
159
|
+
}).status(source === "harmonyos" ? [
|
|
160
|
+
"hdc",
|
|
161
|
+
"java",
|
|
162
|
+
"hoscrcpy"
|
|
163
|
+
] : source ? ["adb", "scrcpy"] : void 0);
|
|
144
164
|
let localDiscovery = [];
|
|
145
165
|
let diagnostic;
|
|
146
|
-
if (source === "local" && dependencies.some((item) => item.kind === "adb" && item.state === "ready")) try {
|
|
147
|
-
localDiscovery = (await runtime.discover(config)).map(({ serial, name, state, emulator }) => ({
|
|
166
|
+
if ((source === "local" || source === "harmonyos") && dependencies.some((item) => item.kind === (source === "harmonyos" ? "hdc" : "adb") && item.state === "ready")) try {
|
|
167
|
+
localDiscovery = (await runtime.discover(config, void 0, source === "harmonyos" ? "harmonyos" : "android")).map(({ serial, name, state, emulator }) => ({
|
|
148
168
|
serial,
|
|
149
169
|
name,
|
|
150
170
|
state,
|
|
@@ -163,18 +183,20 @@ function createPhoneSetupService(service) {
|
|
|
163
183
|
supported: Boolean(model && phoneModelProfile(model)),
|
|
164
184
|
configured: Boolean(model && isProviderConfiguredSync(model.provider))
|
|
165
185
|
},
|
|
166
|
-
dependencies: dependencies.map(({ kind, state, version, canInstall }) => ({
|
|
186
|
+
dependencies: dependencies.map(({ kind, state, version, canInstall, distribution, downloadUrl }) => ({
|
|
167
187
|
kind,
|
|
168
188
|
state,
|
|
169
189
|
version,
|
|
170
|
-
canInstall
|
|
190
|
+
canInstall,
|
|
191
|
+
distribution,
|
|
192
|
+
downloadUrl
|
|
171
193
|
})),
|
|
172
194
|
devices: runtime.repository.list().map((device) => ({
|
|
173
195
|
id: device.id,
|
|
174
196
|
name: device.name,
|
|
175
|
-
source: device.connection ? "aliyun" : "local",
|
|
197
|
+
source: device.platform === "harmonyos" ? "harmonyos" : device.connection ? "aliyun" : "local",
|
|
176
198
|
enabled: device.enabled,
|
|
177
|
-
settingsAllowed: phoneAllowsApp(device, "com.android.settings")
|
|
199
|
+
settingsAllowed: phoneAllowsApp(device, device.platform === "harmonyos" ? "com.huawei.hmos.settings" : "com.android.settings")
|
|
178
200
|
})),
|
|
179
201
|
localDiscovery,
|
|
180
202
|
diagnostic
|
|
@@ -200,7 +222,11 @@ function registerPhoneSetupRoutes(app, deps) {
|
|
|
200
222
|
]),
|
|
201
223
|
modelRef: z.string().min(1).max(500).optional(),
|
|
202
224
|
replaceExisting: z.boolean().optional(),
|
|
203
|
-
source: z.enum([
|
|
225
|
+
source: z.enum([
|
|
226
|
+
"local",
|
|
227
|
+
"aliyun",
|
|
228
|
+
"harmonyos"
|
|
229
|
+
]).optional(),
|
|
204
230
|
deviceId: z.string().uuid().optional(),
|
|
205
231
|
expectedRevision: z.number().int().positive().optional()
|
|
206
232
|
});
|