@xopcai/xopc 0.0.444 → 0.0.446
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/{auth-DAIwDtVp.js → auth-CQmxIyWw.js} +225 -8
- package/dist/browser-ext/dist/background.js +254 -16
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +3 -49
- 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-CuPXAoLe.js → activity-store-Ddf-02Rf.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D92uHOFV.js → agent-avatar-dicebear-Dcu4ggpV.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-DINzeGs0.js → agent-avatar-display-CarpM_qc.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-rH1QpgiR.js → agent-defaults-settings-panel-B4GynTfH.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-B2vXlrDW.js → agent-plugin-dialog-BWQ_Diyv.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-lvQfOQPN.js → agents-DKaImiga.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DPLtjJtX.js → agents-admin-api-BwoePPTG.js} +1 -1
- package/dist/gateway/static/root/assets/{api-snfMD8_Y.js → api-Cc72Y3ct.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CEzBruRJ.js → api-MJxs2HLk.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CONwDpqL.js → app-management-settings-panel-Cy6szt9g.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Bu7K-_ri.js → appearance-settings-Dy75gAe7.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-C3iDd3ZQ.js → apps-page-DlwW9ClN.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CfLz9o-2.js → archive-plugin-_5jgYMZC.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-Dl9fi8t0.js → automation-api-DrxC4rCG.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-BjjZCxee.js → automation-result-state-Ba_q8_Jj.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-9IPHu_UC.js → automation-run-list-DuyMQwtf.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-CKbHMLSy.js → automation-task-card-D4Ojt-Q4.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-K3trjTZl.js → automations-page-D-Sl7Dhr.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-D7m3w_9B.js → automations-workspace-ND9J7xtt.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-Bv4ixxo4.js → binary-plugins-BYHCUreq.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CtaJSB9U.js → block-editor-DI_JHx-P.js} +3 -2
- package/dist/gateway/static/root/assets/{browser-settings-page-CmBsnx24.js → browser-settings-page-DXBM5lpK.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DDJJhQ40.js → capabilities-CUHCbQ5N.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DJYgOjeq.js → capabilities-C_mZ4wUq.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CBqvHAyp.js → capabilities-page-RJnyR_V9.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-wjezs0OE.js → capabilities-settings-panel-CxSrK6bJ.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-D4q8hiD0.js → channels-CBXmRfVR.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BOB3dILf.js → chat-agents-api-D6sJpLeT.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DsaCatBN.js → chat-chart-block-B2U7epTQ.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-U5hc4rIa.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D9o0nUEV.js → chat-terminal-dock-XNPvQhNw.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-Cj0_7g9o.js → command-palette-api-DbL0oPXq.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-CoDWKzBm.js → composer-payload-handoff-CaxZicbL.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DJ9BIOHC.js → computer-settings-page-Velpw46s.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-C5-3MDIj.js → connected-providers-grid-Y79g354a.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-bD1sKiAp.js → connection-usage-guide-BaDoesqn.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BEq3i3Vi.js → connector-service-page-C5mVM3zg.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DEExP6a7.js → connectors-api-Cgiy3Dyn.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-QVWuoxuK.js → connectors-page-DDSTfe3M.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-D2whl8Ci.js → date-picker-BCxU-AEv.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-qnIdmNnH.js → desktop-pet-D1buh7JC.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C54b1FY4.js → desktop-pet-settings-CVs5timB.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-bryv5YRw.js → dev-view-store-rdp0Stsh.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-Du-yOxZv.js → device-pairing-wizard-ZX1oup6S.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-GsMkjw59.js → directory-picker-path-field-BN57kiUt.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-CrpDiC7J.js → discussion-annotation-sync-BG-sbtYu.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CDZfdMAR.js → extension-debug-page-DuuOhNRp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CG70QWPS.js → extension-iframe-host-DzzKhhvD.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-D7Av-sOf.js → extension-marketplace-api-5BBPFsmU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DpJTL6-v.js → extension-page-DDmRVcIm.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BZTbdvCF.js → extension-provider-CFzHYMV0.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CC4rmiFC.js → extension-settings-page-DGAD52bm.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-Dtla5oAW.js → file-preview-surface-DgG6OJyj.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-B5THNdYK.js → gateway-config-swr-D0yocd87.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-DpNC3Y7U.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-BQELP9Or.js +1 -0
- package/dist/gateway/static/root/assets/gateway-restart-C_8Z4DRU.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CGlpz-Ft.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CqtCJzWJ.js → gateway-startup-retry-BPSM56sw.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BQMdHLlp.js → global-defaults-api-BFsm77dC.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-Df3X6-Ko.js → home-page-UXS36f7M.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-G3tQFhif.js → image-generation-api-wJi7zpES.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BmEqiunH.js → imports-page-iddP3PVx.js} +1 -1
- package/dist/gateway/static/root/assets/index-D0p4v0SG.js +11 -0
- package/dist/gateway/static/root/assets/index-Uxz0OdzD.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-BU4l6KJv.js → install-connector-dialog-DSIVSJRz.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CtNI6i7K.js → keyboard-shortcuts-settings-Cxdd0r3Z.js} +1 -1
- package/dist/gateway/static/root/assets/languages-kF11aUYU.js +2 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CE46mHc0.js → local-app-workbench-page-jfkZZHHd.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DqZT5hLH.js → local-apps-page-BwWuY0x2.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-Bt_e3A8f.js → local-session-drafts-cTAkoNSf.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Bld7_m-Q.js → locale-store-DJYUYPdV.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CzajqK40.js → logs-page-CuxC8O1E.js} +1 -1
- package/dist/gateway/static/root/assets/management-api-CmBUdfsn.js +1 -0
- package/dist/gateway/static/root/assets/management-settings-CYn1EOVo.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-editor-BuuGlcfG.js → markdown-editor-CjQJ-Nho.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-B3cFKCfO.js → markdown-view-DrcA6Cfr.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-ZcY1nqMO.js → mcp-conversation-setup-page-C5D5oueS.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DSOplRhW.js → media-plugins-CQZ0Jh_x.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-CGO1P4mz.js → messages-DziUGfxF.js} +2 -2
- package/dist/gateway/static/root/assets/{model-selector-yAKlOR3O.js → model-selector-CbKl8YPf.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-8V-ZpAIa.js → models-hub-cache-CwxnL3rY.js} +1 -1
- package/dist/gateway/static/root/assets/navigation-ByOzYT0t.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-uQO4kymH.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-CaO_VuWl.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CVQqqmGI.js → notes-api-DoCb3QlH.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DIugUbkV.js → notes-page-DOl7cqLg.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-DGa6PTuq.js → oauth-api-3b_QtYeo.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-Bc-KLH1e.js → oauth-provider-connect-D1JQ4FBf.js} +1 -1
- package/dist/gateway/static/root/assets/page-context-capture-button-CVIVl1MQ.js +1 -0
- package/dist/gateway/static/root/assets/{page-context-draft-GveHK8e2.js → page-context-draft-Ky5J09qv.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-Jt0XBQxm.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-Cu8lGBXZ.js → personal-avatar-Dh4qjZYy.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-BZWJKyZ8.js → personal-page-edoGNvVa.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-awr10jTV.js → personal-settings-panel-BtTwDaw0.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-CAxn3usD.js → phone-dependencies-card-B6rA2lO_.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-BBG3LxRP.js → phone-model-connection-xqaXDOVF.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CfPjKpnd.js → phone-model-picker-yuGXKCM9.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-C4dJdwRW.js → phone-settings-page-DhjuPpF4.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BKltFHtG.js → phone-workspace-store-2xQhZsJr.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BqcFfZFH.js → plugin-details-dialog-CIS3SUKM.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-QlyIA8ve.js → preference-select-fields-BAZSKhoi.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-CRsfuAXl.js → product-automation-feedback-Bh37tBpR.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CQ4dk-_l.js → product-open-page-BXcS7lCW.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-content-BNultFGN.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-modal-BTlUoG48.js +2 -0
- package/dist/gateway/static/root/assets/project-detail-page-DNvQzRnU.js +7 -0
- package/dist/gateway/static/root/assets/project-overview-model-DrLXaO-t.js +1 -0
- package/dist/gateway/static/root/assets/{project-understanding-CU2af95r.js → project-understanding-CrYVzB8i.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BsgZb6n9.js → projects-page-nEhOaONB.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-CspehmSU.js → providers-api-MimHCxo_.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-BOZAOdCI.js → recording-upload-BUe8jmx8.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bdp3UUyz.js → registry-api-CkrGCW-C.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Bos3uwAT.js → remote-access-hub-QqFEiO0m.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-DJR3SCy6.js → resource-unavailable-CSc5SeHy.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-BTPpGwjV.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-DsbahxzE.js → runtime-tools-api-BzLDrYX8.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DW9_OFi2.js → runtime-tools-settings-panel-DST1lBFY.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-Bd1JDO5T.js → service-recommendation-list-DezuXPLs.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-DjnHJ-0n.js → session-api-QnBTnXGH.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-ChHnJOWW.js → session-manager-b2zxVzZI.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-BM-oqd22.js → sessions-page-uarYA2Xw.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bq6eQ3It.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CM44UlF8.js → settings-advanced-section-Crhl0mQp.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-Blc4C8aw.js → settings-mode-store-CrM7SFWJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-irv-JoTz.js → settings-page-BrogpvEd.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-BYFaTD8a.js → settings-page-header-DPKy790x.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CnUQSxT3.js → settings-page-layout-8kCWtU5m.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-DqaiLQ0I.js → setup-interaction-page-BVnMLwC-.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-iOYgfkoK.js → setup-status-panel--Fb7FwVG.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C_uYNUlp.js → share-link-dialog-C45dGG9y.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CFebGqyB.js → share-preview-page-ConV6wRP.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-C2GDyqxP.js → shares-api-BsDhQwd3.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-B-7la3QN.js → shares-settings-DJz0p2PL.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BnpTSZGc.js → skill-api-BrM5Ctxg.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-7MY9ewiu.js → skill-list-api-DWCkzC6W.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DkDpu3Wd.js → skill-reload-api-C2jfZi01.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-sL2kGqHZ.js → skills-page-DbAc1Y4C.js} +1 -1
- package/dist/gateway/static/root/assets/{source-workspace-editor-kxosllTu.js → source-workspace-editor-BwYU5OEh.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BltKPJdb.js → system-settings-panel-BiswiIqg.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-6awKGnOr.js → task-detail-page-R0_AM-IE.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-Cy9txdqV.js → task-result-evidence-C1AEUu9S.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DUEJoa1M.js → terminal-panel-store-qS6f2G-H.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DsvYj7Vy.js → theme-store-Docer0tD.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-B_Xdc2VF.js → tracing-settings-page-DiXHv8C3.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-B6BhWTh3.js → tunnel-api-UYBm3Hqd.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-B7rFXhDk.js → understanding-activity-store-CK6cQ0iJ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-DCFASve5.js → understanding-refresh-store-DVNqbtHk.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DqzosTxy.js → usage-page-DmA7kQI2.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DsqcLHV9.js → use-autosave-D1tFBLQO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-ClakaDU1.js → use-composer-attachments-CwJslPRU.js} +1 -1
- package/dist/gateway/static/root/assets/use-file-preview-expanded-CK1OJENF.js +15 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-T2e6P5Ed.js → use-personal-profile-CpsJdlEs.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-Dq0qgK3N.js → use-workspace-tree-CW9hcMwg.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Ziz55hVM.js → user-model-page-BlYKXzCa.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-D7NPAc1E.js → voice-api-key-field-DD9V94Y7.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-UQDTh6hh.js → voice-config-api-Cr6IkfV2.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-SD2gZVg8.js → voice-input-shortcut-events-hsEdKDO6.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-Bf9FaI-p.js → voice-transcribe-api-DKain9tL.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B41GOFXh.js → work-discovery-overlay-yYdAqtrO.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-NNhExALx.js → work-discovery-page-8hTykUqr.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-DeNWVFFK.js → working-directory-picker-modal-CXPSsy2J.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-DrVss2Fd.js → workspace-api-DNSoGsW8.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-ENv6zDBq.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-C2egBzza.js → workspace-file-preview-dialog-BVYsAXwp.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-XFUtwfLY.js → workspace-open-location-menu-DN7E_-eH.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-BlhFT1q9.js → xopc-cloud-account-card-CGs77iKb.js} +1 -1
- package/dist/gateway/static/root/index.html +83 -82
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-client/src/index.js +309 -17
- package/dist/packages/endpoint-tools-protocol/src/index.js +62 -10
- package/dist/packages/endpoint-tools-protocol/src/provider-execution.js +32 -0
- package/dist/packages/endpoint-tools-protocol/src/providers.js +233 -0
- package/dist/packages/gateway-contract/src/clarifications.js +1 -1
- package/dist/packages/gateway-contract/src/device-pairing.js +2 -1
- package/dist/packages/gateway-contract/src/device-request-proof.js +32 -0
- package/dist/packages/gateway-contract/src/index.js +2 -2
- package/dist/packages/realtime-client/src/index.js +1 -0
- package/dist/packages/realtime-protocol/src/index.js +4 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/embedded/session-runner.js +7 -2
- package/dist/src/agent/embedded/tool-metadata.d.ts +1 -1
- package/dist/src/agent/embedded/tool-search-extension.d.ts +1 -0
- package/dist/src/agent/embedded/tool-search-extension.js +35 -2
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +3 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +94 -16
- package/dist/src/agent/external-tools/index.js +2 -2
- package/dist/src/agent/external-tools/personal-request-scope.js +6 -0
- package/dist/src/agent/external-tools/read-policy.js +15 -8
- package/dist/src/agent/external-tools/service.js +8 -0
- package/dist/src/agent/external-tools/types.d.ts +1 -0
- package/dist/src/agent/inbound/inbound-loop.js +2 -1
- package/dist/src/agent/mcp/continuation-guard.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.js +1 -1
- package/dist/src/agent/mcp/discovery.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +2 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +6 -5
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +2 -0
- package/dist/src/agent/tools/clarify-tool.d.ts +1 -0
- package/dist/src/agent/tools/device-use-tool.d.ts +9 -0
- package/dist/src/agent/tools/device-use-tool.js +158 -0
- package/dist/src/agent/tools/factory.js +24 -3
- package/dist/src/automations/mcp-source.js +1 -1
- package/dist/src/automations/service/action-executor.js +10 -2
- package/dist/src/browser/remote/device-driver.js +7 -3
- package/dist/src/browser/remote/device-target.d.ts +1 -1
- package/dist/src/browser/remote/device-target.js +8 -6
- package/dist/src/channels/lifecycle-supervisor.js +2 -1
- package/dist/src/channels/verified-inbound.d.ts +13 -0
- package/dist/src/channels/verified-inbound.js +29 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/device-host.d.ts +1 -0
- package/dist/src/cli/commands/device-host.js +52 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/index.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +3 -3
- package/dist/src/computer/errors.js +4 -0
- package/dist/src/computer/evaluation.d.ts +2 -2
- package/dist/src/computer/flows.js +1 -1
- package/dist/src/computer/runtime.d.ts +1 -0
- package/dist/src/computer/runtime.js +25 -3
- package/dist/src/config/schema.d.ts +2 -0
- package/dist/src/config/schema.js +1 -0
- package/dist/src/connectors/composio-triggers.js +1 -1
- package/dist/src/endpoint-tools/bridge-host.d.ts +5 -4
- package/dist/src/endpoint-tools/bridge-host.js +165 -30
- package/dist/src/endpoint-tools/bridge.d.ts +1 -1
- package/dist/src/endpoint-tools/bridge.js +39 -7
- package/dist/src/endpoint-tools/capability-catalog.d.ts +1 -1
- package/dist/src/endpoint-tools/capability-catalog.js +1 -1
- package/dist/src/endpoint-tools/delegation.d.ts +60 -0
- package/dist/src/endpoint-tools/delegation.js +130 -0
- package/dist/src/endpoint-tools/desktop-execution.js +1 -1
- package/dist/src/endpoint-tools/device-host.d.ts +98 -0
- package/dist/src/endpoint-tools/device-host.js +89 -0
- package/dist/src/endpoint-tools/execution-actor.d.ts +6 -0
- package/dist/src/endpoint-tools/execution-actor.js +53 -0
- package/dist/src/endpoint-tools/grant-service.d.ts +7 -4
- package/dist/src/endpoint-tools/grant-service.js +12 -4
- package/dist/src/endpoint-tools/host-credentials.d.ts +42 -0
- package/dist/src/endpoint-tools/host-credentials.js +144 -0
- package/dist/src/endpoint-tools/index.d.ts +1 -1
- package/dist/src/endpoint-tools/index.js +3 -3
- package/dist/src/endpoint-tools/invocation-service.d.ts +47 -4
- package/dist/src/endpoint-tools/invocation-service.js +328 -36
- package/dist/src/endpoint-tools/mcp-provider.d.ts +32 -0
- package/dist/src/endpoint-tools/mcp-provider.js +258 -0
- package/dist/src/endpoint-tools/policy.js +0 -3
- package/dist/src/endpoint-tools/provider-catalog.d.ts +45 -0
- package/dist/src/endpoint-tools/provider-catalog.js +202 -0
- package/dist/src/endpoint-tools/provider-operation-journal.d.ts +18 -0
- package/dist/src/endpoint-tools/provider-operation-journal.js +111 -0
- package/dist/src/endpoint-tools/provider-operation-status.d.ts +33 -0
- package/dist/src/endpoint-tools/provider-operation-status.js +80 -0
- package/dist/src/endpoint-tools/registry.d.ts +14 -1
- package/dist/src/endpoint-tools/registry.js +15 -1
- package/dist/src/endpoint-tools/result-projector.d.ts +1 -2
- package/dist/src/endpoint-tools/result-projector.js +3 -11
- package/dist/src/endpoint-tools/runtime.d.ts +10 -2
- package/dist/src/endpoint-tools/runtime.js +102 -11
- package/dist/src/endpoint-tools/target-resolver.d.ts +8 -3
- package/dist/src/endpoint-tools/target-resolver.js +24 -5
- package/dist/src/endpoint-tools/task-targets.d.ts +38 -0
- package/dist/src/endpoint-tools/task-targets.js +95 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +34 -1
- package/dist/src/endpoint-tools/upload-service.js +88 -2
- package/dist/src/gateway/hono/routes/agent-stream.js +12 -1
- package/dist/src/gateway/hono/routes/device-authorizations.js +4 -10
- package/dist/src/gateway/hono/routes/device-hosts.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-hosts.js +82 -0
- package/dist/src/gateway/hono/routes/device-providers.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-providers.js +297 -0
- package/dist/src/gateway/hono/routes/device-targets.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-targets.js +117 -0
- package/dist/src/gateway/hono/routes/endpoint-compatibility.js +2 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +2 -78
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +24 -8
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +2 -2
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -0
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +2 -2
- package/dist/src/gateway/security/device-request-proof.js +8 -18
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/agent-runner.d.ts +3 -0
- package/dist/src/gateway/service/agent-runner.js +21 -5
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service.js +15 -10
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/mcp/capability-server.js +1 -1
- package/dist/src/notes/agent-context.d.ts +3 -0
- package/dist/src/notes/agent-context.js +32 -4
- package/dist/src/notifications/service.js +2 -2
- package/dist/src/personal-agent/proactivity/repository.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/phone/assistance.js +1 -1
- package/dist/src/phone/location-environment.js +1 -1
- package/dist/src/phone/repository.js +1 -1
- package/dist/src/phone/setup/service.js +1 -1
- package/dist/src/realtime/runtime.js +5 -0
- package/dist/src/session/session-context-for-llm.js +9 -1
- package/dist/src/session/store.js +1 -1
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +7 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.js +40 -2
- package/dist/src/storage/sqlite/device-access-repository.d.ts +2 -8
- package/dist/src/storage/sqlite/device-access-repository.js +1 -3
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +2 -2
- package/dist/src/storage/sqlite/index.d.ts +0 -1
- package/dist/src/storage/sqlite/index.js +3 -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 +2 -10
- package/dist/src/storage/sqlite/session-input-repository.js +8 -0
- package/dist/src/storage/sqlite/upgrades/270_device_bridge_kind.sql +30 -0
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/chat-page-CeHOmJqM.js +0 -72
- package/dist/gateway/static/root/assets/gateway-realtime-hnEaDFaA.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-ugwtyD4q.js +0 -1
- package/dist/gateway/static/root/assets/gateway-restart-kwv0njYq.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CxYPJTy8.js +0 -1
- package/dist/gateway/static/root/assets/index-Cg0AgHw1.js +0 -11
- package/dist/gateway/static/root/assets/index-DE2bG5EI.css +0 -1
- package/dist/gateway/static/root/assets/languages-zXtNocoy.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BgdAP0kf.js +0 -1
- package/dist/gateway/static/root/assets/navigation-D62kPsA9.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DWIWloib.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-BbNYW2Rw.js +0 -1
- package/dist/gateway/static/root/assets/page-context-capture-button-B9L7V_n2.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-YZfSLNTg.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-CGbqoID0.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-0wvIDcVr.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-Bkxs8knZ.js +0 -7
- package/dist/gateway/static/root/assets/route-preload-BVo8JPwW.js +0 -2
- package/dist/gateway/static/root/assets/settings-advanced-gate-DyGT3o1e.js +0 -1
- package/dist/gateway/static/root/assets/use-file-preview-expanded-9DED7ohY.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CmSYxTmk.js +0 -1
- package/dist/packages/endpoint-tools-protocol/src/bridge.js +0 -105
- package/dist/packages/gateway-contract/src/desktop-chat.js +0 -29
- package/dist/src/endpoint-tools/binding-service.d.ts +0 -24
- package/dist/src/endpoint-tools/binding-service.js +0 -57
- package/dist/src/gateway/hono/routes/desktop-chat.d.ts +0 -3
- package/dist/src/gateway/hono/routes/desktop-chat.js +0 -30
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +0 -9
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +0 -41
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
//#region src/endpoint-tools/task-targets.ts
|
|
3
|
+
/** An execution target is pinned to a connection and transcript; reconnect never retargets it. */
|
|
4
|
+
var EndpointTaskTargetService = class {
|
|
5
|
+
resources = /* @__PURE__ */ new Map();
|
|
6
|
+
listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
constructor(registry, transcriptId = () => void 0, actorPrincipalId = () => void 0, targets = /* @__PURE__ */ new Map()) {
|
|
8
|
+
this.registry = registry;
|
|
9
|
+
this.transcriptId = transcriptId;
|
|
10
|
+
this.actorPrincipalId = actorPrincipalId;
|
|
11
|
+
this.targets = targets;
|
|
12
|
+
}
|
|
13
|
+
onChange(listener) {
|
|
14
|
+
this.listeners.add(listener);
|
|
15
|
+
return () => {
|
|
16
|
+
this.listeners.delete(listener);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
select(conversationId, endpointId, now = Date.now(), actorPrincipalId) {
|
|
20
|
+
const key = this.key(conversationId), endpoint = this.registry.get(endpointId);
|
|
21
|
+
if (!endpoint) throw new Error("TARGET_OFFLINE");
|
|
22
|
+
actorPrincipalId ??= this.actorPrincipalId(key);
|
|
23
|
+
const current = this.get(key);
|
|
24
|
+
if (current && current.endpointId === endpointId && current.principalId === endpoint.principalId && current.connectionId === endpoint.connectionId && current.actorPrincipalId === actorPrincipalId && current.expiresAt > now) return current;
|
|
25
|
+
this.assertReleased(key);
|
|
26
|
+
if (!current) {
|
|
27
|
+
const stored = [...this.targets.entries()];
|
|
28
|
+
if (stored.length >= 2048) {
|
|
29
|
+
for (const [id, target] of stored) if (!this.resources.has(id) && target.transcriptId && target.transcriptId !== this.transcriptId(id)) this.clear(id);
|
|
30
|
+
if ([...this.targets.entries()].length >= 2048) throw new Error("TARGET_CAPACITY_EXCEEDED");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const target = {
|
|
34
|
+
conversationId: key,
|
|
35
|
+
endpointId,
|
|
36
|
+
principalId: endpoint.principalId,
|
|
37
|
+
connectionId: endpoint.connectionId,
|
|
38
|
+
executionRef: randomUUID(),
|
|
39
|
+
selectedAt: now,
|
|
40
|
+
expiresAt: now + 30 * 6e4,
|
|
41
|
+
transcriptId: this.transcriptId(key),
|
|
42
|
+
actorPrincipalId
|
|
43
|
+
};
|
|
44
|
+
this.targets.set(key, target);
|
|
45
|
+
for (const listener of this.listeners) listener(key);
|
|
46
|
+
return { ...target };
|
|
47
|
+
}
|
|
48
|
+
get(conversationId) {
|
|
49
|
+
const key = this.key(conversationId), target = this.targets.get(key);
|
|
50
|
+
if (!target) return;
|
|
51
|
+
if (target.transcriptId !== this.transcriptId(key)) {
|
|
52
|
+
this.clear(key);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
return { ...target };
|
|
56
|
+
}
|
|
57
|
+
resolve(conversationId) {
|
|
58
|
+
const target = this.get(conversationId);
|
|
59
|
+
if (!target || target.expiresAt <= Date.now()) return;
|
|
60
|
+
if (target.actorPrincipalId && target.actorPrincipalId !== this.actorPrincipalId(conversationId)) return;
|
|
61
|
+
const endpoint = this.registry.get(target.endpointId);
|
|
62
|
+
return endpoint && endpoint.connectionId === target.connectionId && endpoint.principalId === target.principalId ? endpoint : void 0;
|
|
63
|
+
}
|
|
64
|
+
hold(conversationId, resourceId) {
|
|
65
|
+
const key = this.key(conversationId);
|
|
66
|
+
const resources = this.resources.get(key) ?? /* @__PURE__ */ new Set();
|
|
67
|
+
if (resources.has(resourceId)) throw new Error("TARGET_RESOURCE_ALREADY_HELD");
|
|
68
|
+
resources.add(resourceId);
|
|
69
|
+
this.resources.set(key, resources);
|
|
70
|
+
let released = false;
|
|
71
|
+
return () => {
|
|
72
|
+
if (released) return;
|
|
73
|
+
released = true;
|
|
74
|
+
resources.delete(resourceId);
|
|
75
|
+
if (!resources.size && this.resources.get(key) === resources) this.resources.delete(key);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
assertReleased(key) {
|
|
79
|
+
if (this.resources.get(key)?.size) throw new Error("TARGET_RESOURCE_BUSY: Close the active device resources before changing target");
|
|
80
|
+
}
|
|
81
|
+
clear(conversationId) {
|
|
82
|
+
const key = this.key(conversationId);
|
|
83
|
+
this.assertReleased(key);
|
|
84
|
+
const removed = this.targets.delete(key);
|
|
85
|
+
if (removed) for (const listener of this.listeners) listener(key);
|
|
86
|
+
return removed;
|
|
87
|
+
}
|
|
88
|
+
key(conversationId) {
|
|
89
|
+
const key = conversationId.trim();
|
|
90
|
+
if (!key || key.length > 500) throw new Error("Invalid conversation identity");
|
|
91
|
+
return key;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
export { EndpointTaskTargetService };
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type EndpointToolContent } from '@xopcai/endpoint-tools-protocol';
|
|
2
2
|
export declare const ENDPOINT_UPLOAD_MAX_BYTES: number;
|
|
3
|
+
export interface EndpointInvocationScope {
|
|
4
|
+
conversationId: string;
|
|
5
|
+
transcriptId: string;
|
|
6
|
+
actorPrincipalId: string;
|
|
7
|
+
}
|
|
8
|
+
interface ArtifactDestination {
|
|
9
|
+
scope: EndpointInvocationScope;
|
|
10
|
+
endpointId: string;
|
|
11
|
+
connectionId: string;
|
|
12
|
+
toolName: string;
|
|
13
|
+
providerDigest: string;
|
|
14
|
+
}
|
|
3
15
|
export interface EndpointUploadedFile {
|
|
4
16
|
fileId: string;
|
|
5
17
|
invocationId: string;
|
|
@@ -29,8 +41,11 @@ export declare class EndpointUploadService {
|
|
|
29
41
|
private readonly frames;
|
|
30
42
|
private readonly pruneTimer;
|
|
31
43
|
private readonly validatingFrames;
|
|
44
|
+
private readonly invocationScopes;
|
|
45
|
+
private readonly transfers;
|
|
46
|
+
private readonly downloads;
|
|
32
47
|
constructor(rootDir: string);
|
|
33
|
-
createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame' | 'personal', principalId?: string): EndpointUploadGrant;
|
|
48
|
+
createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame' | 'personal', principalId?: string, scope?: EndpointInvocationScope): EndpointUploadGrant;
|
|
34
49
|
upload(params: {
|
|
35
50
|
invocationId: string;
|
|
36
51
|
endpointId: string;
|
|
@@ -42,6 +57,23 @@ export declare class EndpointUploadService {
|
|
|
42
57
|
validatedFrame?: boolean;
|
|
43
58
|
}): EndpointUploadedFile;
|
|
44
59
|
validateAndClose(invocationId: string, content: EndpointToolContent[]): void;
|
|
60
|
+
issueTransfer(fileId: string, destination: ArtifactDestination, stillAuthorized: () => boolean): {
|
|
61
|
+
transferId: `${string}-${string}-${string}-${string}-${string}`;
|
|
62
|
+
expiresAt: number;
|
|
63
|
+
sourceEndpointId: string;
|
|
64
|
+
name: string;
|
|
65
|
+
size: number;
|
|
66
|
+
};
|
|
67
|
+
listTransferFiles(conversationId: string, transcriptId: string, destinationId: string): Pick<EndpointUploadedFile, "name" | "size" | "endpointId" | "fileId">[];
|
|
68
|
+
bindTransfer(transferId: unknown, destination: ArtifactDestination, invocationId: string, deadlineAt: number): {
|
|
69
|
+
token: `${string}-${string}-${string}-${string}-${string}`;
|
|
70
|
+
size: number;
|
|
71
|
+
sha256: string;
|
|
72
|
+
};
|
|
73
|
+
takeTransfer(invocationId: string, endpointId: string, connectionId: string, token: string, isActorActive: (scope: EndpointInvocationScope) => boolean): Uint8Array | undefined;
|
|
74
|
+
revokeTransfer(transferId: string): void;
|
|
75
|
+
closeTransfer(invocationId: string): void;
|
|
76
|
+
private sameScope;
|
|
45
77
|
abort(invocationId: string): void;
|
|
46
78
|
getFile(fileId: string): EndpointUploadedFile | undefined;
|
|
47
79
|
readFile(fileId: string): Uint8Array | undefined;
|
|
@@ -56,3 +88,4 @@ export declare class EndpointUploadService {
|
|
|
56
88
|
close(): void;
|
|
57
89
|
private deleteFile;
|
|
58
90
|
}
|
|
91
|
+
export {};
|
|
@@ -10,6 +10,7 @@ init_src();
|
|
|
10
10
|
const GRANT_TTL_MS = 5 * 6e4;
|
|
11
11
|
const ENDPOINT_UPLOAD_MAX_BYTES = ENDPOINT_MAX_FILE_BYTES;
|
|
12
12
|
const DEFAULT_MAX_FILES = 8;
|
|
13
|
+
const TRANSFER_TTL_MS = 2 * 6e4;
|
|
13
14
|
var EndpointUploadError = class extends Error {
|
|
14
15
|
constructor(message, code = "INVALID_UPLOAD_GRANT") {
|
|
15
16
|
super(message);
|
|
@@ -22,6 +23,9 @@ var EndpointUploadService = class {
|
|
|
22
23
|
frames = /* @__PURE__ */ new Map();
|
|
23
24
|
pruneTimer;
|
|
24
25
|
validatingFrames = /* @__PURE__ */ new Set();
|
|
26
|
+
invocationScopes = /* @__PURE__ */ new Map();
|
|
27
|
+
transfers = /* @__PURE__ */ new Map();
|
|
28
|
+
downloads = /* @__PURE__ */ new Map();
|
|
25
29
|
constructor(rootDir) {
|
|
26
30
|
this.rootDir = rootDir;
|
|
27
31
|
mkdirSync(rootDir, {
|
|
@@ -31,7 +35,7 @@ var EndpointUploadService = class {
|
|
|
31
35
|
this.pruneTimer = setInterval(() => this.pruneFrames(Date.now()), 1e3);
|
|
32
36
|
this.pruneTimer.unref();
|
|
33
37
|
}
|
|
34
|
-
createGrant(invocationId, endpointId, now = Date.now(), profile = "durable", principalId) {
|
|
38
|
+
createGrant(invocationId, endpointId, now = Date.now(), profile = "durable", principalId, scope) {
|
|
35
39
|
const token = crypto.randomUUID();
|
|
36
40
|
const grant = {
|
|
37
41
|
profile,
|
|
@@ -42,7 +46,8 @@ var EndpointUploadService = class {
|
|
|
42
46
|
expiresAt: now + GRANT_TTL_MS,
|
|
43
47
|
maxBytes: profile === "computer-frame" ? COMPUTER_FRAME_MAX_BYTES : profile === "personal" ? 10 * 1024 * 1024 : ENDPOINT_UPLOAD_MAX_BYTES,
|
|
44
48
|
maxFiles: profile === "durable" ? DEFAULT_MAX_FILES : 1,
|
|
45
|
-
uploadedFileIds: []
|
|
49
|
+
uploadedFileIds: [],
|
|
50
|
+
scope
|
|
46
51
|
};
|
|
47
52
|
this.grants.set(invocationId, grant);
|
|
48
53
|
return {
|
|
@@ -105,9 +110,87 @@ var EndpointUploadService = class {
|
|
|
105
110
|
}
|
|
106
111
|
if (grant) {
|
|
107
112
|
for (const fileId of grant.uploadedFileIds) if (!referenced.some((item) => item.fileId === fileId)) this.deleteFile(fileId);
|
|
113
|
+
else if (grant.scope && grant.profile !== "computer-frame") {
|
|
114
|
+
if (this.invocationScopes.size >= 2048) {
|
|
115
|
+
const oldest = this.invocationScopes.keys().next().value;
|
|
116
|
+
if (oldest) this.invocationScopes.delete(oldest);
|
|
117
|
+
}
|
|
118
|
+
this.invocationScopes.set(fileId, grant.scope);
|
|
119
|
+
}
|
|
108
120
|
this.grants.delete(invocationId);
|
|
109
121
|
} else if (referenced.length > 0) throw new EndpointUploadError("Invocation did not have an upload grant");
|
|
110
122
|
}
|
|
123
|
+
issueTransfer(fileId, destination, stillAuthorized) {
|
|
124
|
+
const now = Date.now();
|
|
125
|
+
for (const [id, transfer] of this.transfers) if (transfer.expiresAt <= now) this.transfers.delete(id);
|
|
126
|
+
const file = this.getFile(fileId), source = this.invocationScopes.get(fileId);
|
|
127
|
+
if (!file || !source || source.conversationId !== destination.scope.conversationId || source.transcriptId !== destination.scope.transcriptId || file.endpointId === destination.endpointId || file.size > 8388608 || this.transfers.size >= 256 || !stillAuthorized()) return;
|
|
128
|
+
const transferId = crypto.randomUUID(), expiresAt = now + TRANSFER_TTL_MS;
|
|
129
|
+
this.transfers.set(transferId, {
|
|
130
|
+
transferId,
|
|
131
|
+
file,
|
|
132
|
+
destination,
|
|
133
|
+
expiresAt,
|
|
134
|
+
stillAuthorized
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
transferId,
|
|
138
|
+
expiresAt,
|
|
139
|
+
sourceEndpointId: file.endpointId,
|
|
140
|
+
name: file.name,
|
|
141
|
+
size: file.size
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
listTransferFiles(conversationId, transcriptId, destinationId) {
|
|
145
|
+
const result = [];
|
|
146
|
+
for (const [fileId, scope] of this.invocationScopes) {
|
|
147
|
+
if (scope.conversationId !== conversationId || scope.transcriptId !== transcriptId) continue;
|
|
148
|
+
const file = this.getFile(fileId);
|
|
149
|
+
if (!file || file.endpointId === destinationId || file.size > 8388608) continue;
|
|
150
|
+
result.push({
|
|
151
|
+
fileId,
|
|
152
|
+
endpointId: file.endpointId,
|
|
153
|
+
name: file.name,
|
|
154
|
+
size: file.size
|
|
155
|
+
});
|
|
156
|
+
if (result.length > 32) result.shift();
|
|
157
|
+
}
|
|
158
|
+
return result.reverse();
|
|
159
|
+
}
|
|
160
|
+
bindTransfer(transferId, destination, invocationId, deadlineAt) {
|
|
161
|
+
if (typeof transferId !== "string") return;
|
|
162
|
+
const transfer = this.transfers.get(transferId), expected = transfer?.destination;
|
|
163
|
+
if (!transfer || !expected || transfer.expiresAt <= Date.now() || !transfer.stillAuthorized() || !this.sameScope(expected.scope, destination.scope) || expected.endpointId !== destination.endpointId || expected.connectionId !== destination.connectionId || expected.toolName !== destination.toolName || expected.providerDigest !== destination.providerDigest) return;
|
|
164
|
+
this.transfers.delete(transferId);
|
|
165
|
+
const token = crypto.randomUUID();
|
|
166
|
+
this.downloads.set(invocationId, {
|
|
167
|
+
...transfer,
|
|
168
|
+
token,
|
|
169
|
+
expiresAt: Math.min(transfer.expiresAt, deadlineAt)
|
|
170
|
+
});
|
|
171
|
+
return {
|
|
172
|
+
token,
|
|
173
|
+
size: transfer.file.size,
|
|
174
|
+
sha256: transfer.file.sha256
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
takeTransfer(invocationId, endpointId, connectionId, token, isActorActive) {
|
|
178
|
+
const transfer = this.downloads.get(invocationId);
|
|
179
|
+
if (!transfer || transfer.destination.endpointId !== endpointId || transfer.destination.connectionId !== connectionId || Buffer.byteLength(token) !== transfer.token.length || !crypto.timingSafeEqual(Buffer.from(token), Buffer.from(transfer.token)) || transfer.expiresAt <= Date.now() || !transfer.stillAuthorized() || !isActorActive(transfer.destination.scope)) return;
|
|
180
|
+
this.downloads.delete(invocationId);
|
|
181
|
+
const bytes = this.readFile(transfer.file.fileId);
|
|
182
|
+
if (bytes?.byteLength === transfer.file.size) return bytes;
|
|
183
|
+
}
|
|
184
|
+
revokeTransfer(transferId) {
|
|
185
|
+
this.transfers.delete(transferId);
|
|
186
|
+
for (const [invocationId, transfer] of this.downloads) if (transfer.transferId === transferId) this.downloads.delete(invocationId);
|
|
187
|
+
}
|
|
188
|
+
closeTransfer(invocationId) {
|
|
189
|
+
this.downloads.delete(invocationId);
|
|
190
|
+
}
|
|
191
|
+
sameScope(a, b) {
|
|
192
|
+
return a.conversationId === b.conversationId && a.transcriptId === b.transcriptId && a.actorPrincipalId === b.actorPrincipalId;
|
|
193
|
+
}
|
|
111
194
|
abort(invocationId) {
|
|
112
195
|
const grant = this.grants.get(invocationId);
|
|
113
196
|
if (!grant) return;
|
|
@@ -198,6 +281,8 @@ var EndpointUploadService = class {
|
|
|
198
281
|
clearInterval(this.pruneTimer);
|
|
199
282
|
for (const id of this.frames.keys()) this.deleteFile(id);
|
|
200
283
|
this.grants.clear();
|
|
284
|
+
this.transfers.clear();
|
|
285
|
+
this.downloads.clear();
|
|
201
286
|
}
|
|
202
287
|
deleteFile(fileId) {
|
|
203
288
|
const file = this.files.get(fileId);
|
|
@@ -206,6 +291,7 @@ var EndpointUploadService = class {
|
|
|
206
291
|
this.frames.get(fileId)?.bytes.fill(0);
|
|
207
292
|
this.frames.delete(fileId);
|
|
208
293
|
this.files.delete(fileId);
|
|
294
|
+
this.invocationScopes.delete(fileId);
|
|
209
295
|
}
|
|
210
296
|
};
|
|
211
297
|
//#endregion
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packages/gateway-contract/src/user-turn-document.js";
|
|
2
2
|
import { clarificationResponseCommandSchema } from "../../../../packages/gateway-contract/src/clarifications.js";
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
|
+
import { deviceExecutionPrincipalId } from "../../../endpoint-tools/execution-actor.js";
|
|
4
5
|
import { init_types, parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
5
6
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
7
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
8
|
import { replaceLatestSessionTurn } from "./session-input-handler.js";
|
|
7
9
|
import { handleSessionCommand, handleSessionInputReceipt, handleSessionPreparationRetry } from "./session-command-handler.js";
|
|
8
10
|
//#region src/gateway/hono/routes/agent-stream.ts
|
|
@@ -159,6 +161,14 @@ function registerAgentStreamRoutes(authenticated, deps) {
|
|
|
159
161
|
message: "Session not found"
|
|
160
162
|
}
|
|
161
163
|
}, 404);
|
|
164
|
+
const checkpoint = snapshot.clarification?.deviceInteraction;
|
|
165
|
+
if (checkpoint && deviceExecutionPrincipalId(getGatewayPrincipal(c)) !== checkpoint.actorPrincipalId) return c.json({
|
|
166
|
+
ok: true,
|
|
167
|
+
payload: {
|
|
168
|
+
...snapshot,
|
|
169
|
+
clarification: null
|
|
170
|
+
}
|
|
171
|
+
});
|
|
162
172
|
return c.json({
|
|
163
173
|
ok: true,
|
|
164
174
|
payload: snapshot
|
|
@@ -177,7 +187,8 @@ function registerAgentStreamRoutes(authenticated, deps) {
|
|
|
177
187
|
}, 400);
|
|
178
188
|
const result = service.resolveClarificationResponse({
|
|
179
189
|
id,
|
|
180
|
-
...command.data
|
|
190
|
+
...command.data,
|
|
191
|
+
responseActor: getGatewayPrincipal(c)
|
|
181
192
|
});
|
|
182
193
|
if (result.ok === true) return c.json({
|
|
183
194
|
ok: true,
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import { locationRequestSchema } from "../../../../packages/endpoint-tools-protocol/src/location.js";
|
|
2
|
-
import { init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
1
|
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
4
2
|
import { init_session_repository } from "../../../storage/sqlite/session-repository.js";
|
|
5
3
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
4
|
import { z } from "zod";
|
|
5
|
+
import { bodyLimit } from "hono/body-limit";
|
|
7
6
|
//#region src/gateway/hono/routes/device-authorizations.ts
|
|
8
|
-
init_src();
|
|
9
7
|
init_session_repository();
|
|
10
8
|
const authorizationSchema = z.object({
|
|
11
9
|
conversationId: z.uuid(),
|
|
12
10
|
requestorPrincipalId: z.string().min(1).max(160),
|
|
13
11
|
targetEndpointId: z.string().min(1).max(160),
|
|
14
|
-
toolName: z.
|
|
15
|
-
|
|
16
|
-
"web.device.get_location",
|
|
17
|
-
"desktop.device.get_location"
|
|
18
|
-
]),
|
|
19
|
-
arguments: locationRequestSchema
|
|
12
|
+
toolName: z.string().regex(/^[A-Za-z0-9_.-]{1,202}$/),
|
|
13
|
+
arguments: z.record(z.string(), z.unknown())
|
|
20
14
|
}).strict();
|
|
21
15
|
function registerDeviceAuthorizationRoutes(app, deps) {
|
|
22
16
|
app.use("/api/endpoint-tools/target-authorizations*", async (c, next) => {
|
|
@@ -34,7 +28,7 @@ function registerDeviceAuthorizationRoutes(app, deps) {
|
|
|
34
28
|
ok: true,
|
|
35
29
|
payload: deps.service.endpointTools.grants.list()
|
|
36
30
|
}));
|
|
37
|
-
app.post("/api/endpoint-tools/target-authorizations", async (c) => {
|
|
31
|
+
app.post("/api/endpoint-tools/target-authorizations", bodyLimit({ maxSize: 40 * 1024 }), async (c) => {
|
|
38
32
|
const parsed = authorizationSchema.safeParse(await c.req.json().catch(() => null));
|
|
39
33
|
if (!parsed.success) return c.json({
|
|
40
34
|
ok: false,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { init_transaction, runSqliteWriteTransaction } from "../../../storage/sqlite/transaction.js";
|
|
2
|
+
import { createDevice, getDevice, issueDeviceTokenPair } from "../../../storage/sqlite/device-access-repository.js";
|
|
3
|
+
import { getOrCreateGatewayIdentity } from "../../../storage/sqlite/gateway-identity-repository.js";
|
|
4
|
+
import { createEndpointPrincipal, getEndpointPrincipal } from "../../../storage/sqlite/endpoint-principal-repository.js";
|
|
5
|
+
import { parseEndpointPublicKey } from "../../../endpoint-tools/auth.js";
|
|
6
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
|
+
import crypto from "node:crypto";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { bodyLimit } from "hono/body-limit";
|
|
10
|
+
//#region src/gateway/hono/routes/device-hosts.ts
|
|
11
|
+
init_transaction();
|
|
12
|
+
const enrollment = z.strictObject({
|
|
13
|
+
principalId: z.uuid(),
|
|
14
|
+
publicKey: z.string().min(1).max(512),
|
|
15
|
+
displayName: z.string().trim().min(1).max(80),
|
|
16
|
+
platform: z.string().min(1).max(80)
|
|
17
|
+
});
|
|
18
|
+
/** Explicit owner bootstrap issues a host-only credential, never an agent/admin credential. */
|
|
19
|
+
function registerDeviceHostRoutes(app) {
|
|
20
|
+
app.post("/api/endpoint-tools/hosts/enrollment", bodyLimit({ maxSize: 4096 }), async (c) => {
|
|
21
|
+
const actor = getGatewayPrincipal(c);
|
|
22
|
+
if (actor.kind !== "owner" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
23
|
+
ok: false,
|
|
24
|
+
error: { code: "FORBIDDEN" }
|
|
25
|
+
}, 403);
|
|
26
|
+
const parsed = enrollment.safeParse(await c.req.json().catch(() => null));
|
|
27
|
+
if (!parsed.success) return c.json({
|
|
28
|
+
ok: false,
|
|
29
|
+
error: { code: "BAD_REQUEST" }
|
|
30
|
+
}, 400);
|
|
31
|
+
const input = parsed.data;
|
|
32
|
+
try {
|
|
33
|
+
const key = parseEndpointPublicKey(input.publicKey);
|
|
34
|
+
const tokens = runSqliteWriteTransaction(() => {
|
|
35
|
+
const device = getDevice(input.principalId), principal = getEndpointPrincipal(input.principalId);
|
|
36
|
+
if (device && (!device.scopes.every((scope) => ["device.self", "gateway.status"].includes(scope)) || device.revokedAt !== void 0 || device.platform !== "bridge" || !crypto.createPublicKey({
|
|
37
|
+
key: device.publicKeyJwk,
|
|
38
|
+
format: "jwk"
|
|
39
|
+
}).export({
|
|
40
|
+
format: "der",
|
|
41
|
+
type: "spki"
|
|
42
|
+
}).equals(key.export({
|
|
43
|
+
format: "der",
|
|
44
|
+
type: "spki"
|
|
45
|
+
})))) throw new Error("Device identity cannot be rebound");
|
|
46
|
+
if (principal && (principal.revokedAt !== void 0 || principal.kind !== "bridge" || principal.publicKey !== input.publicKey || principal.displayName !== input.displayName || principal.platform !== input.platform)) throw new Error("Principal identity cannot be rebound");
|
|
47
|
+
if (!device) createDevice({
|
|
48
|
+
id: input.principalId,
|
|
49
|
+
displayName: input.displayName,
|
|
50
|
+
platform: "bridge",
|
|
51
|
+
publicKeyJwk: key.export({ format: "jwk" }),
|
|
52
|
+
scopes: ["device.self", "gateway.status"]
|
|
53
|
+
});
|
|
54
|
+
if (!principal) createEndpointPrincipal({
|
|
55
|
+
id: input.principalId,
|
|
56
|
+
displayName: input.displayName,
|
|
57
|
+
kind: "bridge",
|
|
58
|
+
platform: input.platform,
|
|
59
|
+
publicKey: input.publicKey
|
|
60
|
+
});
|
|
61
|
+
return issueDeviceTokenPair(input.principalId);
|
|
62
|
+
});
|
|
63
|
+
const gateway = getOrCreateGatewayIdentity();
|
|
64
|
+
c.header("Cache-Control", "no-store");
|
|
65
|
+
return c.json({
|
|
66
|
+
ok: true,
|
|
67
|
+
payload: {
|
|
68
|
+
gatewayId: gateway.id,
|
|
69
|
+
gatewayPublicKey: gateway.publicKey,
|
|
70
|
+
tokens
|
|
71
|
+
}
|
|
72
|
+
}, 201);
|
|
73
|
+
} catch {
|
|
74
|
+
return c.json({
|
|
75
|
+
ok: false,
|
|
76
|
+
error: { code: "HOST_ENROLLMENT_DENIED" }
|
|
77
|
+
}, 409);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { registerDeviceHostRoutes };
|