@xopcai/xopc 0.0.432 → 0.0.434
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/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{activity-store-iTw0JzOx.js → activity-store-Cwn_CNwl.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CXuMwQ4y.js → agent-avatar-dicebear-Cd23LnJJ.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-hRyDKdPJ.js → agent-avatar-display-ByzM7u9S.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BBRKBHLB.js → agent-defaults-settings-panel-B0i37diS.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-PoKk6j20.js → agent-plugin-dialog-XN-tZ-Ox.js} +1 -1
- package/dist/gateway/static/root/assets/{agents--P5-QEHR.js → agents-ZDA1OaLv.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DuYzWKP8.js → agents-admin-api-B5lKH_ps.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DT_Aly4B.js → api-B9fZL-V8.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BeNB3MkI.js → api-Djju8qIR.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C4JhA-Kz.js → app-management-settings-panel-IlyzDPJu.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-YM311zxY.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-DoYjGZv1.js → archive-plugin-4gEvotPr.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-ZD1VY9jO.js → automation-api-4fVKv9PJ.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-BO5N3gMt.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--K7uiKHL.js → automation-task-card-DZWhCWJa.js} +3 -3
- package/dist/gateway/static/root/assets/{automations-page-Clcl5MI7.js → automations-page-CmxICTM4.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-R6YNDdAO.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-B-dkI6-B.js → binary-plugins-69WyJLNW.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CB6KruU-.js → block-editor-DUONDIZR.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Bk_QFbzb.js → browser-automation-inputs-DL4YPCuN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-54eckhYq.js → browser-automations-page-1Aq6XmRs.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-control-api-B4T1KPPz.js → browser-control-api-yjru8E7R.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-rOmS1-T8.js → browser-settings-page-CvwpT8Um.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-D_Uqx5il.js → capabilities-C7lnwKKm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DBDeifNA.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-iQPbNO4A.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-DsEP_hFB.js → channels-CoQb4HOF.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-D5-xZdAt.js → chat-agents-api-BUi_7GRo.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-B-ri4wfk.js → chat-chart-block-CcVcKsDZ.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-BJ8PlDjZ.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-RcrdmYe8.js → chat-terminal-dock-BMXJpPuH.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-DFd-zOz_.js → command-palette-api-luUjQPsh.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-hccuv1Lk.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-C3ZhlR8V.js → connector-service-page-C3msXaBk.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-D6CPY0Nu.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-D3bxeryy.js → date-picker-Cfjq1hD_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-B7kSoCSo.js → desktop-pet-ChFn9v-3.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-3dEeKSHA.js → desktop-pet-settings-DvnVIv25.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-Dk7ylv5S.js → dev-view-store-DQJ61P5L.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CstPAnnj.js → device-pairing-wizard-KxaIL-OX.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BUGqS-lm.js → directory-picker-path-field-Drv864uE.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-D9-wFJDS.js → discussion-annotation-sync-DfBRkWtw.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BDTA9XDE.js → extension-debug-page-DAlBIt_R.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CPEaw2ZG.js → extension-iframe-host-Bds-5kY_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-edmEFM6F.js → extension-marketplace-api-CZg8nBwW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Biz-65E8.js → extension-page-ZTw-oucT.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DCur0Xcb.js → extension-provider-NKWfjpdP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CvPK63oz.js → extension-settings-page-CT7PPt_q.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-BFs1sAID.js → file-preview-surface-BcLeaSNe.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-C-fPl1hP.js → gateway-config-swr-Cq-ByXL4.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-xZpX_HCq.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-BfozBI8f.js → gateway-restart-DdiVzbkL.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-A8BUKcfx.js → gateway-settings-1QUdNwrZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BRrkiv67.js → gateway-startup-retry-PMJi5mX4.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-C9O_X0pj.js → global-defaults-api-DgzZh3wX.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CzS-ROXe.js → home-page-Chn7YTiD.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-ohquPPls.js → image-generation-api-CjVpsckq.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DAebChWv.js → imports-page-CJCvZFaQ.js} +1 -1
- package/dist/gateway/static/root/assets/index-DWQ4LbBn.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-Bv4YJpTl.js → keyboard-shortcuts-settings-BylFJeGu.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-OhV8UnzK.js → local-app-workbench-page-B3MSSFsr.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-ADzWmh3T.js → local-apps-page-BeV86rMJ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DgtYzPiy.js → local-session-drafts-jgw8UGsO.js} +2 -2
- package/dist/gateway/static/root/assets/{locale-store-fGFrr4_4.js → locale-store-CAZaC05J.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-i0eD_bSC.js → logs-page-BMmSsUP5.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-C-JTxRjw.js → management-settings-Bu7T8ewk.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Cnt8oxNg.js → markdown-view-BatP4qeK.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-BQ_US_jP.js → mcp-conversation-setup-page-rROtr0UN.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-cphVSfva.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-Bv-anQ6O.js → model-selector-raBRBkN_.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-BLYpN4bJ.js → models-hub-cache-CzC9y3D0.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-B-pk3LYN.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-IIQgxlMj.js → notes-api-zXpV6UXu.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-C6l9zI17.js → notes-page-CjYH9Kle.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-BojfhqmL.js → oauth-api-DmxSaxM1.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-D_p1ez-o.js → oauth-provider-connect-D4Gfs-Ba.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CiEaCz7v.js → page-context-capture-button-Mig3d0UX.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-BbGvUKjF.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-Cq0y6LEK.js → personal-avatar-DLa-CpaK.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-CDad-FDO.js → personal-page-l9_vYfdJ.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-yVUzcKoo.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-DoTZvoDh.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-oZm_6PvN.js → preference-select-fields-BVP3MhGK.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-Ddj5cmmF.js → product-automation-feedback-DbJvv92z.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CTuqeUDh.js → product-open-page-RImqlhCD.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-Ci8eDZ2h.js → product-preview-content-DxSqrKsg.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-J-9O-eQ2.js → product-preview-modal-Cw8Q8Uom.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-D8QlmMQp.js → project-detail-page-BbyV8EiG.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-8DBS77KV.js → project-understanding-BMKcoUW5.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CEyyFqca.js → projects-page-CFsABLvs.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-DyX07mht.js → providers-api-CAeXbJNF.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-DOhMs_aU.js → recording-upload-CfpllTe5.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bm7kut54.js → registry-api-fLOqFyrz.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DfCkv8XR.js → remote-access-hub-BvKOxy0L.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-jg8QV_tO.js → resource-unavailable-D15jzjV_.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-BWpw9qxc.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-BpaZgv-a.js → runtime-tools-api-D0Nrvuqv.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CGnX0DY1.js → runtime-tools-settings-panel-CA27XgL2.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-NdwoBa_O.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-CAutHonI.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-CICMnCwv.js → settings-advanced-section-D-llwfSj.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-DCnYgG87.js → settings-mode-store-BspMKc9N.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CZXi8Jro.js → settings-page-XJXcnE1_.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-DH1qb4vP.js → settings-page-header-LuOJvqNa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B2G042F2.js → settings-page-layout-CduQ8w4a.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-B-tpfd3l.js → setup-interaction-page-ujpPGl84.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DtA2Lb-A.js → setup-status-panel-BN2aCJUN.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-BjjkGRWn.js → share-link-dialog-CTATUaa4.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BBaJCO3w.js → share-preview-page-Dq0J3VgS.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-C1rliVTe.js → shares-api-zegE8pSE.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BMctLz4y.js → shares-settings-DXpvsRXq.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-fWp7oUet.js → skill-api-DCL1EN7f.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-B-2Dod7G.js → skill-list-api-Bv0mmHbu.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Cejk-tbD.js → skill-reload-api-DPZbadiO.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-D-dxO0Vc.js → skills-page-DMC7Gaku.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-D-gdBXlK.js → system-settings-panel-BYFUhlqG.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CIX4EckU.js → task-detail-page-DvX9JoEd.js} +3 -3
- package/dist/gateway/static/root/assets/{task-result-evidence-Dp6gk3xn.js → task-result-evidence-Bxm8-H0B.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-BDrza-7c.js → terminal-panel-store-Djf9l2qZ.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-De43hGnm.js → theme-store-8GFVtotZ.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-DlQJAutq.js → tracing-settings-page-oWW3SBZ4.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-BSeDyRBI.js → tunnel-api-D-mEsSGF.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-CABSRtdN.js → understanding-activity-store-CvDjsd0I.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-C5pXQtC9.js → understanding-refresh-store-DzOZJm7A.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Dd6gyHlm.js → usage-page-z-o6Uuev.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BhdMHxgz.js → use-autosave-BVYS8UoK.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-Baw8AHhn.js → use-composer-attachments-lecOV2q5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-B_cRX1Ih.js → use-file-preview-expanded-nd_CuFsd.js} +2 -2
- package/dist/gateway/static/root/assets/{use-personal-profile-DL5rDvwX.js → use-personal-profile-CQi2ZCxV.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-DONQqfmT.js → use-workspace-tree-BiaddkzX.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-u2vtyxcX.js → user-model-page-Bks1n0Nj.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-OChN73N1.js → voice-api-key-field-BbW8NFeZ.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CziHHWRu.js → voice-config-api-jSMzZWWy.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-CWSb-oJe.js → voice-input-shortcut-events-_SgYmx7X.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-CqEwxj11.js → voice-transcribe-api-BJCfiRFU.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BJT2mARb.js → work-discovery-overlay-DSTSNyU7.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CkHMAnBc.js → work-discovery-page-Dd_QJJvb.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-CpZEiO2a.js → working-directory-picker-modal-q39BUcJ6.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-Yi28Sl0C.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-MLLldcHQ.js → workspace-file-preview-dialog-BUGNT765.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-CjfDtW9T.js → workspace-open-location-menu-bMSvmQW7.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-FioKsLPf.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/agent-manager.js +17 -17
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +11 -11
- package/dist/src/agent/child-agent-factory.js +2 -2
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +3 -3
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +29 -14
- package/dist/src/agent/embedded/run-turn.js +48 -25
- 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 +30 -15
- package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
- 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/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.d.ts +10 -9
- package/dist/src/agent/external-tools/cliProvider.js +27 -7
- package/dist/src/agent/external-tools/composio-provider.d.ts +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +8 -5
- 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/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +27 -47
- 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/memory-provider.js +1 -1
- 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/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +2 -2
- package/dist/src/agent/inbound/inbound-loop.js +2 -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/independent-execution.js +2 -2
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/mcp/connection-drafts.js +1 -1
- package/dist/src/agent/mcp/connection-setup.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.js +1 -1
- package/dist/src/agent/mcp/discovery.js +2 -2
- package/dist/src/agent/mcp/transport.js +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +14 -9
- 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/response-language.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -3
- package/dist/src/agent/prompt/system-prompt-params.js +1 -1
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +6 -6
- package/dist/src/agent/service/process-direct-streaming.js +6 -6
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +21 -21
- package/dist/src/agent/session/session-config-service.js +2 -2
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +1 -1
- package/dist/src/agent/source-context/index.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +8 -8
- 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/create-share-tool.js +2 -2
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/delegation-policy.js +1 -0
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +23 -21
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +2 -2
- package/dist/src/agent/tools/index.js +4 -4
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +2 -2
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +4 -4
- package/dist/src/agent/tools/personal-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +5 -5
- package/dist/src/agent/tools/phone-use-tool.js +3 -3
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +2 -2
- package/dist/src/agent/tools/web.js +23 -4
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +10 -10
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/agent-matching/service.js +2 -2
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth/openai.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/automations/delivery/delivery-router.js +1 -1
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.js +2 -2
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/store-connector.js +2 -2
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension.js +2 -2
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +4 -4
- package/dist/src/cli/extension-cli-register.js +5 -5
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/cli/utils/session.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 +28 -2
- package/dist/src/computer/broker.js +95 -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/flows.js +1 -1
- package/dist/src/computer/model-adapter.d.ts +58 -0
- package/dist/src/computer/model-adapter.js +113 -67
- 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 +106 -38
- package/dist/src/computer/semantic-actions.js +4 -0
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +6 -0
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +2 -2
- package/dist/src/connectors/connected-source-understanding.js +5 -5
- package/dist/src/connectors/connection-recovery-service.js +4 -4
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/instances.js +1 -1
- package/dist/src/connectors/runtime-adapter-registry.js +2 -2
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/endpoint-tools/index.js +1 -1
- package/dist/src/endpoint-tools/runtime.js +2 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- 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/skill-catalog.js +2 -2
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -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/extensions/api.js +3 -3
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +3 -3
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +2 -2
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/location-sharing.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +3 -3
- package/dist/src/gateway/hono/routes/models.js +4 -4
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/phone-dependencies.js +27 -6
- package/dist/src/gateway/hono/routes/phone-setup.js +43 -17
- package/dist/src/gateway/hono/routes/phone.js +24 -9
- package/dist/src/gateway/hono/routes/projects.js +4 -4
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +11 -2
- 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 +27 -5
- package/dist/src/gateway/hono/routes/sessions.js +7 -3
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/side-chats.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +7 -7
- package/dist/src/gateway/hono/routes/voice.js +7 -7
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +7 -6
- package/dist/src/gateway/service/config-coordinator.d.ts +6 -0
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +5 -5
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service/session-input-coordinator.d.ts +6 -3
- package/dist/src/gateway/service/session-input-coordinator.js +48 -7
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +45 -42
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/imports/inventory.js +2 -2
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +9 -9
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/knowledge-memory/usage-policy.js +1 -1
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/memory-learning/source-learning.js +5 -5
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +3 -3
- package/dist/src/personal-agent/capability-service.js +3 -3
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +7 -7
- package/dist/src/personal-agent/prompt-context.js +7 -7
- package/dist/src/personal-agent/prompts.js +2 -2
- package/dist/src/personal-agent/reply-composer.js +9 -9
- 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-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +9 -9
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- 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 +6 -4
- package/dist/src/phone/repository.js +3 -2
- package/dist/src/phone/runtime.d.ts +10 -4
- package/dist/src/phone/runtime.js +154 -88
- 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/projects/index.js +2 -2
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +2 -2
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- 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 +22 -4
- 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/session/client-history.d.ts +2 -0
- package/dist/src/session/client-history.js +3 -0
- package/dist/src/session/compact-history.js +1 -0
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/store.js +5 -5
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- 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/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +5 -5
- package/dist/src/tasks/task-allocation-service.js +5 -5
- package/dist/src/tasks/task-application-service.js +5 -5
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-contract-planner.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +4 -4
- package/dist/src/tasks/task-main-update-decision-service.js +3 -3
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-research-result.js +4 -4
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +3 -3
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +11 -11
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -5
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +4 -4
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/user-model/usage-policy.js +1 -1
- package/dist/src/voice/realtime/memory-context.js +5 -5
- package/dist/src/voice/realtime/omniRoute.js +1 -1
- package/dist/src/voice/realtime/runtime.js +4 -4
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/bailian-plan-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/bailian-plan-speech.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/voice/tts/speak-core.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- 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-BrnAMjXr.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DM67xMcR.js +0 -9
- package/dist/gateway/static/root/assets/capabilities-page-DOMoAom0.js +0 -2
- package/dist/gateway/static/root/assets/capability-links-DzQWK1Fh.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-DQNLsOad.js +0 -72
- package/dist/gateway/static/root/assets/computer-settings-page-C-7YLU9l.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-DziNfbFz.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CcG3V3OB.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-eEZgUEdH.js +0 -1
- package/dist/gateway/static/root/assets/index-BinHjymm.js +0 -11
- package/dist/gateway/static/root/assets/index-Cz-VjTNd.css +0 -1
- package/dist/gateway/static/root/assets/install-connector-dialog-xHNBuSj0.js +0 -1
- package/dist/gateway/static/root/assets/list-tree-B0OMswgM.js +0 -1
- package/dist/gateway/static/root/assets/messages-9OwWjlww.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DOG9mCzE.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-DBeD_mAA.js +0 -1
- package/dist/gateway/static/root/assets/phone-dependencies-card-CM2Mj4rH.js +0 -1
- package/dist/gateway/static/root/assets/phone-model-connection-kJYAiCgI.js +0 -1
- package/dist/gateway/static/root/assets/phone-model-picker-sXs8PpFk.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-ayCImqUb.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-B4qZ0obG.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-Uhpfz1Jz.js +0 -2
- package/dist/gateway/static/root/assets/session-api-BwcBcvzv.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-SASXxhrN.js +0 -23
- package/dist/gateway/static/root/assets/settings-advanced-gate-iUlbBMZI.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Bz_M_rk3.js +0 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { ComputerPrimitiveActionSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
2
|
+
import { ComputerExpectationSchema } from "./task-state.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { setTimeout } from "node:timers/promises";
|
|
5
|
+
//#region src/computer/batch.ts
|
|
6
|
+
init_src();
|
|
7
|
+
const Target = z.object({
|
|
8
|
+
role: z.string().min(1).max(100),
|
|
9
|
+
label: z.string().max(300)
|
|
10
|
+
}).strict();
|
|
11
|
+
const PlannedAction = z.union(ComputerPrimitiveActionSchema.options.map((option) => "ref" in option.shape ? option.extend({ ref: z.string().min(1).max(200).optional() }) : option));
|
|
12
|
+
const ComputerBatchSchema = z.object({
|
|
13
|
+
snapshotId: z.string().min(1).max(200),
|
|
14
|
+
steps: z.array(z.union([z.object({
|
|
15
|
+
kind: z.literal("action"),
|
|
16
|
+
action: PlannedAction,
|
|
17
|
+
target: Target.optional()
|
|
18
|
+
}).strict(), z.object({
|
|
19
|
+
kind: z.literal("observe"),
|
|
20
|
+
expect: ComputerExpectationSchema.optional(),
|
|
21
|
+
timeoutMs: z.number().int().min(0).max(5e3).optional(),
|
|
22
|
+
visual: z.boolean().optional()
|
|
23
|
+
}).strict()])).min(1).max(24)
|
|
24
|
+
}).strict();
|
|
25
|
+
/** Checkpoints delimit native dispatches; a failed condition never starts the next segment. */
|
|
26
|
+
async function executeComputerBatch(raw, host, options) {
|
|
27
|
+
const input = ComputerBatchSchema.parse(raw);
|
|
28
|
+
if (input.steps.filter((step) => step.kind === "action").length > options.remainingInputs) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
29
|
+
let state = options.state(input.snapshotId);
|
|
30
|
+
let afterCheckpoint = false;
|
|
31
|
+
let queued = [];
|
|
32
|
+
const receipts = [];
|
|
33
|
+
const finish = (status, nextStep, verification) => ({
|
|
34
|
+
...state,
|
|
35
|
+
status,
|
|
36
|
+
nextStep,
|
|
37
|
+
receipts,
|
|
38
|
+
...verification ? { verification } : {}
|
|
39
|
+
});
|
|
40
|
+
const flush = async () => {
|
|
41
|
+
if (!queued.length) return;
|
|
42
|
+
state = await host("act", {
|
|
43
|
+
snapshotId: state.snapshotId,
|
|
44
|
+
action: {
|
|
45
|
+
kind: "batch",
|
|
46
|
+
actions: queued
|
|
47
|
+
}
|
|
48
|
+
}, options.signal);
|
|
49
|
+
receipts.push(state.receipt);
|
|
50
|
+
queued = [];
|
|
51
|
+
};
|
|
52
|
+
for (const [index, step] of input.steps.entries()) {
|
|
53
|
+
options.signal.throwIfAborted();
|
|
54
|
+
if (step.kind === "action") {
|
|
55
|
+
let action = step.action;
|
|
56
|
+
if (step.target) {
|
|
57
|
+
if (!("ref" in action) && ![
|
|
58
|
+
"activate",
|
|
59
|
+
"showMenu",
|
|
60
|
+
"setValue",
|
|
61
|
+
"click",
|
|
62
|
+
"scroll",
|
|
63
|
+
"typeText"
|
|
64
|
+
].includes(action.kind)) throw new Error("COMPUTER_INVALID_INPUT");
|
|
65
|
+
const element = await host("resolve", {
|
|
66
|
+
snapshotId: state.snapshotId,
|
|
67
|
+
...step.target
|
|
68
|
+
}, options.signal);
|
|
69
|
+
if ([
|
|
70
|
+
"activate",
|
|
71
|
+
"showMenu",
|
|
72
|
+
"setValue"
|
|
73
|
+
].includes(action.kind)) action = {
|
|
74
|
+
...action,
|
|
75
|
+
ref: element.ref
|
|
76
|
+
};
|
|
77
|
+
else {
|
|
78
|
+
const bounds = z.object({
|
|
79
|
+
x: z.number().finite(),
|
|
80
|
+
y: z.number().finite(),
|
|
81
|
+
width: z.number().positive(),
|
|
82
|
+
height: z.number().positive()
|
|
83
|
+
}).parse(element.bounds);
|
|
84
|
+
action = {
|
|
85
|
+
...action,
|
|
86
|
+
point: {
|
|
87
|
+
x: bounds.x + bounds.width / 2,
|
|
88
|
+
y: bounds.y + bounds.height / 2
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
} else if (afterCheckpoint && ("ref" in action || [
|
|
93
|
+
"activate",
|
|
94
|
+
"showMenu",
|
|
95
|
+
"setValue",
|
|
96
|
+
"click",
|
|
97
|
+
"scroll",
|
|
98
|
+
"typeText",
|
|
99
|
+
"drag"
|
|
100
|
+
].includes(action.kind))) throw new Error("COMPUTER_ELEMENT_REF_REQUIRED");
|
|
101
|
+
queued.push(ComputerPrimitiveActionSchema.parse(action));
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
await flush();
|
|
105
|
+
let verification;
|
|
106
|
+
if (step.expect) {
|
|
107
|
+
const deadline = Date.now() + (step.timeoutMs ?? 2e3);
|
|
108
|
+
for (let sample = 0;; sample++) {
|
|
109
|
+
verification = options.verify(step.expect);
|
|
110
|
+
if (verification?.status === "satisfied") break;
|
|
111
|
+
if (sample >= 19 || Date.now() >= deadline) return finish("condition_not_met", index, verification);
|
|
112
|
+
await setTimeout(Math.min(25 * 2 ** Math.min(sample, 3), 200, Math.max(0, deadline - Date.now())), void 0, { signal: options.signal });
|
|
113
|
+
state = await host("observe", {}, options.signal);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (step.visual) await host("emitScreenshot", { snapshotId: state.snapshotId }, options.signal);
|
|
117
|
+
if ((!step.expect || step.visual) && index < input.steps.length - 1) return finish("observation_required", index + 1, verification);
|
|
118
|
+
afterCheckpoint = true;
|
|
119
|
+
if (index === input.steps.length - 1) return finish("batch_completed", index + 1, verification);
|
|
120
|
+
}
|
|
121
|
+
await flush();
|
|
122
|
+
return finish("batch_completed", input.steps.length);
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { ComputerBatchSchema, executeComputerBatch };
|
|
@@ -12,6 +12,9 @@ export interface DriverObservation {
|
|
|
12
12
|
imageHeight: number;
|
|
13
13
|
}
|
|
14
14
|
export interface ComputerDriver {
|
|
15
|
+
getPreparationState?(): {
|
|
16
|
+
startedAt: number;
|
|
17
|
+
} | undefined;
|
|
15
18
|
discover(query: string, signal: AbortSignal): Promise<Array<{
|
|
16
19
|
appId: string;
|
|
17
20
|
name: string;
|
|
@@ -23,10 +26,13 @@ export interface ComputerDriver {
|
|
|
23
26
|
windowRef?: string;
|
|
24
27
|
}): Promise<ComputerTarget>;
|
|
25
28
|
observe(target: ComputerTarget, signal: AbortSignal): Promise<DriverObservation>;
|
|
26
|
-
perform(target: ComputerTarget, action: ComputerAction, signal: AbortSignal): Promise<void>;
|
|
29
|
+
perform(target: ComputerTarget, action: ComputerAction, signal: AbortSignal, onProgress?: (index: number, dispatch: 'notStarted' | 'started' | 'completed' | 'unknown') => void): Promise<void>;
|
|
27
30
|
getLastInputTiming?(): ComputerInputTiming | undefined;
|
|
31
|
+
validatePreviewTarget?(target: ComputerTarget, signal: AbortSignal): Promise<void>;
|
|
28
32
|
/** Must finish only after no further input can be dispatched. */
|
|
29
33
|
stop(): Promise<void>;
|
|
34
|
+
/** Quiescent broker-only release: discard target state, retain private transport briefly. */
|
|
35
|
+
idle?(): Promise<void>;
|
|
30
36
|
}
|
|
31
37
|
export type ComputerApproval = {
|
|
32
38
|
kind: 'session';
|
|
@@ -43,6 +49,8 @@ export type ComputerApproval = {
|
|
|
43
49
|
action: ComputerAction;
|
|
44
50
|
};
|
|
45
51
|
export interface ComputerBrokerHost {
|
|
52
|
+
/** Hosts exposing a separate approval UI may opt into the legacy held-action protocol. */
|
|
53
|
+
deferApproval?: boolean;
|
|
46
54
|
requestApproval(request: ComputerApproval, signal: AbortSignal): Promise<boolean>;
|
|
47
55
|
isVisible(): boolean;
|
|
48
56
|
onStateChange?(): void;
|
|
@@ -65,6 +73,17 @@ export interface BrokerResult {
|
|
|
65
73
|
mimeType: 'image/png' | 'image/jpeg';
|
|
66
74
|
};
|
|
67
75
|
}
|
|
76
|
+
/** Host-only authority; never serialize target identities or the session signal. */
|
|
77
|
+
export interface ComputerPreviewAuthority {
|
|
78
|
+
conversationId: string;
|
|
79
|
+
runId?: string;
|
|
80
|
+
computerSessionId: string;
|
|
81
|
+
brokerEpoch: string;
|
|
82
|
+
appName: string;
|
|
83
|
+
status: string;
|
|
84
|
+
target?: ComputerTarget;
|
|
85
|
+
signal: AbortSignal;
|
|
86
|
+
}
|
|
68
87
|
/** Main-process-only authority. Never expose this object or its approval hook to a renderer. */
|
|
69
88
|
export declare class ComputerBroker {
|
|
70
89
|
private readonly driver;
|
|
@@ -92,15 +111,22 @@ export declare class ComputerBroker {
|
|
|
92
111
|
command(raw: ComputerCommand): Promise<BrokerResult>;
|
|
93
112
|
private discover;
|
|
94
113
|
private open;
|
|
114
|
+
private awaitDecision;
|
|
95
115
|
private observe;
|
|
96
116
|
private act;
|
|
97
|
-
stop(): Promise<void>;
|
|
117
|
+
stop(errorCode?: 'COMPUTER_LOCAL_UI_REQUIRED', retainDriver?: boolean): Promise<void>;
|
|
98
118
|
cancel(command: ComputerCommand): Promise<void>;
|
|
99
119
|
snapshot(): {
|
|
100
120
|
status: Status | 'idle';
|
|
101
121
|
errorCode?: string;
|
|
102
122
|
appId?: string;
|
|
123
|
+
preparation?: {
|
|
124
|
+
startedAt: number;
|
|
125
|
+
};
|
|
126
|
+
dispatch?: ComputerReceipt['dispatch'];
|
|
103
127
|
};
|
|
128
|
+
previewAuthority(): ComputerPreviewAuthority | undefined;
|
|
129
|
+
validatePreview(authority: ComputerPreviewAuthority): Promise<void>;
|
|
104
130
|
dispose(): Promise<void>;
|
|
105
131
|
}
|
|
106
132
|
export {};
|
|
@@ -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 { ComputerConfigSchema, init_config } from "./config.js";
|
|
4
|
-
import { ActionEnvelopeSchema, ComputerCommandSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
|
+
import { ActionEnvelopeSchema, ComputerCommandSchema, computerActionInputCount, computerActionInputs, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { ComputerTargetError } from "./errors.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -28,7 +28,7 @@ var ComputerBroker = class {
|
|
|
28
28
|
this.config = ComputerConfigSchema.parse(config);
|
|
29
29
|
this.timer = setInterval(() => {
|
|
30
30
|
const s = this.session;
|
|
31
|
-
if (s && s.status !== "stopped" && (this.expired(s) || !this.host.isVisible())) this.stop().catch(() => {});
|
|
31
|
+
if (s && s.status !== "stopped" && (this.expired(s) || !this.host.isVisible())) this.stop(!this.host.isVisible() ? "COMPUTER_LOCAL_UI_REQUIRED" : void 0).catch(() => {});
|
|
32
32
|
}, 1e3);
|
|
33
33
|
this.timer.unref?.();
|
|
34
34
|
}
|
|
@@ -47,7 +47,11 @@ var ComputerBroker = class {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
active(s) {
|
|
50
|
-
if (
|
|
50
|
+
if (!this.host.isVisible()) {
|
|
51
|
+
s.errorCode ??= "COMPUTER_LOCAL_UI_REQUIRED";
|
|
52
|
+
throw new Error("COMPUTER_LOCAL_UI_REQUIRED");
|
|
53
|
+
}
|
|
54
|
+
if (this.session !== s || s.controller.signal.aborted || this.expired(s)) throw new Error("COMPUTER_GRANT_REVOKED");
|
|
51
55
|
}
|
|
52
56
|
/** Settings-only app catalog. It never returns window contents or task-bound refs. */
|
|
53
57
|
async listAppsForSettings() {
|
|
@@ -70,10 +74,15 @@ var ComputerBroker = class {
|
|
|
70
74
|
const s = this.session;
|
|
71
75
|
if (!s || s.id !== command.sessionId || s.owner !== command.owner) throw new Error("COMPUTER_SESSION_NOT_FOUND");
|
|
72
76
|
if (command.op === "release") {
|
|
73
|
-
await this.stop();
|
|
77
|
+
await this.stop(void 0, !this.busy && s.status === "ready");
|
|
74
78
|
return this.result(s);
|
|
75
79
|
}
|
|
76
80
|
if (command.op === "status") return this.result(s);
|
|
81
|
+
if (command.op === "settle") {
|
|
82
|
+
const decision = s.status === "pending_authorization" ? s.preparation : s.pending?.decision;
|
|
83
|
+
if (decision) await this.awaitDecision(s, decision);
|
|
84
|
+
return this.result(s);
|
|
85
|
+
}
|
|
77
86
|
this.active(s);
|
|
78
87
|
if (this.busy || s.status !== "ready" && s.status !== "pending_action") throw new Error("COMPUTER_NOT_READY");
|
|
79
88
|
this.busy = true;
|
|
@@ -128,7 +137,8 @@ var ComputerBroker = class {
|
|
|
128
137
|
};
|
|
129
138
|
} finally {
|
|
130
139
|
try {
|
|
131
|
-
if (!this.session || this.session.status === "stopped") await this.driver.
|
|
140
|
+
if (!this.session || this.session.status === "stopped") if (!controller.signal.aborted && this.driver.idle) await this.driver.idle();
|
|
141
|
+
else await this.driver.stop();
|
|
132
142
|
} finally {
|
|
133
143
|
this.discovery = void 0;
|
|
134
144
|
this.busy = false;
|
|
@@ -166,7 +176,7 @@ var ComputerBroker = class {
|
|
|
166
176
|
actions: 0
|
|
167
177
|
};
|
|
168
178
|
this.session = s;
|
|
169
|
-
this.host.requestApproval({
|
|
179
|
+
const preparation = this.host.requestApproval({
|
|
170
180
|
kind: "session",
|
|
171
181
|
id: s.id,
|
|
172
182
|
appId: s.appId,
|
|
@@ -194,8 +204,23 @@ var ComputerBroker = class {
|
|
|
194
204
|
if (error instanceof ComputerTargetError) s.windows = error.windows;
|
|
195
205
|
return this.stop().catch(() => {});
|
|
196
206
|
}).finally(() => this.host.onStateChange?.());
|
|
207
|
+
s.preparation = preparation;
|
|
208
|
+
if (!this.host.deferApproval) await this.awaitDecision(s, preparation);
|
|
197
209
|
return this.result(s);
|
|
198
210
|
}
|
|
211
|
+
async awaitDecision(s, decision) {
|
|
212
|
+
if (s.controller.signal.aborted) return;
|
|
213
|
+
let abort;
|
|
214
|
+
const cancelled = new Promise((resolve) => {
|
|
215
|
+
abort = () => resolve(void 0);
|
|
216
|
+
s.controller.signal.addEventListener("abort", abort, { once: true });
|
|
217
|
+
});
|
|
218
|
+
try {
|
|
219
|
+
return await Promise.race([decision, cancelled]);
|
|
220
|
+
} finally {
|
|
221
|
+
s.controller.signal.removeEventListener("abort", abort);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
199
224
|
async observe(s) {
|
|
200
225
|
let frame;
|
|
201
226
|
try {
|
|
@@ -255,6 +280,7 @@ var ComputerBroker = class {
|
|
|
255
280
|
};
|
|
256
281
|
} catch (error) {
|
|
257
282
|
frame?.image.fill(0);
|
|
283
|
+
s.errorCode ??= error instanceof Error && /^COMPUTER_[A-Z_0-9]+$/.test(error.message) ? error.message : "COMPUTER_OBSERVE_FAILED";
|
|
258
284
|
await this.stop().catch(() => {
|
|
259
285
|
log.warn({
|
|
260
286
|
sessionId: s.id,
|
|
@@ -279,9 +305,10 @@ var ComputerBroker = class {
|
|
|
279
305
|
}
|
|
280
306
|
const observed = s.observation;
|
|
281
307
|
if (!observed || e.observationId !== observed.id || this.now() - observed.capturedAt > 12e4) throw new Error("COMPUTER_STALE_OBSERVATION");
|
|
282
|
-
if (s.actions
|
|
283
|
-
|
|
284
|
-
if (
|
|
308
|
+
if (s.actions + computerActionInputCount(e.action) > this.config.maxActionsPerSession) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
309
|
+
const inputs = computerActionInputs(e.action);
|
|
310
|
+
if (inputs.flatMap((action) => action.kind === "drag" ? [action.from, action.to] : "point" in action && action.point ? [action.point] : []).some((point) => point.x >= observed.imageWidth || point.y >= observed.imageHeight)) throw new Error("COMPUTER_COORDINATE_OUTSIDE_WINDOW");
|
|
311
|
+
if (inputs.some((action) => action.kind === "typeText" && !action.point && !observed.focusedEditableRef)) throw new Error("COMPUTER_EDITABLE_TARGET_REQUIRED");
|
|
285
312
|
this.driver.validateAction?.(e.action);
|
|
286
313
|
if (e.action.kind !== "wait") {
|
|
287
314
|
if (!s.pending) {
|
|
@@ -290,7 +317,7 @@ var ComputerBroker = class {
|
|
|
290
317
|
digest
|
|
291
318
|
};
|
|
292
319
|
s.status = "pending_action";
|
|
293
|
-
this.host.requestApproval({
|
|
320
|
+
const decision = this.host.requestApproval({
|
|
294
321
|
kind: "action",
|
|
295
322
|
id: e.actionId,
|
|
296
323
|
target: observed.target,
|
|
@@ -298,8 +325,15 @@ var ComputerBroker = class {
|
|
|
298
325
|
}, s.controller.signal).then((approved) => {
|
|
299
326
|
this.active(s);
|
|
300
327
|
if (s.pending?.digest === digest) s.pending.approved = approved;
|
|
301
|
-
}).catch(() => {
|
|
302
|
-
|
|
328
|
+
}).catch(async (error) => {
|
|
329
|
+
if (this.session !== s) return;
|
|
330
|
+
s.errorCode ??= error instanceof Error && /^COMPUTER_[A-Z_0-9]+$/.test(error.message) ? error.message : "COMPUTER_APP_NOT_AUTHORIZED";
|
|
331
|
+
await this.stop();
|
|
332
|
+
}).finally(() => this.host.onStateChange?.());
|
|
333
|
+
s.pending.decision = decision;
|
|
334
|
+
if (this.host.deferApproval) return this.result(s);
|
|
335
|
+
await this.awaitDecision(s, decision);
|
|
336
|
+
if (s.controller.signal.aborted) return this.result(s);
|
|
303
337
|
}
|
|
304
338
|
if (s.pending.digest !== digest) throw new Error("COMPUTER_DIFFERENT_ACTION_PENDING");
|
|
305
339
|
if (s.pending.approved === void 0) return this.result(s);
|
|
@@ -318,6 +352,7 @@ var ComputerBroker = class {
|
|
|
318
352
|
try {
|
|
319
353
|
current = await this.driver.observe(s.target, s.controller.signal);
|
|
320
354
|
} catch (error) {
|
|
355
|
+
s.errorCode ??= error instanceof Error && /^COMPUTER_[A-Z_0-9]+$/.test(error.message) ? error.message : "COMPUTER_OBSERVE_FAILED";
|
|
321
356
|
await this.stop().catch(() => {});
|
|
322
357
|
throw error;
|
|
323
358
|
}
|
|
@@ -347,8 +382,16 @@ var ComputerBroker = class {
|
|
|
347
382
|
postObserveMs: 0,
|
|
348
383
|
precheckSamples
|
|
349
384
|
};
|
|
385
|
+
const grouped = e.action.kind === "activateSequence" || e.action.kind === "batch";
|
|
350
386
|
const receipt = {
|
|
351
387
|
actionId: e.actionId,
|
|
388
|
+
...grouped ? {
|
|
389
|
+
inputCount: inputs.length,
|
|
390
|
+
steps: inputs.map((_, index) => ({
|
|
391
|
+
index,
|
|
392
|
+
dispatch: "notStarted"
|
|
393
|
+
}))
|
|
394
|
+
} : {},
|
|
352
395
|
dispatch: "started",
|
|
353
396
|
outcome: "unknown",
|
|
354
397
|
verification: "none"
|
|
@@ -357,19 +400,28 @@ var ComputerBroker = class {
|
|
|
357
400
|
digest,
|
|
358
401
|
receipt
|
|
359
402
|
});
|
|
360
|
-
s.actions
|
|
403
|
+
s.actions += computerActionInputCount(e.action);
|
|
361
404
|
s.pending = void 0;
|
|
362
405
|
s.status = "running";
|
|
363
406
|
try {
|
|
364
407
|
const inputStarted = this.durationNow();
|
|
365
408
|
try {
|
|
366
|
-
await this.driver.perform(s.target, e.action, s.controller.signal)
|
|
409
|
+
if (grouped) await this.driver.perform(s.target, e.action, s.controller.signal, (index, dispatch) => {
|
|
410
|
+
if (dispatch === "started") {
|
|
411
|
+
this.active(s);
|
|
412
|
+
if (e.deadlineAt <= this.now()) throw new Error("COMPUTER_STALE_ACTION");
|
|
413
|
+
}
|
|
414
|
+
if (!receipt.steps?.[index]) throw new Error("COMPUTER_RECEIPT_MISMATCH");
|
|
415
|
+
receipt.steps[index].dispatch = dispatch;
|
|
416
|
+
});
|
|
417
|
+
else await this.driver.perform(s.target, e.action, s.controller.signal);
|
|
367
418
|
} finally {
|
|
368
419
|
nativeMs.inputMs = Math.max(0, Math.round(this.durationNow() - inputStarted));
|
|
369
420
|
nativeMs.inputDetail = this.driver.getLastInputTiming?.();
|
|
370
421
|
}
|
|
371
422
|
this.active(s);
|
|
372
423
|
receipt.dispatch = "completed";
|
|
424
|
+
for (const step of receipt.steps ?? []) step.dispatch = "completed";
|
|
373
425
|
s.status = "ready";
|
|
374
426
|
const observationStarted = this.durationNow();
|
|
375
427
|
let after;
|
|
@@ -402,17 +454,18 @@ var ComputerBroker = class {
|
|
|
402
454
|
};
|
|
403
455
|
}
|
|
404
456
|
}
|
|
405
|
-
stop() {
|
|
457
|
+
stop(errorCode, retainDriver = false) {
|
|
406
458
|
this.discovery?.controller.abort();
|
|
407
459
|
const s = this.session;
|
|
408
460
|
if (s && s.status !== "stopped") {
|
|
461
|
+
s.errorCode ??= errorCode;
|
|
409
462
|
s.generation++;
|
|
410
463
|
s.status = "stopped";
|
|
411
464
|
s.pending = void 0;
|
|
412
465
|
s.observation = void 0;
|
|
413
466
|
s.controller.abort();
|
|
414
467
|
}
|
|
415
|
-
if (!this.stopping) this.stopping = this.driver.stop().finally(() => {
|
|
468
|
+
if (!this.stopping) this.stopping = (retainDriver && this.driver.idle ? this.driver.idle() : this.driver.stop()).finally(() => {
|
|
416
469
|
this.stopping = void 0;
|
|
417
470
|
this.host.onStateChange?.();
|
|
418
471
|
});
|
|
@@ -422,12 +475,37 @@ var ComputerBroker = class {
|
|
|
422
475
|
if (this.session?.id === command.sessionId && this.session.owner === command.owner || this.discovery?.id === command.sessionId && this.discovery.owner === command.owner) await this.stop();
|
|
423
476
|
}
|
|
424
477
|
snapshot() {
|
|
478
|
+
const preparation = this.session?.status === "pending_authorization" ? this.driver.getPreparationState?.() : void 0;
|
|
425
479
|
return this.session ? {
|
|
426
480
|
status: this.session.status,
|
|
427
481
|
errorCode: this.session.errorCode,
|
|
428
|
-
appId: this.session.appId
|
|
482
|
+
appId: this.session.appId,
|
|
483
|
+
dispatch: [...this.session.receipts.values()].at(-1)?.receipt.dispatch ?? "notStarted",
|
|
484
|
+
...preparation ? { preparation } : {}
|
|
429
485
|
} : { status: "idle" };
|
|
430
486
|
}
|
|
487
|
+
previewAuthority() {
|
|
488
|
+
const s = this.session;
|
|
489
|
+
if (!s || s.status === "stopped" || s.controller.signal.aborted || this.expired(s) || !this.host.isVisible()) return;
|
|
490
|
+
return {
|
|
491
|
+
conversationId: s.owner,
|
|
492
|
+
..."runId" in s.model ? { runId: s.model.runId } : {},
|
|
493
|
+
computerSessionId: s.id,
|
|
494
|
+
brokerEpoch: this.epoch,
|
|
495
|
+
appName: this.apps.get(s.appRef)?.name ?? s.appId,
|
|
496
|
+
status: s.status,
|
|
497
|
+
target: s.target ? { ...s.target } : void 0,
|
|
498
|
+
signal: s.controller.signal
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
async validatePreview(authority) {
|
|
502
|
+
const current = this.previewAuthority();
|
|
503
|
+
if (!current?.target || !authority.target || current.computerSessionId !== authority.computerSessionId || current.brokerEpoch !== authority.brokerEpoch || current.target.windowId !== authority.target.windowId || current.target.processIdentity !== authority.target.processIdentity || current.target.appId !== authority.target.appId) throw new Error("COMPUTER_PREVIEW_REVOKED");
|
|
504
|
+
if (!this.driver.validatePreviewTarget) throw new Error("COMPUTER_PREVIEW_UNSUPPORTED");
|
|
505
|
+
await this.driver.validatePreviewTarget(current.target, current.signal);
|
|
506
|
+
current.signal.throwIfAborted();
|
|
507
|
+
if (this.previewAuthority()?.computerSessionId !== current.computerSessionId) throw new Error("COMPUTER_PREVIEW_REVOKED");
|
|
508
|
+
}
|
|
431
509
|
async dispose() {
|
|
432
510
|
clearInterval(this.timer);
|
|
433
511
|
await this.stop();
|
|
@@ -211,6 +211,7 @@ export declare const ComputerSessionReportSchema: z.ZodObject<{
|
|
|
211
211
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
212
212
|
wait: "wait";
|
|
213
213
|
typeText: "typeText";
|
|
214
|
+
batch: "batch";
|
|
214
215
|
activate: "activate";
|
|
215
216
|
showMenu: "showMenu";
|
|
216
217
|
click: "click";
|
|
@@ -218,6 +219,7 @@ export declare const ComputerSessionReportSchema: z.ZodObject<{
|
|
|
218
219
|
setValue: "setValue";
|
|
219
220
|
pressKeys: "pressKeys";
|
|
220
221
|
scroll: "scroll";
|
|
222
|
+
activateSequence: "activateSequence";
|
|
221
223
|
}>>;
|
|
222
224
|
transport: z.ZodOptional<z.ZodObject<{
|
|
223
225
|
brokerWallMs: z.ZodNumber;
|
|
@@ -231,6 +233,7 @@ export declare const ComputerSessionReportSchema: z.ZodObject<{
|
|
|
231
233
|
kind: z.ZodEnum<{
|
|
232
234
|
wait: "wait";
|
|
233
235
|
typeText: "typeText";
|
|
236
|
+
batch: "batch";
|
|
234
237
|
activate: "activate";
|
|
235
238
|
showMenu: "showMenu";
|
|
236
239
|
click: "click";
|
|
@@ -238,6 +241,7 @@ export declare const ComputerSessionReportSchema: z.ZodObject<{
|
|
|
238
241
|
setValue: "setValue";
|
|
239
242
|
pressKeys: "pressKeys";
|
|
240
243
|
scroll: "scroll";
|
|
244
|
+
activateSequence: "activateSequence";
|
|
241
245
|
}>;
|
|
242
246
|
dispatch: z.ZodEnum<{
|
|
243
247
|
unknown: "unknown";
|
|
@@ -273,7 +277,7 @@ export declare class ComputerSessionDiagnostics {
|
|
|
273
277
|
count(key: keyof ComputerSessionReport['counters']): void;
|
|
274
278
|
timing(value: NonNullable<ComputerSessionReport['timings']>[number]): void;
|
|
275
279
|
measure<T>(phase: keyof ComputerSessionReport['phaseMs'], fn: () => Promise<T>): Promise<T>;
|
|
276
|
-
propose(id: string, kind: ComputerAction['kind']): void;
|
|
280
|
+
propose(id: string, kind: ComputerAction['kind'], inputCount?: number): void;
|
|
277
281
|
discard(): void;
|
|
278
282
|
record(receipt: ComputerReceipt, before?: ComputerObservation, after?: ComputerObservation, verification?: ComputerVerification): void;
|
|
279
283
|
verify(verification?: ComputerVerification): void;
|
|
@@ -44,6 +44,11 @@ const ComputerFailureSchema = z.object({
|
|
|
44
44
|
serviceErrorCode: ComputerDiagnosticSchema.shape.serviceErrorCode
|
|
45
45
|
}).strict();
|
|
46
46
|
const categories = Object.create(null);
|
|
47
|
+
for (const code of [
|
|
48
|
+
"NATIVE_BATCH_FAILED",
|
|
49
|
+
"NATIVE_BATCH_REFUSED",
|
|
50
|
+
"DRIVER_INVALID_BATCH_RESULT"
|
|
51
|
+
]) categories[`COMPUTER_${code}`] = "native";
|
|
47
52
|
for (const code of [
|
|
48
53
|
"AGENT_MODEL_REQUIRED",
|
|
49
54
|
"AGENT_MODEL_CHANGED",
|
|
@@ -74,9 +79,13 @@ for (const [category, codes] of Object.entries({
|
|
|
74
79
|
target: [
|
|
75
80
|
"APP_NOT_FOUND",
|
|
76
81
|
"APP_NOT_RUNNING",
|
|
82
|
+
"APP_PREPARATION_REFUSED",
|
|
83
|
+
"APP_ID_INVALID",
|
|
77
84
|
"APP_REF_EXPIRED",
|
|
78
85
|
"APP_INSTANCE_AMBIGUOUS",
|
|
79
86
|
"WINDOW_REQUIRED",
|
|
87
|
+
"WINDOW_HIDDEN",
|
|
88
|
+
"WINDOW_READY_TIMEOUT",
|
|
80
89
|
"WINDOW_OTHER_SPACE",
|
|
81
90
|
"WINDOW_AMBIGUOUS",
|
|
82
91
|
"WINDOW_CHANGED",
|
|
@@ -102,6 +111,7 @@ for (const [category, codes] of Object.entries({
|
|
|
102
111
|
"UI_UNSTABLE",
|
|
103
112
|
"FRAME_REQUIRED",
|
|
104
113
|
"CAPTURE_REQUIRED",
|
|
114
|
+
"CAPTURE_UNAVAILABLE",
|
|
105
115
|
"CAPTURE_TARGET_MISMATCH",
|
|
106
116
|
"FRAME_HANDOFF_FAILED",
|
|
107
117
|
"UNEXPECTED_FRAME",
|
|
@@ -138,6 +148,8 @@ for (const [category, codes] of Object.entries({
|
|
|
138
148
|
"DIFFERENT_ACTION_PENDING"
|
|
139
149
|
],
|
|
140
150
|
native: [
|
|
151
|
+
"BACKGROUND_INPUT_UNSUPPORTED",
|
|
152
|
+
"INPUT_REFUSED",
|
|
141
153
|
"NATIVE_SETUP_FAILED",
|
|
142
154
|
"NATIVE_ACTION_FAILED",
|
|
143
155
|
"POST_ACTION_OBSERVATION_FAILED",
|
|
@@ -251,6 +263,8 @@ const ComputerSessionReportSchema = z.object({
|
|
|
251
263
|
nativeMs: ComputerNativeTimingSchema.optional(),
|
|
252
264
|
kind: z.enum([
|
|
253
265
|
"activate",
|
|
266
|
+
"activateSequence",
|
|
267
|
+
"batch",
|
|
254
268
|
"showMenu",
|
|
255
269
|
"click",
|
|
256
270
|
"drag",
|
|
@@ -267,6 +281,8 @@ const ComputerSessionReportSchema = z.object({
|
|
|
267
281
|
recentActions: z.array(z.object({
|
|
268
282
|
kind: z.enum([
|
|
269
283
|
"activate",
|
|
284
|
+
"activateSequence",
|
|
285
|
+
"batch",
|
|
270
286
|
"showMenu",
|
|
271
287
|
"click",
|
|
272
288
|
"drag",
|
|
@@ -360,12 +376,12 @@ var ComputerSessionDiagnostics = class {
|
|
|
360
376
|
this.data.phaseMs[phase] += Math.max(0, Math.round(this.durationNow() - start));
|
|
361
377
|
}
|
|
362
378
|
}
|
|
363
|
-
propose(id, kind) {
|
|
379
|
+
propose(id, kind, inputCount = 1) {
|
|
364
380
|
this.pending = {
|
|
365
381
|
id,
|
|
366
382
|
kind
|
|
367
383
|
};
|
|
368
|
-
if (kind !== "wait") this.count("proposedInputs");
|
|
384
|
+
if (kind !== "wait") for (let i = 0; i < inputCount; i++) this.count("proposedInputs");
|
|
369
385
|
}
|
|
370
386
|
discard() {
|
|
371
387
|
this.pending = void 0;
|
|
@@ -376,7 +392,10 @@ var ComputerSessionDiagnostics = class {
|
|
|
376
392
|
this.receipts.add(receipt.actionId);
|
|
377
393
|
const kind = this.pending.kind;
|
|
378
394
|
const unchanged = kind !== "wait" && receipt.dispatch === "completed" && !!after && before?.stateDigest === after.stateDigest;
|
|
379
|
-
if (kind !== "wait"
|
|
395
|
+
if (kind !== "wait") {
|
|
396
|
+
const completed = receipt.steps?.filter((step) => step.dispatch === "completed").length ?? (receipt.dispatch === "completed" ? receipt.inputCount ?? 1 : 0);
|
|
397
|
+
for (let i = 0; i < completed; i++) this.count("completedInputs");
|
|
398
|
+
}
|
|
380
399
|
if (receipt.dispatch === "unknown" || receipt.dispatch === "started") this.count("unknownDispatches");
|
|
381
400
|
if (unchanged) this.count("unchangedInputs");
|
|
382
401
|
this.verify(verification);
|
|
@@ -40,5 +40,20 @@ export declare class ComputerTargetError extends Error {
|
|
|
40
40
|
readonly windows: ComputerWindow[];
|
|
41
41
|
constructor(code: string, windows?: ComputerWindow[]);
|
|
42
42
|
}
|
|
43
|
+
export declare const ComputerRecoverySchema: z.ZodObject<{
|
|
44
|
+
action: z.ZodEnum<{
|
|
45
|
+
wait_and_observe: "wait_and_observe";
|
|
46
|
+
show_target_window: "show_target_window";
|
|
47
|
+
move_to_same_desktop: "move_to_same_desktop";
|
|
48
|
+
show_xopc_window: "show_xopc_window";
|
|
49
|
+
check_capture_permission: "check_capture_permission";
|
|
50
|
+
manual_input: "manual_input";
|
|
51
|
+
reselect_window: "reselect_window";
|
|
52
|
+
inspect_result: "inspect_result";
|
|
53
|
+
}>;
|
|
54
|
+
automaticRetryAllowed: z.ZodBoolean;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
/** Derived locally, so older desktop transports need no new reply fields. */
|
|
57
|
+
export declare function computerRecoveryDirective(code: string, dispatch?: 'notStarted' | 'started' | 'completed' | 'unknown'): z.infer<typeof ComputerRecoverySchema>;
|
|
43
58
|
/** Recovery instructions are deterministic; never replay an input with unknown delivery. */
|
|
44
59
|
export declare function computerRecovery(code: string): string;
|