@xopcai/xopc 0.0.436 → 0.0.438
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/dist/browser-ext/dist/assets/{page-context-b-rB5vJC.js → page-context-DngcqfGf.js} +130 -9
- package/dist/browser-ext/dist/background.js +9 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- 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-Cwn_CNwl.js → activity-store-Fl327RND.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Cd23LnJJ.js → agent-avatar-dicebear-DL_MfWA8.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-ByzM7u9S.js → agent-avatar-display-BTDt883i.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-B0i37diS.js → agent-defaults-settings-panel-CuiIuR1Q.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-XN-tZ-Ox.js → agent-plugin-dialog-moOAOJPs.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-ZDA1OaLv.js → agents-B1yM1cWS.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-B5lKH_ps.js → agents-admin-api-D6pZX7nW.js} +1 -1
- package/dist/gateway/static/root/assets/{api-B9fZL-V8.js → api-H3OfSCEz.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Djju8qIR.js → api-np_upIrk.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-IlyzDPJu.js → app-management-settings-panel-IFKcvOK9.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BxdFGob3.js → appearance-settings-Cfb4s0Ik.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CxEKiOTA.js → apps-page-DMDwnwEi.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-4gEvotPr.js → archive-plugin-DBKvxHvn.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-4fVKv9PJ.js → automation-api-iUvu64Gn.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-m7PeK2kl.js → automation-result-state-EFwxlLpI.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-CJOdy_R2.js → automation-run-list-C66yqC4g.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-DXNh_uKL.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-BjbM15eY.js → automations-page-iCsHbzY_.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CqurzLYX.js → automations-workspace-DnLrs-fb.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-69WyJLNW.js → binary-plugins-C5K0CWqt.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DUONDIZR.js → block-editor-3TVEcFpk.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DL4YPCuN.js → browser-automation-inputs-Wuph6STC.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-1Aq6XmRs.js → browser-automations-page-THaENU71.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-control-api-yjru8E7R.js → browser-control-api-DeRUE9Io.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-CvwpT8Um.js → browser-settings-page-CeNb4Kyc.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DaeQXJT4.js → capabilities-B3cchabB.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-C7lnwKKm.js → capabilities-CFO_gAma.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-B5avAOUM.js → capabilities-page-KM3X4Bj-.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-_9yCS78i.js → capabilities-settings-panel-CX201jtA.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CoQb4HOF.js → channels-DmF6s5BH.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BUi_7GRo.js → chat-agents-api-ipkXPITj.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-CcVcKsDZ.js → chat-chart-block-KOdy3HcB.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-page--wcFhTjW.js → chat-page-DZy7iw5A.js} +10 -10
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BMXJpPuH.js → chat-terminal-dock-BouLAS3C.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-luUjQPsh.js → command-palette-api-CHEmmKmY.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-B5XNxNCb.js → composer-payload-handoff-DQVtV0L9.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CWtdyEJH.js → computer-settings-page-DwEzbr0-.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-2idMtk65.js → connected-providers-grid-CWdA7VtN.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-Ddh0bfkj.js → connection-usage-guide-5RmYdXoS.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-C3msXaBk.js → connector-service-page-TeYvzScr.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-NcWECWKg.js → connectors-api-Byw6RD4z.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-Crb6DILX.js → connectors-page-B4PrSnT8.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Cfjq1hD_.js → date-picker-BpccZyjF.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-ChFn9v-3.js → desktop-pet-DfGMB4GN.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DvnVIv25.js → desktop-pet-settings-ky__zEoY.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-DQJ61P5L.js → dev-view-store-do-XMWDA.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-KxaIL-OX.js → device-pairing-wizard-CQNlQGYH.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Drv864uE.js → directory-picker-path-field-DjhHz-4p.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-DfBRkWtw.js → discussion-annotation-sync-CvGsuUi9.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DAlBIt_R.js → extension-debug-page-BimrAkDl.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-Bds-5kY_.js → extension-iframe-host-7zoDddj6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-CZg8nBwW.js → extension-marketplace-api-DA-nbL9C.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-ZTw-oucT.js → extension-page-wjS2go2N.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-NKWfjpdP.js → extension-provider-C2L-lGqA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CT7PPt_q.js → extension-settings-page-CTHs7h7H.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-BcLeaSNe.js → file-preview-surface-QUJiCKCs.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-Cq-ByXL4.js → gateway-config-swr-RHiDzhCY.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-DUlVfng6.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-C_CDU3to.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-DdiVzbkL.js → gateway-restart-L34umMj8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-1QUdNwrZ.js → gateway-settings-DjwPEBcq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-PMJi5mX4.js → gateway-startup-retry-CgLo6P66.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-DgzZh3wX.js → global-defaults-api-Cv6QEJBa.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-Chn7YTiD.js → home-page-D9gDR4MB.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-CjVpsckq.js → image-generation-api-C_GDIILz.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CJCvZFaQ.js → imports-page-CvY8wdNu.js} +1 -1
- package/dist/gateway/static/root/assets/{index-C4moZbZv.js → index-BVyX4V3C.js} +5 -5
- package/dist/gateway/static/root/assets/index-CIYNPxDl.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-Bo06Ry3H.js → install-connector-dialog-Cnx5oOXv.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BylFJeGu.js → keyboard-shortcuts-settings-AXisbvQn.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-B3MSSFsr.js → local-app-workbench-page-DxO9ZTU_.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BeV86rMJ.js → local-apps-page-sas0hMvK.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-jgw8UGsO.js → local-session-drafts-DzHbV0VQ.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CAZaC05J.js → locale-store-BRJAl_Kx.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BMmSsUP5.js → logs-page-BkuLDfZ4.js} +1 -1
- package/dist/gateway/static/root/assets/management-settings-CPPZfnc7.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-BatP4qeK.js → markdown-view-BRNPKsnn.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-rROtr0UN.js → mcp-conversation-setup-page-C5gTNa2U.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-88OV72YE.js → media-plugins-BMvgnbE7.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Ct1hODNU.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-raBRBkN_.js → model-selector-kWRDioTb.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-CzC9y3D0.js → models-hub-cache-h2vf54qy.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-BvA8Vkbm.js → note-detail-panel-DcTiI934.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-Bjefof6e.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-zXpV6UXu.js → notes-api-D29fdWyC.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CjYH9Kle.js → notes-page-CqnQ_UEf.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-DmxSaxM1.js → oauth-api-C8McgC-r.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-D4Gfs-Ba.js → oauth-provider-connect-BDTdg0lv.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Mig3d0UX.js → page-context-capture-button-Bf0qvNmd.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-C4IIZaKd.js → page-context-draft-Dx0F3tHK.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-lsAlAXWQ.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-DLa-CpaK.js → personal-avatar-CpEFjQ4Q.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-BhuT79Wd.js → personal-page-BvjPpwdy.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-XSUkgcr2.js → personal-settings-panel-DixKsLRd.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DYwnuVh3.js → phone-dependencies-card-BfpFV3SG.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-2F32QTHA.js → phone-model-connection-Os87SvBE.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-DCVzIr0s.js → phone-model-picker-8pkA8k_N.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-DJttE4id.js → phone-settings-page-ByERmr61.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-Dxp-KhFP.js → phone-workspace-store-DfhWmYic.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-tyjAjFjA.js → plugin-details-dialog-J4PKpTud.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-BVP3MhGK.js → preference-select-fields-C-PLFUS9.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-DbJvv92z.js → product-automation-feedback-DLsF8VBW.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-RImqlhCD.js → product-open-page-BP-ssaP8.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-DxSqrKsg.js → product-preview-content-BMI7ZuKU.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-Cw8Q8Uom.js → product-preview-modal-DZ0zi6ZF.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-CuugOYfe.js → project-detail-page-CS-NrYi5.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-BMKcoUW5.js → project-understanding-C9WWE-3t.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CFsABLvs.js → projects-page-DVa38OsG.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-CAeXbJNF.js → providers-api-C1KpkGUT.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-CfpllTe5.js → recording-upload-T5ArHnPJ.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-fLOqFyrz.js → registry-api-Cs-R00dn.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BvKOxy0L.js → remote-access-hub-C6NBt2s-.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-D15jzjV_.js → resource-unavailable-BuySLm9q.js} +1 -1
- package/dist/gateway/static/root/assets/{route-preload-BQapekpy.js → route-preload-CDMyXjLQ.js} +2 -2
- package/dist/gateway/static/root/assets/{runtime-tools-api-D0Nrvuqv.js → runtime-tools-api-CvTCMobW.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CA27XgL2.js → runtime-tools-settings-panel-DlW9tAnO.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-B0RoYLVT.js → service-recommendation-list-Biono7Ua.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CHRP5Lwf.js → session-api-BNt6b3Xl.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-DRRWwKE4.js → session-manager-CQNN8D0M.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-uJHS3-6F.js → sessions-page-3LErqoR9.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-SSCcDrIV.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-D-llwfSj.js → settings-advanced-section-D4uJuQwW.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-BspMKc9N.js → settings-mode-store-CnG8uLvP.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CedwaHM0.js → settings-page-9BthXfuc.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-LuOJvqNa.js → settings-page-header-BXdbhzia.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CduQ8w4a.js → settings-page-layout-BQvK_gmr.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-ujpPGl84.js → setup-interaction-page-D1uhozUt.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BN2aCJUN.js → setup-status-panel-C1o4-hF4.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-CTATUaa4.js → share-link-dialog-QTEdYG4I.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Dq0J3VgS.js → share-preview-page-Ba77bFgS.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-zegE8pSE.js → shares-api-DayDdoBR.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-DXpvsRXq.js → shares-settings-67poMpxi.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DCL1EN7f.js → skill-api-DR3vdsrS.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-Bv0mmHbu.js → skill-list-api-D6X3XyTd.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DPZbadiO.js → skill-reload-api-Wu0UkQ13.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DMC7Gaku.js → skills-page-FmjOxilb.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BYFUhlqG.js → system-settings-panel-BLeXSW3w.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-_Og3plZL.js → task-detail-page-B5uwlFwb.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-Bxm8-H0B.js → task-result-evidence-m78K4eAp.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-Djf9l2qZ.js → terminal-panel-store-CWpiIbPY.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-8GFVtotZ.js → theme-store-B9upxkW-.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-oWW3SBZ4.js → tracing-settings-page-CACPSXVV.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-D-mEsSGF.js → tunnel-api-CCC7XSFJ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-CvDjsd0I.js → understanding-activity-store-D7WFQ-t7.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-DzOZJm7A.js → understanding-refresh-store-CvOFPfDi.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-z-o6Uuev.js → usage-page-P9-7xf1p.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BVYS8UoK.js → use-autosave-BNNxl23c.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-lecOV2q5.js → use-composer-attachments-7uMSpyxm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-nd_CuFsd.js → use-file-preview-expanded-C-NCuwM3.js} +2 -2
- package/dist/gateway/static/root/assets/{use-personal-profile-CQi2ZCxV.js → use-personal-profile-1lm_wDMe.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-BiaddkzX.js → use-workspace-tree-HlkNpRDC.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Bks1n0Nj.js → user-model-page-B6XfYtEm.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BbW8NFeZ.js → voice-api-key-field-CRZS6XEF.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-jSMzZWWy.js → voice-config-api-CrgRaCMk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-_SgYmx7X.js → voice-input-shortcut-events-vjcw6SRC.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-BJCfiRFU.js → voice-transcribe-api-CtUoGgGT.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DSTSNyU7.js → work-discovery-overlay-C9tI_qQv.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-Dd_QJJvb.js → work-discovery-page-C-8kE4mx.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-q39BUcJ6.js → working-directory-picker-modal-B5fxn2wG.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-Di2OmCvz.js → workspace-api-DP2ozrRe.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Dw3xS3sE.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BUGNT765.js → workspace-file-preview-dialog-Cp86E6-h.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-bMSvmQW7.js → workspace-open-location-menu-CWOgHMmR.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Bbe19Del.js → xopc-cloud-account-card-CIaHnCGw.js} +1 -1
- package/dist/gateway/static/root/index.html +81 -81
- package/dist/package.js +1 -1
- package/dist/packages/browser-control-contract/src/remote.js +237 -0
- package/dist/packages/computer-control-contract/src/index.js +12 -2
- package/dist/packages/endpoint-tools-client/src/index.js +8 -0
- package/dist/packages/endpoint-tools-protocol/src/command.js +83 -0
- package/dist/packages/endpoint-tools-protocol/src/execution.js +102 -0
- package/dist/packages/endpoint-tools-protocol/src/index.js +61 -7
- package/dist/packages/endpoint-tools-protocol/src/operation-status.js +76 -0
- package/dist/packages/endpoint-tools-protocol/src/screen.js +28 -0
- package/dist/packages/endpoint-tools-protocol/src/terminal.js +173 -0
- package/dist/packages/endpoint-tools-protocol/src/workspace.js +143 -0
- package/dist/packages/gateway-contract/src/desktop-chat.js +29 -0
- package/dist/packages/gateway-contract/src/desktop-execution-stop.js +36 -0
- package/dist/packages/gateway-contract/src/desktop-host.js +87 -0
- package/dist/packages/gateway-contract/src/device-pairing.js +17 -4
- package/dist/packages/gateway-contract/src/gateway-scopes.js +6 -2
- package/dist/packages/gateway-contract/src/index.js +6 -0
- package/dist/packages/realtime-protocol/src/index.js +15 -2
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +3 -2
- package/dist/src/agent/context/project-context.d.ts +1 -0
- package/dist/src/agent/context/project-context.js +9 -2
- package/dist/src/agent/embedded/run-turn.js +5 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +76 -4
- package/dist/src/agent/memory/context-recovery.d.ts +3 -3
- package/dist/src/agent/memory/context-recovery.js +10 -3
- package/dist/src/agent/memory/repeated-read-projection.d.ts +9 -0
- package/dist/src/agent/memory/repeated-read-projection.js +78 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +8 -1
- package/dist/src/agent/sandbox/exec-policy.js +2 -0
- package/dist/src/agent/sandbox/types.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +2 -1
- package/dist/src/agent/service/process-direct-streaming.js +4 -2
- package/dist/src/agent/source-context/browser-tab.js +1 -0
- package/dist/src/agent/source-context/device-environment.js +9 -3
- package/dist/src/agent/source-context/index.js +7 -3
- package/dist/src/agent/source-context/injector.d.ts +4 -0
- package/dist/src/agent/source-context/injector.js +23 -8
- package/dist/src/agent/source-context/source-context-projection.d.ts +8 -0
- package/dist/src/agent/source-context/source-context-projection.js +127 -0
- package/dist/src/agent/source-context/types.js +4 -1
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +1 -1
- package/dist/src/agent/tools/exec-command.js +3 -2
- package/dist/src/agent/tools/factory.d.ts +7 -1
- package/dist/src/agent/tools/factory.js +103 -14
- package/dist/src/automations/api/dispatcher.d.ts +6 -0
- package/dist/src/automations/api/dispatcher.js +17 -0
- package/dist/src/automations/api/routes.js +2 -6
- package/dist/src/browser/drivers/browser-driver.d.ts +1 -1
- package/dist/src/browser/remote/device-driver.d.ts +26 -0
- package/dist/src/browser/remote/device-driver.js +247 -0
- package/dist/src/browser/remote/device-runtime.d.ts +9 -0
- package/dist/src/browser/remote/device-runtime.js +27 -0
- package/dist/src/browser/remote/device-target.d.ts +4 -0
- package/dist/src/browser/remote/device-target.js +20 -0
- package/dist/src/browser/remote/endpoint-transport.d.ts +4 -0
- package/dist/src/browser/remote/endpoint-transport.js +48 -0
- package/dist/src/browser/runtime/browser-runtime.d.ts +1 -0
- package/dist/src/browser/runtime/browser-runtime.js +1 -0
- package/dist/src/browser/url-policy.js +19 -6
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/computer/broker.d.ts +2 -1
- package/dist/src/computer/broker.js +15 -0
- package/dist/src/computer/diagnostics.d.ts +3 -3
- package/dist/src/computer/endpoint-transport.d.ts +4 -0
- package/dist/src/computer/endpoint-transport.js +54 -0
- package/dist/src/computer/errors.js +1 -1
- package/dist/src/computer/evaluation.d.ts +2 -2
- package/dist/src/computer/program-runtime.js +14 -2
- package/dist/src/computer/runtime.d.ts +1 -0
- package/dist/src/computer/runtime.js +31 -11
- package/dist/src/computer/task-state.js +3 -1
- package/dist/src/endpoint-tools/capability-catalog.js +1 -1
- package/dist/src/endpoint-tools/desktop-authority-response.d.ts +19 -0
- package/dist/src/endpoint-tools/desktop-authority-response.js +38 -0
- package/dist/src/endpoint-tools/desktop-device-frame.d.ts +18 -0
- package/dist/src/endpoint-tools/desktop-device-frame.js +94 -0
- package/dist/src/endpoint-tools/desktop-execution.d.ts +14 -0
- package/dist/src/endpoint-tools/desktop-execution.js +28 -0
- package/dist/src/endpoint-tools/desktop-frame.d.ts +12 -0
- package/dist/src/endpoint-tools/desktop-frame.js +35 -0
- package/dist/src/endpoint-tools/desktop-observation.d.ts +4 -0
- package/dist/src/endpoint-tools/desktop-observation.js +20 -0
- package/dist/src/endpoint-tools/invocation-service.d.ts +35 -2
- package/dist/src/endpoint-tools/invocation-service.js +138 -14
- package/dist/src/endpoint-tools/policy.js +27 -2
- package/dist/src/endpoint-tools/registry.d.ts +5 -3
- package/dist/src/endpoint-tools/registry.js +10 -3
- package/dist/src/endpoint-tools/runtime.d.ts +4 -2
- package/dist/src/endpoint-tools/runtime.js +9 -3
- package/dist/src/endpoint-tools/terminal-broker.d.ts +90 -0
- package/dist/src/endpoint-tools/terminal-broker.js +320 -0
- package/dist/src/gateway/hono/app.js +7 -4
- package/dist/src/gateway/hono/middleware/auth.js +11 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +2 -1
- package/dist/src/gateway/hono/routes/desktop-chat.d.ts +3 -0
- package/dist/src/gateway/hono/routes/desktop-chat.js +30 -0
- package/dist/src/gateway/hono/routes/desktop-execution-stop.d.ts +6 -0
- package/dist/src/gateway/hono/routes/desktop-execution-stop.js +52 -0
- package/dist/src/gateway/hono/routes/desktop-host.d.ts +3 -0
- package/dist/src/gateway/hono/routes/desktop-host.js +485 -0
- package/dist/src/gateway/hono/routes/devices.d.ts +3 -1
- package/dist/src/gateway/hono/routes/devices.js +7 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +16 -4
- package/dist/src/gateway/hono/routes/lazy-bundles.js +21 -0
- package/dist/src/gateway/hono/routes/models.js +5 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -1
- package/dist/src/gateway/security/gateway-scopes.js +10 -0
- package/dist/src/gateway/security/phone-access.js +4 -1
- package/dist/src/gateway/service/session-input-coordinator.js +5 -3
- package/dist/src/gateway/service.js +1 -0
- package/dist/src/gateway/session-context-summary.js +2 -1
- package/dist/src/providers/model-response.js +1 -0
- package/dist/src/providers/presentation.js +1 -1
- package/dist/src/realtime/runtime.js +86 -7
- package/dist/src/session/session-context-for-llm.js +3 -1
- package/dist/src/storage/sqlite/desktop-execution-repository.d.ts +44 -0
- package/dist/src/storage/sqlite/desktop-execution-repository.js +76 -0
- package/dist/src/storage/sqlite/desktop-execution-state.d.ts +13 -0
- package/dist/src/storage/sqlite/desktop-execution-state.js +22 -0
- package/dist/src/storage/sqlite/desktop-execution-stop-repository.d.ts +19 -0
- package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +66 -0
- package/dist/src/storage/sqlite/desktop-operation-repository.d.ts +79 -0
- package/dist/src/storage/sqlite/desktop-operation-repository.js +143 -0
- package/dist/src/storage/sqlite/device-access-repository.d.ts +12 -0
- package/dist/src/storage/sqlite/device-access-repository.js +54 -3
- package/dist/src/storage/sqlite/device-pairing-approval.js +4 -4
- package/dist/src/storage/sqlite/device-pairing-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/endpoint-principal-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +5 -1
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +8 -3
- 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 +48 -3
- package/dist/src/storage/sqlite/upgrades/263_desktop_device_credentials.sql +39 -0
- package/dist/src/storage/sqlite/upgrades/264_desktop_observation_grants.sql +5 -0
- package/dist/src/storage/sqlite/upgrades/265_desktop_screen_scope.sql +3 -0
- package/dist/src/storage/sqlite/upgrades/266_endpoint_operation_audit.sql +3 -0
- package/dist/src/storage/sqlite/upgrades/267_desktop_reliable_execution.sql +15 -0
- package/dist/src/storage/sqlite/upgrades/268_desktop_operation_reviews.sql +9 -0
- package/dist/src/storage/sqlite/upgrades/269_desktop_execution_stops.sql +10 -0
- package/dist/src/tasks/task-handoff.js +2 -1
- package/package.json +6 -2
- package/dist/gateway/static/root/assets/automation-task-card-DZWhCWJa.js +0 -3
- package/dist/gateway/static/root/assets/gateway-realtime-DwMd2PCt.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CHrf6-nR.js +0 -1
- package/dist/gateway/static/root/assets/index-iukJWzxG.css +0 -1
- package/dist/gateway/static/root/assets/management-settings-Bu7T8ewk.js +0 -1
- package/dist/gateway/static/root/assets/messages-C7fckbyG.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-D6kUDDd5.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-D7G5utVi.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CZ4J3Kuy.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-B2r9wlix.js +0 -1
|
@@ -71,10 +71,10 @@ async function executeComputerProgram(code, host, store, signal, timeoutMs = 12e
|
|
|
71
71
|
lifetime.abort();
|
|
72
72
|
await Promise.allSettled([...inFlight]);
|
|
73
73
|
const text = result.output.filter((item) => item.type === "text").map((item) => item.text).join("\n").slice(0, 16e3);
|
|
74
|
-
if (
|
|
74
|
+
if (hostErrorCode) return {
|
|
75
75
|
status: "program_error",
|
|
76
76
|
output: text,
|
|
77
|
-
errorCode: hostErrorCode
|
|
77
|
+
errorCode: hostErrorCode,
|
|
78
78
|
scriptError: "aborted"
|
|
79
79
|
};
|
|
80
80
|
if (result.ok === false) return {
|
|
@@ -84,6 +84,18 @@ async function executeComputerProgram(code, host, store, signal, timeoutMs = 12e
|
|
|
84
84
|
scriptError: result.error.kind,
|
|
85
85
|
scriptErrorMessage: result.error.message.slice(0, 1e3)
|
|
86
86
|
};
|
|
87
|
+
if (signal.aborted) return {
|
|
88
|
+
status: "program_error",
|
|
89
|
+
output: text,
|
|
90
|
+
errorCode: "COMPUTER_PROGRAM_FAILED",
|
|
91
|
+
scriptError: "aborted"
|
|
92
|
+
};
|
|
93
|
+
if (unawaited || cancelledHostCall) return {
|
|
94
|
+
status: "program_error",
|
|
95
|
+
output: text,
|
|
96
|
+
errorCode: "COMPUTER_PROGRAM_UNAWAITED_CALL",
|
|
97
|
+
scriptError: "aborted"
|
|
98
|
+
};
|
|
87
99
|
const next = { ...store };
|
|
88
100
|
for (const key of result.storeWrites.delete) delete next[key];
|
|
89
101
|
Object.assign(next, result.storeWrites.set);
|
|
@@ -466,6 +466,7 @@ export declare class ComputerRuntime {
|
|
|
466
466
|
private send;
|
|
467
467
|
private forget;
|
|
468
468
|
close(owner: string): Promise<boolean>;
|
|
469
|
+
private verifiedRemoteStop;
|
|
469
470
|
getReport(owner: string): ComputerSessionReport | undefined;
|
|
470
471
|
private retainReport;
|
|
471
472
|
private pruneReports;
|
|
@@ -1,12 +1,14 @@
|
|
|
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 {
|
|
4
|
+
import { ComputerActionSchema, ComputerAppSchema, ComputerObservationSchema, ComputerTransportTimingSchema, ComputerWindowSchema, REMOTE_COMPUTER_CONTROL_TOOL, 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";
|
|
8
|
+
import { hasReviewedDesktopExecutionStop } from "../storage/sqlite/desktop-operation-repository.js";
|
|
8
9
|
import { enterComputerControl, leaveComputerControl } from "./control-guard.js";
|
|
9
10
|
import { clearComputerFrames, computerAgentTurn, retainComputerFrame } from "./agent-context.js";
|
|
11
|
+
import { hasVerifiedDesktopExecutionStop } from "../storage/sqlite/desktop-execution-stop-repository.js";
|
|
10
12
|
import { ComputerDiagnosticSchema, ComputerOperationError, computerDiagnostic, computerRecovery } from "./errors.js";
|
|
11
13
|
import { createComputerModelAdapter, predictComputerStep, readComputerJson } from "./model-adapter.js";
|
|
12
14
|
import { groundComputerAction } from "./semantic-actions.js";
|
|
@@ -16,6 +18,7 @@ import { executeComputerProgram } from "./program-runtime.js";
|
|
|
16
18
|
import { ComputerExpectationSchema, ComputerTaskState, verifyComputerExpectation } from "./task-state.js";
|
|
17
19
|
import { executeComputerBatch } from "./batch.js";
|
|
18
20
|
import { ComputerStabilityTracker } from "./stability-diagnostics.js";
|
|
21
|
+
import { invokeComputerCommand } from "./endpoint-transport.js";
|
|
19
22
|
import { randomUUID } from "node:crypto";
|
|
20
23
|
import { z } from "zod";
|
|
21
24
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -138,6 +141,8 @@ var ComputerRuntime = class {
|
|
|
138
141
|
async execute(owner, input, signal, execution) {
|
|
139
142
|
input = ComputerUseInputSchema.parse(input);
|
|
140
143
|
if (!owner) throw new Error("COMPUTER_CONVERSATION_REQUIRED");
|
|
144
|
+
const stale = this.sessions.get(owner);
|
|
145
|
+
if (stale && !this.operations.has(owner) && this.verifiedRemoteStop(stale)) this.forget(stale);
|
|
141
146
|
if (input.op === "flows" || input.op === "forget_flow") {
|
|
142
147
|
signal?.throwIfAborted();
|
|
143
148
|
const scope = this.flowScope(owner);
|
|
@@ -645,6 +650,13 @@ var ComputerRuntime = class {
|
|
|
645
650
|
endpointId: endpoint.endpointId,
|
|
646
651
|
adapter,
|
|
647
652
|
binding,
|
|
653
|
+
...endpoint.executionAuthority ? { executionScope: {
|
|
654
|
+
gatewayId: endpoint.executionAuthority.gatewayId,
|
|
655
|
+
deviceId: endpoint.executionAuthority.deviceId,
|
|
656
|
+
authorizationRevision: endpoint.executionAuthority.authorizationRevision,
|
|
657
|
+
tool: REMOTE_COMPUTER_CONTROL_TOOL,
|
|
658
|
+
toolRevision: endpoint.tools.find((tool) => tool.descriptor.name === "desktop.computer.remote_control")?.revision ?? ""
|
|
659
|
+
} } : {},
|
|
648
660
|
createdAt: Date.now(),
|
|
649
661
|
actions: 0,
|
|
650
662
|
modelRequests: 0,
|
|
@@ -1078,20 +1090,12 @@ var ComputerRuntime = class {
|
|
|
1078
1090
|
const turnEndpoint = this.getTurnEndpoint?.(owner);
|
|
1079
1091
|
const endpoint = explicitBinding ? this.endpoints.bindings.resolve(owner) : turnEndpoint ? this.endpoints.registry.get(turnEndpoint) : this.endpoints.bindings.resolve(owner);
|
|
1080
1092
|
if (!endpoint || endpoint.kind !== "desktop") throw new Error("COMPUTER_DESKTOP_BINDING_REQUIRED");
|
|
1093
|
+
if (!this.endpoints.registry.getTool(endpoint.endpointId, endpoint.executionAuthority ? "desktop.computer.remote_control" : "desktop.computer.control")) throw new Error("COMPUTER_DESKTOP_UPGRADE_REQUIRED");
|
|
1081
1094
|
return endpoint;
|
|
1082
1095
|
}
|
|
1083
1096
|
async send(s, command, signal) {
|
|
1084
1097
|
signal?.throwIfAborted();
|
|
1085
|
-
const
|
|
1086
|
-
if (!tool) throw new Error("COMPUTER_DESKTOP_UPGRADE_REQUIRED");
|
|
1087
|
-
const invoke = () => this.endpoints.invocations.invoke({
|
|
1088
|
-
endpointId: s.endpointId,
|
|
1089
|
-
toolCallId: randomUUID(),
|
|
1090
|
-
toolName: COMPUTER_CONTROL_TOOL,
|
|
1091
|
-
arguments: command,
|
|
1092
|
-
descriptorRevision: tool.revision,
|
|
1093
|
-
signal
|
|
1094
|
-
});
|
|
1098
|
+
const invoke = () => invokeComputerCommand(this.endpoints, s.endpointId, command, signal);
|
|
1095
1099
|
const phase = command.op === "open" ? "open" : command.op === "act" ? "dispatch" : command.op === "observe" ? "observe" : command.op === "release" ? "release" : void 0;
|
|
1096
1100
|
if (command.op === "observe") s.diagnostics?.count("observations");
|
|
1097
1101
|
const startedAt = performance.now();
|
|
@@ -1141,6 +1145,10 @@ var ComputerRuntime = class {
|
|
|
1141
1145
|
clearComputerFrames(owner);
|
|
1142
1146
|
const s = this.sessions.get(owner);
|
|
1143
1147
|
if (!s) return true;
|
|
1148
|
+
if (this.verifiedRemoteStop(s)) {
|
|
1149
|
+
this.forget(s);
|
|
1150
|
+
return true;
|
|
1151
|
+
}
|
|
1144
1152
|
s.programStore = void 0;
|
|
1145
1153
|
s.task.clear();
|
|
1146
1154
|
s.pendingContext = void 0;
|
|
@@ -1159,11 +1167,23 @@ var ComputerRuntime = class {
|
|
|
1159
1167
|
this.forget(s);
|
|
1160
1168
|
return true;
|
|
1161
1169
|
}
|
|
1170
|
+
if (this.verifiedRemoteStop(s)) {
|
|
1171
|
+
this.forget(s);
|
|
1172
|
+
return true;
|
|
1173
|
+
}
|
|
1162
1174
|
}
|
|
1163
1175
|
s.diagnostics.fail(/* @__PURE__ */ new Error("COMPUTER_RELEASE_UNCONFIRMED"), "release", "unknown");
|
|
1164
1176
|
s.diagnostics.finish(false);
|
|
1165
1177
|
return false;
|
|
1166
1178
|
}
|
|
1179
|
+
verifiedRemoteStop(session) {
|
|
1180
|
+
if (!session.executionScope) return false;
|
|
1181
|
+
try {
|
|
1182
|
+
return hasVerifiedDesktopExecutionStop(session.executionScope) || hasReviewedDesktopExecutionStop(session.executionScope);
|
|
1183
|
+
} catch {
|
|
1184
|
+
return false;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1167
1187
|
getReport(owner) {
|
|
1168
1188
|
this.pruneReports();
|
|
1169
1189
|
return (this.sessions.get(owner)?.diagnostics ?? this.openingReports.get(owner) ?? this.reports.get(owner)?.diagnostics)?.snapshot();
|
|
@@ -34,14 +34,16 @@ function verifyComputerExpectation(expectation, observation, before) {
|
|
|
34
34
|
if (verification.status === "satisfied" && before && verifyComputerExpectation(expectation, before)?.status === "satisfied") verification.preexisting = true;
|
|
35
35
|
return verification;
|
|
36
36
|
}
|
|
37
|
-
if (data.truncated === true) return result("unavailable");
|
|
38
37
|
if (expectation.kind === "selected") {
|
|
38
|
+
if (data.truncated === true) return result("unavailable");
|
|
39
39
|
const candidates = data.elements.filter((e) => e.label === expectation.label && typeof e.selected === "boolean");
|
|
40
40
|
if (candidates.length !== 1) return result("unavailable");
|
|
41
41
|
return result(candidates[0].selected ? "satisfied" : "not_met");
|
|
42
42
|
}
|
|
43
43
|
const fields = data.elements.filter((e) => ["AXTextField", "AXTextArea"].includes(String(e.role)) && e.label === expectation.label);
|
|
44
44
|
if (fields.length !== 1 || typeof fields[0].value !== "string" || fields[0].in_web_content === true) return result("unavailable");
|
|
45
|
+
if (data.truncated === true && !(data.platform === "win32" && fields[0].inputAllowed === true && fields[0].fieldLabelUnique === true)) return result("unavailable");
|
|
46
|
+
if (fields[0].inputAllowed === false || fields[0].enabled === false) return result("unavailable");
|
|
45
47
|
return result(fields[0].value === expectation.value ? "satisfied" : "not_met");
|
|
46
48
|
} catch {
|
|
47
49
|
return result("unavailable");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/endpoint-tools/capability-catalog.ts
|
|
2
2
|
/** Server-owned targeting rules; device descriptors cannot change these defaults. */
|
|
3
3
|
function deviceCapabilityTarget(toolName) {
|
|
4
|
-
if (/^(mobile|desktop|web|browser)\.device\./.test(toolName) || /^(mobile|desktop|web)\.(file\.pick|media\.pick|camera\.capture|contacts\.(pick|search|get)|calendar\.query_(events|free_busy))$/.test(toolName) || toolName === "desktop.clipboard.read" || toolName === "web.page.get_selection") return "turn_origin";
|
|
4
|
+
if (/^(mobile|desktop|web|browser)\.device\./.test(toolName) || /^(mobile|desktop|web)\.(file\.pick|media\.pick|camera\.capture|contacts\.(pick|search|get)|calendar\.query_(events|free_busy))$/.test(toolName) || toolName === "desktop.clipboard.read" || toolName === "desktop.screen.capture" || toolName === "web.page.get_selection") return "turn_origin";
|
|
5
5
|
return "session_bound";
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Binding = {
|
|
2
|
+
gatewayId: string;
|
|
3
|
+
deviceId: string;
|
|
4
|
+
nonce: string;
|
|
5
|
+
method: string;
|
|
6
|
+
target: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function signDesktopAuthorityResponse(body: Record<string, unknown>, binding: Binding, status: number, signPayload: (payload: string) => string): {
|
|
9
|
+
authorityProof: {
|
|
10
|
+
signedPayload: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/** Bind authority acknowledgements to the exact authenticated request, including over loopback relays. */
|
|
15
|
+
export declare function verifyDesktopAuthorityResponse(response: {
|
|
16
|
+
status: number;
|
|
17
|
+
body: unknown;
|
|
18
|
+
}, binding: Binding, publicKey: string, now?: number): Record<string, any>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { canonicalJson, init_src } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { createPublicKey, verify } from "node:crypto";
|
|
3
|
+
//#region src/endpoint-tools/desktop-authority-response.ts
|
|
4
|
+
init_src();
|
|
5
|
+
function signDesktopAuthorityResponse(body, binding, status, signPayload) {
|
|
6
|
+
if (Buffer.byteLength(JSON.stringify(body)) > 16384 || "authorityProof" in body) throw new Error("DESKTOP_AUTHORITY_RESPONSE_INVALID");
|
|
7
|
+
const signedPayload = Buffer.from(JSON.stringify({
|
|
8
|
+
purpose: "desktop-authority-response-v1",
|
|
9
|
+
...binding,
|
|
10
|
+
status,
|
|
11
|
+
sentAt: Date.now(),
|
|
12
|
+
body
|
|
13
|
+
})).toString("base64url");
|
|
14
|
+
return {
|
|
15
|
+
...body,
|
|
16
|
+
authorityProof: {
|
|
17
|
+
signedPayload,
|
|
18
|
+
signature: signPayload(signedPayload)
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Bind authority acknowledgements to the exact authenticated request, including over loopback relays. */
|
|
23
|
+
function verifyDesktopAuthorityResponse(response, binding, publicKey, now = Date.now()) {
|
|
24
|
+
try {
|
|
25
|
+
if (!response.body || typeof response.body !== "object" || Array.isArray(response.body)) throw new Error();
|
|
26
|
+
const { authorityProof, ...body } = response.body;
|
|
27
|
+
if (!authorityProof || typeof authorityProof.signedPayload !== "string" || authorityProof.signedPayload.length > 65536 || !/^[A-Za-z0-9_-]+$/.test(authorityProof.signedPayload) || typeof authorityProof.signature !== "string" || !/^[A-Za-z0-9_-]{86}$/.test(authorityProof.signature)) throw new Error();
|
|
28
|
+
const key = createPublicKey(publicKey);
|
|
29
|
+
if (key.asymmetricKeyType !== "ed25519" || !verify(null, Buffer.from(authorityProof.signedPayload), key, Buffer.from(authorityProof.signature, "base64url"))) throw new Error();
|
|
30
|
+
const payload = JSON.parse(Buffer.from(authorityProof.signedPayload, "base64url").toString());
|
|
31
|
+
if (payload.purpose !== "desktop-authority-response-v1" || payload.status !== response.status || Object.entries(binding).some(([name, value]) => payload[name] !== value) || !Number.isSafeInteger(payload.sentAt) || !Number.isSafeInteger(now) || Math.abs(payload.sentAt - now) > 6e4 || canonicalJson(payload.body) !== canonicalJson(body)) throw new Error();
|
|
32
|
+
return body;
|
|
33
|
+
} catch {
|
|
34
|
+
throw new Error("DESKTOP_AUTHORITY_RESPONSE_INVALID");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { signDesktopAuthorityResponse, verifyDesktopAuthorityResponse };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ClientEndpointMessage, type DesktopExecutionBinding } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
/** Main-process-only signer. A connection owns its key reference and sequence. */
|
|
3
|
+
export declare class DesktopDeviceFrameSigner {
|
|
4
|
+
private key?;
|
|
5
|
+
private sequence;
|
|
6
|
+
private readonly binding;
|
|
7
|
+
constructor(binding: DesktopExecutionBinding, privateKey: string);
|
|
8
|
+
sign(input: ClientEndpointMessage, now?: number): string;
|
|
9
|
+
close(): void;
|
|
10
|
+
}
|
|
11
|
+
/** One instance per authenticated connection; invalid frames never advance its replay cursor. */
|
|
12
|
+
export declare class DesktopDeviceFrameVerifier {
|
|
13
|
+
private sequence;
|
|
14
|
+
private readonly key;
|
|
15
|
+
private readonly binding;
|
|
16
|
+
constructor(binding: DesktopExecutionBinding, publicKey: string);
|
|
17
|
+
verify(wire: string, now?: number): ClientEndpointMessage;
|
|
18
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { desktopDeviceFrameProofSchema, desktopExecutionBindingSchema } from "../../packages/endpoint-tools-protocol/src/execution.js";
|
|
2
|
+
import { clientEndpointMessageSchema, init_src } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
|
+
import { createPrivateKey, createPublicKey, sign, verify } from "node:crypto";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/endpoint-tools/desktop-device-frame.ts
|
|
6
|
+
init_src();
|
|
7
|
+
const MAX_WIRE_BYTES = 768 * 1024;
|
|
8
|
+
const signedSchema = desktopExecutionBindingSchema.extend({
|
|
9
|
+
purpose: z.literal("desktop-device-frame-v1"),
|
|
10
|
+
sequence: z.number().int().positive().max(Number.MAX_SAFE_INTEGER),
|
|
11
|
+
message: clientEndpointMessageSchema
|
|
12
|
+
});
|
|
13
|
+
const wireSchema = z.strictObject({
|
|
14
|
+
message: clientEndpointMessageSchema,
|
|
15
|
+
deviceProof: desktopDeviceFrameProofSchema
|
|
16
|
+
});
|
|
17
|
+
const encode = (value) => Buffer.from(JSON.stringify(value)).toString("base64url");
|
|
18
|
+
const current = (message, now) => {
|
|
19
|
+
if (!Number.isSafeInteger(now) || Math.abs(now - message.sentAt) > 6e4) throw new Error("DESKTOP_DEVICE_FRAME_INVALID");
|
|
20
|
+
};
|
|
21
|
+
const p256 = (key) => {
|
|
22
|
+
if (key.asymmetricKeyType !== "ec" || key.asymmetricKeyDetails?.namedCurve !== "prime256v1") throw new Error("DESKTOP_DEVICE_KEY_INVALID");
|
|
23
|
+
return key;
|
|
24
|
+
};
|
|
25
|
+
/** Main-process-only signer. A connection owns its key reference and sequence. */
|
|
26
|
+
var DesktopDeviceFrameSigner = class {
|
|
27
|
+
key;
|
|
28
|
+
sequence = 0;
|
|
29
|
+
binding;
|
|
30
|
+
constructor(binding, privateKey) {
|
|
31
|
+
this.binding = desktopExecutionBindingSchema.parse(binding);
|
|
32
|
+
this.key = p256(createPrivateKey(privateKey));
|
|
33
|
+
}
|
|
34
|
+
sign(input, now = Date.now()) {
|
|
35
|
+
if (!this.key) throw new Error("DESKTOP_DEVICE_FRAME_SIGNER_CLOSED");
|
|
36
|
+
const message = clientEndpointMessageSchema.parse(JSON.parse(JSON.stringify(input)));
|
|
37
|
+
current(message, now);
|
|
38
|
+
const sequence = this.sequence + 1;
|
|
39
|
+
if (!Number.isSafeInteger(sequence)) throw new Error("DESKTOP_DEVICE_FRAME_SEQUENCE_EXHAUSTED");
|
|
40
|
+
const signedPayload = encode({
|
|
41
|
+
...this.binding,
|
|
42
|
+
purpose: "desktop-device-frame-v1",
|
|
43
|
+
sequence,
|
|
44
|
+
message
|
|
45
|
+
});
|
|
46
|
+
const deviceProof = desktopDeviceFrameProofSchema.parse({
|
|
47
|
+
signedPayload,
|
|
48
|
+
signature: sign("sha256", Buffer.from(signedPayload), {
|
|
49
|
+
key: this.key,
|
|
50
|
+
dsaEncoding: "ieee-p1363"
|
|
51
|
+
}).toString("base64url")
|
|
52
|
+
});
|
|
53
|
+
const wire = JSON.stringify({
|
|
54
|
+
message,
|
|
55
|
+
deviceProof
|
|
56
|
+
});
|
|
57
|
+
if (Buffer.byteLength(wire) > MAX_WIRE_BYTES) throw new Error("DESKTOP_DEVICE_FRAME_TOO_LARGE");
|
|
58
|
+
this.sequence = sequence;
|
|
59
|
+
return wire;
|
|
60
|
+
}
|
|
61
|
+
close() {
|
|
62
|
+
this.key = void 0;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
/** One instance per authenticated connection; invalid frames never advance its replay cursor. */
|
|
66
|
+
var DesktopDeviceFrameVerifier = class {
|
|
67
|
+
sequence = 0;
|
|
68
|
+
key;
|
|
69
|
+
binding;
|
|
70
|
+
constructor(binding, publicKey) {
|
|
71
|
+
this.binding = desktopExecutionBindingSchema.parse(binding);
|
|
72
|
+
this.key = p256(createPublicKey(publicKey));
|
|
73
|
+
}
|
|
74
|
+
verify(wire, now = Date.now()) {
|
|
75
|
+
try {
|
|
76
|
+
if (Buffer.byteLength(wire) > MAX_WIRE_BYTES) throw new Error();
|
|
77
|
+
const { message, deviceProof } = wireSchema.parse(JSON.parse(wire));
|
|
78
|
+
const { signedPayload, signature } = deviceProof;
|
|
79
|
+
if (!verify("sha256", Buffer.from(signedPayload), {
|
|
80
|
+
key: this.key,
|
|
81
|
+
dsaEncoding: "ieee-p1363"
|
|
82
|
+
}, Buffer.from(signature, "base64url"))) throw new Error();
|
|
83
|
+
const payload = signedSchema.parse(JSON.parse(Buffer.from(signedPayload, "base64url").toString("utf8")));
|
|
84
|
+
if (encode(payload) !== signedPayload || payload.sequence !== this.sequence + 1 || Object.entries(this.binding).some(([key, value]) => payload[key] !== value) || JSON.stringify(payload.message) !== JSON.stringify(message)) throw new Error();
|
|
85
|
+
current(message, now);
|
|
86
|
+
this.sequence = payload.sequence;
|
|
87
|
+
return message;
|
|
88
|
+
} catch {
|
|
89
|
+
throw new Error("DESKTOP_DEVICE_FRAME_INVALID");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
export { DesktopDeviceFrameSigner, DesktopDeviceFrameVerifier };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type EndpointHelloPayload } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
import type { DeviceRecord } from '../storage/sqlite/device-access-repository.js';
|
|
3
|
+
/** Only the authenticated device and its exact, still-active local grant may register an executor. */
|
|
4
|
+
export declare function assertDesktopExecutionHello(device: DeviceRecord, hello: EndpointHelloPayload, registeredKey: string | undefined, gatewayId: string, clientId: string, capabilities: readonly string[], now?: number): {
|
|
5
|
+
gatewayId: string;
|
|
6
|
+
deviceId: string;
|
|
7
|
+
clientId: string;
|
|
8
|
+
connectionInstanceId: string;
|
|
9
|
+
authorizationRevision: number;
|
|
10
|
+
grantId: string;
|
|
11
|
+
expiresAt: number;
|
|
12
|
+
operationStatus?: true;
|
|
13
|
+
workspaceId?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { endpointDesktopExecutionAuthoritySchema } from "../../packages/endpoint-tools-protocol/src/execution.js";
|
|
2
|
+
import { init_src } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
|
+
import { init_src as init_src$1 } from "../../packages/computer-control-contract/src/index.js";
|
|
4
|
+
import "../../packages/browser-control-contract/src/remote.js";
|
|
5
|
+
import { getDesktopExecutionGrant } from "../storage/sqlite/desktop-execution-repository.js";
|
|
6
|
+
import { desktopDeviceEndpointKey } from "./desktop-observation.js";
|
|
7
|
+
import { endpointToolRevision } from "./registry.js";
|
|
8
|
+
//#region src/endpoint-tools/desktop-execution.ts
|
|
9
|
+
init_src();
|
|
10
|
+
init_src$1();
|
|
11
|
+
/** Only the authenticated device and its exact, still-active local grant may register an executor. */
|
|
12
|
+
function assertDesktopExecutionHello(device, hello, registeredKey, gatewayId, clientId, capabilities, now = Date.now()) {
|
|
13
|
+
const snapshot = getDesktopExecutionGrant(device.id, now), grant = snapshot?.grant, execution = hello.execution;
|
|
14
|
+
if (device.platform !== "desktop" || device.revokedAt !== void 0 || !device.scopes.includes("desktop.execute") || hello.principalId !== device.id || hello.kind !== "desktop" || hello.platform !== "desktop" || registeredKey !== desktopDeviceEndpointKey(device) || !snapshot?.active || !grant || !execution || execution.grantId !== grant.grantId || execution.expiresAt !== grant.expiresAt || execution.authorizationRevision !== snapshot.revision || hello.deviceFrames?.version !== 1 || hello.deviceFrames.authorizationRevision !== snapshot.revision || !capabilities.includes("desktop.device-frames.v1") || !capabilities.includes("desktop.durable-execution.v1") || hello.tools.some((tool) => tool.name === "desktop.operation.get_status") && !capabilities.includes("desktop.operation-status.v1") || hello.tools.some((tool) => tool.name === "desktop.computer.remote_control") && !capabilities.includes("desktop.computer.v1") || hello.tools.some((tool) => tool.name === "desktop.browser.control") && !capabilities.includes("desktop.browser.v1") || Boolean(hello.terminal) !== Boolean(grant.toolRevisions["desktop.terminal.open"]) || hello.terminal && !capabilities.includes("desktop.terminal.v1") || hello.tools.length !== Object.keys(grant.toolRevisions).length || new Set(hello.tools.map((tool) => tool.name)).size !== hello.tools.length || hello.tools.some((tool) => grant.toolRevisions[tool.name] !== endpointToolRevision(tool))) throw new Error("DESKTOP_EXECUTION_DENIED");
|
|
15
|
+
return endpointDesktopExecutionAuthoritySchema.parse({
|
|
16
|
+
gatewayId,
|
|
17
|
+
deviceId: device.id,
|
|
18
|
+
clientId,
|
|
19
|
+
connectionInstanceId: hello.connectionInstanceId,
|
|
20
|
+
authorizationRevision: snapshot.revision,
|
|
21
|
+
grantId: grant.grantId,
|
|
22
|
+
expiresAt: grant.expiresAt,
|
|
23
|
+
...grant.workspaceId ? { workspaceId: grant.workspaceId } : {},
|
|
24
|
+
...capabilities.includes("desktop.operation-status.v1") ? { operationStatus: true } : {}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { assertDesktopExecutionHello };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DesktopFrameBinding = {
|
|
2
|
+
gatewayId: string;
|
|
3
|
+
deviceId: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
connectionInstanceId: string;
|
|
6
|
+
};
|
|
7
|
+
/** Optional Host-only extension; existing chat and local owner endpoints retain their wire path. */
|
|
8
|
+
export declare function signDesktopGatewayFrame(message: Record<string, unknown>, binding: DesktopFrameBinding, sequence: number, signPayload: (payload: string) => string): Record<string, unknown>;
|
|
9
|
+
export declare function verifyDesktopGatewayFrame(wire: string, binding: DesktopFrameBinding, publicKey: string, lastSequence: number, now?: number): {
|
|
10
|
+
sequence: number;
|
|
11
|
+
message: any;
|
|
12
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createPublicKey, verify } from "node:crypto";
|
|
2
|
+
//#region src/endpoint-tools/desktop-frame.ts
|
|
3
|
+
/** Optional Host-only extension; existing chat and local owner endpoints retain their wire path. */
|
|
4
|
+
function signDesktopGatewayFrame(message, binding, sequence, signPayload) {
|
|
5
|
+
const signedPayload = Buffer.from(JSON.stringify({
|
|
6
|
+
purpose: "desktop-gateway-frame-v1",
|
|
7
|
+
...binding,
|
|
8
|
+
sequence,
|
|
9
|
+
message
|
|
10
|
+
})).toString("base64url");
|
|
11
|
+
return {
|
|
12
|
+
...message,
|
|
13
|
+
gatewayProof: {
|
|
14
|
+
signedPayload,
|
|
15
|
+
signature: signPayload(signedPayload)
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function verifyDesktopGatewayFrame(wire, binding, publicKey, lastSequence, now = Date.now()) {
|
|
20
|
+
try {
|
|
21
|
+
if (Buffer.byteLength(wire) > 768 * 1024) throw new Error();
|
|
22
|
+
const { gatewayProof, ...message } = JSON.parse(wire);
|
|
23
|
+
if (!gatewayProof || typeof gatewayProof.signedPayload !== "string" || gatewayProof.signedPayload.length > 512 * 1024 || typeof gatewayProof.signature !== "string" || gatewayProof.signature.length > 128 || !verify(null, Buffer.from(gatewayProof.signedPayload), createPublicKey(publicKey), Buffer.from(gatewayProof.signature, "base64url"))) throw new Error();
|
|
24
|
+
const proof = JSON.parse(Buffer.from(gatewayProof.signedPayload, "base64url").toString());
|
|
25
|
+
if (proof.purpose !== "desktop-gateway-frame-v1" || !Number.isSafeInteger(proof.sequence) || proof.sequence !== lastSequence + 1 || Object.entries(binding).some(([key, value]) => proof[key] !== value) || !Number.isSafeInteger(message.sentAt) || Math.abs(now - message.sentAt) > 6e4 || JSON.stringify(proof.message) !== JSON.stringify(message) || !["realtime.ready", "endpoint.message"].includes(message.kind)) throw new Error();
|
|
26
|
+
return {
|
|
27
|
+
sequence: proof.sequence,
|
|
28
|
+
message
|
|
29
|
+
};
|
|
30
|
+
} catch {
|
|
31
|
+
throw new Error("DESKTOP_GATEWAY_FRAME_INVALID");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { signDesktopGatewayFrame, verifyDesktopGatewayFrame };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EndpointHelloPayload } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
import type { DeviceRecord } from '../storage/sqlite/device-access-repository.js';
|
|
3
|
+
export declare function desktopDeviceEndpointKey(device: Pick<DeviceRecord, 'publicKeyJwk'>): string;
|
|
4
|
+
export declare function assertDesktopObservationHello(device: DeviceRecord, hello: EndpointHelloPayload, registeredKey: string | undefined): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DESKTOP_SCREEN_OBSERVATION_TOOL, DESKTOP_STATE_OBSERVATION_TOOL } from "../../packages/gateway-contract/src/desktop-host.js";
|
|
2
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { createPublicKey } from "node:crypto";
|
|
4
|
+
//#region src/endpoint-tools/desktop-observation.ts
|
|
5
|
+
init_src();
|
|
6
|
+
function desktopDeviceEndpointKey(device) {
|
|
7
|
+
return createPublicKey({
|
|
8
|
+
key: device.publicKeyJwk,
|
|
9
|
+
format: "jwk"
|
|
10
|
+
}).export({
|
|
11
|
+
type: "spki",
|
|
12
|
+
format: "der"
|
|
13
|
+
}).toString("base64url");
|
|
14
|
+
}
|
|
15
|
+
function assertDesktopObservationHello(device, hello, registeredKey) {
|
|
16
|
+
const allowed = [...device.scopes.includes("desktop.observe.state") ? [DESKTOP_STATE_OBSERVATION_TOOL] : [], ...device.scopes.includes("desktop.observe.screen") ? [DESKTOP_SCREEN_OBSERVATION_TOOL] : []];
|
|
17
|
+
if (device.platform !== "desktop" || device.revokedAt !== void 0 || hello.principalId !== device.id || hello.kind !== "desktop" || hello.platform !== "desktop" || registeredKey !== desktopDeviceEndpointKey(device) || hello.tools.length !== 1 || !allowed.includes(hello.tools[0]?.name)) throw new Error("DESKTOP_OBSERVATION_DENIED");
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { assertDesktopObservationHello, desktopDeviceEndpointKey };
|
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import { type ClientEndpointMessage, type EndpointToolContent, type EndpointToolErrorCode } from '@xopcai/endpoint-tools-protocol';
|
|
1
|
+
import { type DesktopOperationIntent, type ClientEndpointMessage, type EndpointToolContent, type EndpointToolDescriptor, type EndpointToolErrorCode } from '@xopcai/endpoint-tools-protocol';
|
|
2
2
|
import { EndpointRegistry } from './registry.js';
|
|
3
3
|
import { EndpointToolPolicy } from './policy.js';
|
|
4
4
|
import type { EndpointUploadService } from './upload-service.js';
|
|
5
5
|
type ToolClientMessage = Exclude<ClientEndpointMessage, {
|
|
6
6
|
type: `endpoint.${string}`;
|
|
7
7
|
}>;
|
|
8
|
+
type PendingState = 'sent' | 'running';
|
|
9
|
+
interface PendingInvocation {
|
|
10
|
+
id: string;
|
|
11
|
+
endpointId: string;
|
|
12
|
+
toolName: string;
|
|
13
|
+
descriptor: EndpointToolDescriptor;
|
|
14
|
+
arguments: Record<string, unknown>;
|
|
15
|
+
state: PendingState;
|
|
16
|
+
operationQuery?: DesktopOperationIntent;
|
|
17
|
+
execution?: {
|
|
18
|
+
intent: DesktopOperationIntent;
|
|
19
|
+
connectionInstanceId: string;
|
|
20
|
+
};
|
|
21
|
+
stopTimer?: ReturnType<typeof setTimeout>;
|
|
22
|
+
receiptTimer: ReturnType<typeof setTimeout>;
|
|
23
|
+
deadlineTimer: ReturnType<typeof setTimeout>;
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
abortHandler?: () => void;
|
|
26
|
+
onProgress?: (progress: {
|
|
27
|
+
message?: string;
|
|
28
|
+
percent?: number;
|
|
29
|
+
}) => void;
|
|
30
|
+
onTerminal?: (invocationId: string, event: Extract<ClientEndpointMessage, {
|
|
31
|
+
type: 'terminal.event';
|
|
32
|
+
}>['payload']['event']) => void;
|
|
33
|
+
resolve: (result: EndpointInvocationResult) => void;
|
|
34
|
+
reject: (error: Error) => void;
|
|
35
|
+
}
|
|
8
36
|
export interface EndpointInvocationAuditSink {
|
|
9
37
|
started(params: {
|
|
10
38
|
id: string;
|
|
@@ -15,6 +43,7 @@ export interface EndpointInvocationAuditSink {
|
|
|
15
43
|
effect: 'read' | 'write' | 'destructive';
|
|
16
44
|
confirmationRequired: boolean;
|
|
17
45
|
argumentsSha256: string;
|
|
46
|
+
operationId?: string;
|
|
18
47
|
startedAt: number;
|
|
19
48
|
}): void;
|
|
20
49
|
finished(params: {
|
|
@@ -37,7 +66,8 @@ export interface EndpointInvocationResult {
|
|
|
37
66
|
}
|
|
38
67
|
export declare class EndpointToolExecutionError extends Error {
|
|
39
68
|
readonly code: EndpointToolErrorCode;
|
|
40
|
-
|
|
69
|
+
readonly confirmedNoEffect: boolean;
|
|
70
|
+
constructor(code: EndpointToolErrorCode, message: string, confirmedNoEffect?: boolean);
|
|
41
71
|
}
|
|
42
72
|
export declare class EndpointInvocationService {
|
|
43
73
|
private readonly registry;
|
|
@@ -52,16 +82,19 @@ export declare class EndpointInvocationService {
|
|
|
52
82
|
toolName: string;
|
|
53
83
|
arguments: Record<string, unknown>;
|
|
54
84
|
descriptorRevision: string;
|
|
85
|
+
operationId?: string;
|
|
55
86
|
signal?: AbortSignal;
|
|
56
87
|
onProgress?: (progress: {
|
|
57
88
|
message?: string;
|
|
58
89
|
percent?: number;
|
|
59
90
|
}) => void;
|
|
91
|
+
onTerminal?: PendingInvocation['onTerminal'];
|
|
60
92
|
}): Promise<EndpointInvocationResult>;
|
|
61
93
|
handleMessage(endpointId: string, message: ToolClientMessage): void;
|
|
62
94
|
failEndpoint(endpointId: string): void;
|
|
63
95
|
close(): void;
|
|
64
96
|
private cancel;
|
|
97
|
+
private verifyExecutionReceipt;
|
|
65
98
|
private succeed;
|
|
66
99
|
private fail;
|
|
67
100
|
private finishAudit;
|