@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,297 @@
|
|
|
1
|
+
import { currentDeviceExecutionActor, deviceExecutionPrincipalId } from "../../../endpoint-tools/execution-actor.js";
|
|
2
|
+
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
3
|
+
import { init_session_repository } from "../../../storage/sqlite/session-repository.js";
|
|
4
|
+
import { getEndpointPrincipal } from "../../../storage/sqlite/endpoint-principal-repository.js";
|
|
5
|
+
import { deviceDelegationRequestSchema, issueDeviceDelegation, listDeviceDelegations, revokeDeviceDelegation } from "../../../endpoint-tools/delegation.js";
|
|
6
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { bodyLimit } from "hono/body-limit";
|
|
9
|
+
//#region src/gateway/hono/routes/device-providers.ts
|
|
10
|
+
init_session_repository();
|
|
11
|
+
const admissionSchema = z.strictObject({
|
|
12
|
+
principalId: z.string().min(1).max(160),
|
|
13
|
+
localId: z.string().min(1).max(64),
|
|
14
|
+
expectedDigest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
15
|
+
allowed: z.boolean()
|
|
16
|
+
});
|
|
17
|
+
function registerDeviceProviderRoutes(app, deps) {
|
|
18
|
+
app.get("/api/endpoint-tools/interactions/:conversationId", (c) => {
|
|
19
|
+
const conversationId = c.req.param("conversationId"), actor = getGatewayPrincipal(c);
|
|
20
|
+
const transcriptId = z.uuid().safeParse(conversationId).success ? getSessionMetadata(conversationId)?.transcriptId : void 0;
|
|
21
|
+
const actorPrincipalId = deviceExecutionPrincipalId(actor);
|
|
22
|
+
c.header("Cache-Control", "no-store");
|
|
23
|
+
const activeActor = Boolean(transcriptId && currentDeviceExecutionActor(conversationId)?.principalId === actorPrincipalId);
|
|
24
|
+
const payload = transcriptId ? deps.service.endpointTools.invocations.listInteractions({
|
|
25
|
+
conversationId,
|
|
26
|
+
transcriptId,
|
|
27
|
+
actorPrincipalId
|
|
28
|
+
}, activeActor) : [];
|
|
29
|
+
return c.json({
|
|
30
|
+
ok: true,
|
|
31
|
+
payload
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
app.post("/api/endpoint-tools/interactions/:conversationId", bodyLimit({ maxSize: 8192 }), async (c) => {
|
|
35
|
+
const parsed = z.strictObject({
|
|
36
|
+
requestId: z.uuid(),
|
|
37
|
+
action: z.enum([
|
|
38
|
+
"accept",
|
|
39
|
+
"decline",
|
|
40
|
+
"cancel"
|
|
41
|
+
]),
|
|
42
|
+
content: z.record(z.string(), z.unknown()).optional()
|
|
43
|
+
}).safeParse(await c.req.json().catch(() => null));
|
|
44
|
+
if (!parsed.success) return c.json({
|
|
45
|
+
ok: false,
|
|
46
|
+
error: { code: "BAD_REQUEST" }
|
|
47
|
+
}, 400);
|
|
48
|
+
const conversationId = c.req.param("conversationId"), actor = getGatewayPrincipal(c);
|
|
49
|
+
const transcriptId = z.uuid().safeParse(conversationId).success ? getSessionMetadata(conversationId)?.transcriptId : void 0;
|
|
50
|
+
const actorPrincipalId = deviceExecutionPrincipalId(actor);
|
|
51
|
+
if (!transcriptId) return c.json({
|
|
52
|
+
ok: false,
|
|
53
|
+
error: { code: "FORBIDDEN" }
|
|
54
|
+
}, 403);
|
|
55
|
+
const { requestId, action, content } = parsed.data;
|
|
56
|
+
const activeActor = currentDeviceExecutionActor(conversationId)?.principalId === actorPrincipalId;
|
|
57
|
+
const accepted = deps.service.endpointTools.invocations.answerInteraction({
|
|
58
|
+
conversationId,
|
|
59
|
+
transcriptId,
|
|
60
|
+
actorPrincipalId
|
|
61
|
+
}, requestId, action, content, activeActor);
|
|
62
|
+
c.header("Cache-Control", "no-store");
|
|
63
|
+
return accepted ? c.json({ ok: true }) : c.json({
|
|
64
|
+
ok: false,
|
|
65
|
+
error: { code: "INTERACTION_UNAVAILABLE" }
|
|
66
|
+
}, 409);
|
|
67
|
+
});
|
|
68
|
+
app.use("/api/endpoint-tools/delegations/*", async (c, next) => {
|
|
69
|
+
const actor = getGatewayPrincipal(c);
|
|
70
|
+
if (actor.kind !== "owner" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
71
|
+
ok: false,
|
|
72
|
+
error: { code: "FORBIDDEN" }
|
|
73
|
+
}, 403);
|
|
74
|
+
c.header("Cache-Control", "no-store");
|
|
75
|
+
await next();
|
|
76
|
+
});
|
|
77
|
+
app.get("/api/endpoint-tools/delegations", (c) => c.json({
|
|
78
|
+
ok: true,
|
|
79
|
+
payload: listDeviceDelegations()
|
|
80
|
+
}));
|
|
81
|
+
app.post("/api/endpoint-tools/delegations", bodyLimit({ maxSize: 16384 }), async (c) => {
|
|
82
|
+
const parsed = deviceDelegationRequestSchema.safeParse(await c.req.json().catch(() => null));
|
|
83
|
+
if (!parsed.success) return c.json({
|
|
84
|
+
ok: false,
|
|
85
|
+
error: { code: "BAD_REQUEST" }
|
|
86
|
+
}, 400);
|
|
87
|
+
try {
|
|
88
|
+
const runtime = deps.service.endpointTools;
|
|
89
|
+
runtime.providers.assertExecutable(parsed.data.endpointId, parsed.data.toolName);
|
|
90
|
+
const grant = issueDeviceDelegation(parsed.data, runtime.registry);
|
|
91
|
+
return c.json({
|
|
92
|
+
ok: true,
|
|
93
|
+
payload: grant
|
|
94
|
+
}, 201);
|
|
95
|
+
} catch {
|
|
96
|
+
return c.json({
|
|
97
|
+
ok: false,
|
|
98
|
+
error: { code: "DELEGATION_UNAVAILABLE" }
|
|
99
|
+
}, 409);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
app.delete("/api/endpoint-tools/delegations/:delegationId", (c) => {
|
|
103
|
+
revokeDeviceDelegation(c.req.param("delegationId"));
|
|
104
|
+
return c.json({ ok: true });
|
|
105
|
+
});
|
|
106
|
+
app.get("/api/endpoint-tools/artifact-transfers", (c) => {
|
|
107
|
+
const actor = getGatewayPrincipal(c);
|
|
108
|
+
if (actor.kind !== "owner" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
109
|
+
ok: false,
|
|
110
|
+
error: { code: "FORBIDDEN" }
|
|
111
|
+
}, 403);
|
|
112
|
+
const conversationId = z.uuid().safeParse(c.req.query("conversationId"));
|
|
113
|
+
if (!conversationId.success) return c.json({
|
|
114
|
+
ok: false,
|
|
115
|
+
error: { code: "BAD_REQUEST" }
|
|
116
|
+
}, 400);
|
|
117
|
+
const runtime = deps.service.endpointTools, target = runtime.targets.get(conversationId.data);
|
|
118
|
+
const endpoint = target && runtime.registry.get(target.endpointId);
|
|
119
|
+
c.header("Cache-Control", "no-store");
|
|
120
|
+
if (!target?.transcriptId || target.actorPrincipalId !== deviceExecutionPrincipalId(actor) || target.expiresAt <= Date.now() || endpoint?.connectionId !== target.connectionId) return c.json({
|
|
121
|
+
ok: true,
|
|
122
|
+
payload: {
|
|
123
|
+
files: [],
|
|
124
|
+
tools: []
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const tools = endpoint.tools.filter((tool) => tool.provider?.artifactInput && runtime.providers.isReady(tool.provider)).map((tool) => ({
|
|
128
|
+
toolName: tool.descriptor.name,
|
|
129
|
+
title: tool.descriptor.title,
|
|
130
|
+
input: tool.provider.artifactInput
|
|
131
|
+
}));
|
|
132
|
+
const files = tools.length ? runtime.uploads.listTransferFiles(conversationId.data, target.transcriptId, target.endpointId).map((file) => {
|
|
133
|
+
const principalId = runtime.uploads.getFile(file.fileId)?.principalId;
|
|
134
|
+
const sourceName = runtime.registry.get(file.endpointId)?.displayName ?? (principalId ? getEndpointPrincipal(principalId)?.displayName : void 0) ?? file.endpointId;
|
|
135
|
+
return {
|
|
136
|
+
...file,
|
|
137
|
+
sourceName
|
|
138
|
+
};
|
|
139
|
+
}) : [];
|
|
140
|
+
return c.json({
|
|
141
|
+
ok: true,
|
|
142
|
+
payload: {
|
|
143
|
+
files,
|
|
144
|
+
tools
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
app.post("/api/endpoint-tools/artifact-transfers", bodyLimit({ maxSize: 4096 }), async (c) => {
|
|
149
|
+
const actor = getGatewayPrincipal(c);
|
|
150
|
+
if (actor.kind !== "owner" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
151
|
+
ok: false,
|
|
152
|
+
error: { code: "FORBIDDEN" }
|
|
153
|
+
}, 403);
|
|
154
|
+
const parsed = z.strictObject({
|
|
155
|
+
conversationId: z.uuid(),
|
|
156
|
+
fileId: z.uuid(),
|
|
157
|
+
toolName: z.string().min(1).max(256)
|
|
158
|
+
}).safeParse(await c.req.json().catch(() => null));
|
|
159
|
+
if (!parsed.success) return c.json({
|
|
160
|
+
ok: false,
|
|
161
|
+
error: { code: "BAD_REQUEST" }
|
|
162
|
+
}, 400);
|
|
163
|
+
const { conversationId, fileId, toolName } = parsed.data;
|
|
164
|
+
const runtime = deps.service.endpointTools;
|
|
165
|
+
const actorPrincipalId = deviceExecutionPrincipalId(actor);
|
|
166
|
+
const target = runtime.targets.get(conversationId);
|
|
167
|
+
const tool = target && runtime.registry.getTool(target.endpointId, toolName);
|
|
168
|
+
if (!target?.transcriptId || target.actorPrincipalId !== actorPrincipalId || !tool?.provider?.artifactInput) return c.json({
|
|
169
|
+
ok: false,
|
|
170
|
+
error: { code: "TRANSFER_UNAVAILABLE" }
|
|
171
|
+
}, 409);
|
|
172
|
+
const { digest } = tool.provider;
|
|
173
|
+
const stillAuthorized = () => {
|
|
174
|
+
const current = runtime.targets.get(conversationId), endpoint = runtime.registry.get(target.endpointId);
|
|
175
|
+
if (current?.executionRef !== target.executionRef || current.expiresAt <= Date.now() || endpoint?.connectionId !== target.connectionId || runtime.registry.getTool(target.endpointId, toolName)?.provider?.digest !== digest) return false;
|
|
176
|
+
try {
|
|
177
|
+
runtime.providers.assertExecutable(target.endpointId, toolName);
|
|
178
|
+
return true;
|
|
179
|
+
} catch {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const result = runtime.uploads.issueTransfer(fileId, {
|
|
184
|
+
scope: {
|
|
185
|
+
conversationId,
|
|
186
|
+
transcriptId: target.transcriptId,
|
|
187
|
+
actorPrincipalId
|
|
188
|
+
},
|
|
189
|
+
endpointId: target.endpointId,
|
|
190
|
+
connectionId: target.connectionId,
|
|
191
|
+
toolName,
|
|
192
|
+
providerDigest: digest
|
|
193
|
+
}, stillAuthorized);
|
|
194
|
+
c.header("Cache-Control", "no-store");
|
|
195
|
+
return result ? c.json({
|
|
196
|
+
ok: true,
|
|
197
|
+
payload: result
|
|
198
|
+
}, 201) : c.json({
|
|
199
|
+
ok: false,
|
|
200
|
+
error: { code: "TRANSFER_UNAVAILABLE" }
|
|
201
|
+
}, 409);
|
|
202
|
+
});
|
|
203
|
+
app.delete("/api/endpoint-tools/artifact-transfers/:transferId", (c) => {
|
|
204
|
+
const actor = getGatewayPrincipal(c);
|
|
205
|
+
if (actor.kind !== "owner" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
206
|
+
ok: false,
|
|
207
|
+
error: { code: "FORBIDDEN" }
|
|
208
|
+
}, 403);
|
|
209
|
+
deps.service.endpointTools.uploads.revokeTransfer(c.req.param("transferId"));
|
|
210
|
+
return c.json({ ok: true });
|
|
211
|
+
});
|
|
212
|
+
app.get("/api/endpoint-tools/invocations/:invocationId/artifact", (c) => {
|
|
213
|
+
const actor = getGatewayPrincipal(c), runtime = deps.service.endpointTools;
|
|
214
|
+
const endpointId = c.req.header("x-endpoint-id") ?? "";
|
|
215
|
+
const endpoint = runtime.registry.get(endpointId);
|
|
216
|
+
if (actor.kind !== "device" || !actor.deviceId || endpoint?.principalId !== actor.deviceId) return c.json({
|
|
217
|
+
ok: false,
|
|
218
|
+
error: { code: "FORBIDDEN" }
|
|
219
|
+
}, 403);
|
|
220
|
+
const bytes = runtime.uploads.takeTransfer(c.req.param("invocationId"), endpointId, endpoint.connectionId, c.req.header("idempotency-key") ?? "", (scope) => currentDeviceExecutionActor(scope.conversationId)?.principalId === scope.actorPrincipalId);
|
|
221
|
+
c.header("Cache-Control", "no-store");
|
|
222
|
+
if (!bytes) return c.json({
|
|
223
|
+
ok: false,
|
|
224
|
+
error: { code: "TRANSFER_UNAVAILABLE" }
|
|
225
|
+
}, 404);
|
|
226
|
+
c.header("Content-Type", "application/octet-stream");
|
|
227
|
+
c.header("Content-Length", String(bytes.byteLength));
|
|
228
|
+
c.header("X-Content-Type-Options", "nosniff");
|
|
229
|
+
return c.body(new Uint8Array(bytes));
|
|
230
|
+
});
|
|
231
|
+
app.get("/api/endpoint-tools/provider-operations/:operationId", async (c) => {
|
|
232
|
+
const actor = getGatewayPrincipal(c);
|
|
233
|
+
if (actor.kind === "device" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
234
|
+
ok: false,
|
|
235
|
+
error: { code: "FORBIDDEN" }
|
|
236
|
+
}, 403);
|
|
237
|
+
const parsed = z.uuid().safeParse(c.req.param("operationId"));
|
|
238
|
+
if (!parsed.success) return c.json({
|
|
239
|
+
ok: false,
|
|
240
|
+
error: { code: "BAD_REQUEST" }
|
|
241
|
+
}, 400);
|
|
242
|
+
const result = await deps.service.endpointTools.providerOperations.query(parsed.data);
|
|
243
|
+
c.header("Cache-Control", "no-store");
|
|
244
|
+
return result ? c.json({
|
|
245
|
+
ok: true,
|
|
246
|
+
payload: result
|
|
247
|
+
}) : c.json({
|
|
248
|
+
ok: false,
|
|
249
|
+
error: { code: "NOT_FOUND" }
|
|
250
|
+
}, 404);
|
|
251
|
+
});
|
|
252
|
+
app.get("/api/endpoint-tools/providers", (c) => {
|
|
253
|
+
const actor = getGatewayPrincipal(c);
|
|
254
|
+
if (actor.kind !== "device" && !actor.scopes.includes("gateway.admin")) return c.json({
|
|
255
|
+
ok: false,
|
|
256
|
+
error: { code: "FORBIDDEN" }
|
|
257
|
+
}, 403);
|
|
258
|
+
const principalId = actor.kind === "device" ? actor.deviceId ?? actor.principalId : c.req.query("principalId");
|
|
259
|
+
if (principalId && principalId.length > 160) return c.json({
|
|
260
|
+
ok: false,
|
|
261
|
+
error: { code: "BAD_REQUEST" }
|
|
262
|
+
}, 400);
|
|
263
|
+
c.header("Cache-Control", "no-store");
|
|
264
|
+
return c.json({
|
|
265
|
+
ok: true,
|
|
266
|
+
payload: deps.service.endpointTools.providers.list(principalId)
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
app.post("/api/endpoint-tools/providers/admission", bodyLimit({ maxSize: 4096 }), async (c) => {
|
|
270
|
+
const actor = getGatewayPrincipal(c);
|
|
271
|
+
if (actor.kind === "device" || !actor.scopes.includes("gateway.admin")) return c.json({
|
|
272
|
+
ok: false,
|
|
273
|
+
error: { code: "FORBIDDEN" }
|
|
274
|
+
}, 403);
|
|
275
|
+
const parsed = admissionSchema.safeParse(await c.req.json().catch(() => null));
|
|
276
|
+
if (!parsed.success) return c.json({
|
|
277
|
+
ok: false,
|
|
278
|
+
error: { code: "BAD_REQUEST" }
|
|
279
|
+
}, 400);
|
|
280
|
+
const input = parsed.data, principal = getEndpointPrincipal(input.principalId);
|
|
281
|
+
if (!principal || principal.revokedAt !== void 0) return c.json({
|
|
282
|
+
ok: false,
|
|
283
|
+
error: { code: "PRINCIPAL_REVOKED" }
|
|
284
|
+
}, 403);
|
|
285
|
+
try {
|
|
286
|
+
deps.service.endpointTools.providers.admit(input.principalId, input.localId, input.expectedDigest, input.allowed);
|
|
287
|
+
return c.json({ ok: true });
|
|
288
|
+
} catch {
|
|
289
|
+
return c.json({
|
|
290
|
+
ok: false,
|
|
291
|
+
error: { code: "PROVIDER_CONTRACT_CHANGED" }
|
|
292
|
+
}, 409);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
export { registerDeviceProviderRoutes };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { endpointTaskTargetRequestSchema, init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { deviceExecutionPrincipalId } from "../../../endpoint-tools/execution-actor.js";
|
|
3
|
+
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
4
|
+
import { init_session_repository } from "../../../storage/sqlite/session-repository.js";
|
|
5
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { bodyLimit } from "hono/body-limit";
|
|
8
|
+
//#region src/gateway/hono/routes/device-targets.ts
|
|
9
|
+
init_src();
|
|
10
|
+
init_session_repository();
|
|
11
|
+
function registerDeviceTargetRoutes(app, deps) {
|
|
12
|
+
app.use("/api/endpoint-tools/targets/:conversationId", async (c, next) => {
|
|
13
|
+
const id = c.req.param("conversationId");
|
|
14
|
+
if (!z.uuid().safeParse(id).success) return c.json({
|
|
15
|
+
ok: false,
|
|
16
|
+
error: { code: "BAD_REQUEST" }
|
|
17
|
+
}, 400);
|
|
18
|
+
if (!getSessionMetadata(id)) return c.json({
|
|
19
|
+
ok: false,
|
|
20
|
+
error: { code: "NOT_FOUND" }
|
|
21
|
+
}, 404);
|
|
22
|
+
c.header("Cache-Control", "no-store");
|
|
23
|
+
await next();
|
|
24
|
+
});
|
|
25
|
+
app.get("/api/endpoint-tools/targets/:conversationId", (c) => {
|
|
26
|
+
try {
|
|
27
|
+
const target = deps.service.endpointTools.targets.get(c.req.param("conversationId"));
|
|
28
|
+
const actor = getGatewayPrincipal(c);
|
|
29
|
+
if (target && actor.kind === "device" && target.actorPrincipalId !== actor.principalId) return c.json({
|
|
30
|
+
ok: false,
|
|
31
|
+
error: { code: "FORBIDDEN" }
|
|
32
|
+
}, 403);
|
|
33
|
+
return target ? c.json({
|
|
34
|
+
ok: true,
|
|
35
|
+
payload: target
|
|
36
|
+
}) : c.json({
|
|
37
|
+
ok: false,
|
|
38
|
+
error: {
|
|
39
|
+
code: "NOT_FOUND",
|
|
40
|
+
message: "Endpoint target not found"
|
|
41
|
+
}
|
|
42
|
+
}, 404);
|
|
43
|
+
} catch {
|
|
44
|
+
return c.json({
|
|
45
|
+
ok: false,
|
|
46
|
+
error: {
|
|
47
|
+
code: "BAD_REQUEST",
|
|
48
|
+
message: "Invalid session key"
|
|
49
|
+
}
|
|
50
|
+
}, 400);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
app.put("/api/endpoint-tools/targets/:conversationId", bodyLimit({ maxSize: 4096 }), async (c) => {
|
|
54
|
+
const parsed = endpointTaskTargetRequestSchema.safeParse(await c.req.json().catch(() => null));
|
|
55
|
+
if (!parsed.success) return c.json({
|
|
56
|
+
ok: false,
|
|
57
|
+
error: {
|
|
58
|
+
code: "BAD_REQUEST",
|
|
59
|
+
message: "Invalid endpoint target"
|
|
60
|
+
}
|
|
61
|
+
}, 400);
|
|
62
|
+
const gatewayPrincipal = getGatewayPrincipal(c);
|
|
63
|
+
const endpoint = deps.service.endpointTools.registry.get(parsed.data.endpointId);
|
|
64
|
+
if (gatewayPrincipal.kind === "device" && (!endpoint || !gatewayPrincipal.deviceId || endpoint.principalId !== gatewayPrincipal.deviceId)) return c.json({
|
|
65
|
+
ok: false,
|
|
66
|
+
error: {
|
|
67
|
+
code: "FORBIDDEN",
|
|
68
|
+
message: "Endpoint does not belong to this device"
|
|
69
|
+
}
|
|
70
|
+
}, 403);
|
|
71
|
+
try {
|
|
72
|
+
const target = deps.service.endpointTools.targets.select(c.req.param("conversationId"), parsed.data.endpointId, Date.now(), deviceExecutionPrincipalId(gatewayPrincipal));
|
|
73
|
+
return c.json({
|
|
74
|
+
ok: true,
|
|
75
|
+
payload: target
|
|
76
|
+
});
|
|
77
|
+
} catch (error) {
|
|
78
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
79
|
+
const status = message === "TARGET_OFFLINE" || message.startsWith("TARGET_RESOURCE_BUSY") ? 409 : 400;
|
|
80
|
+
return c.json({
|
|
81
|
+
ok: false,
|
|
82
|
+
error: {
|
|
83
|
+
code: "TARGET_SELECTION_FAILED",
|
|
84
|
+
message
|
|
85
|
+
}
|
|
86
|
+
}, status);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
app.delete("/api/endpoint-tools/targets/:conversationId", (c) => {
|
|
90
|
+
try {
|
|
91
|
+
const target = deps.service.endpointTools.targets.get(c.req.param("conversationId")), actor = getGatewayPrincipal(c);
|
|
92
|
+
if (target && actor.kind === "device" && target.actorPrincipalId !== actor.principalId) return c.json({
|
|
93
|
+
ok: false,
|
|
94
|
+
error: { code: "FORBIDDEN" }
|
|
95
|
+
}, 403);
|
|
96
|
+
const removed = deps.service.endpointTools.targets.clear(c.req.param("conversationId"));
|
|
97
|
+
return c.json({
|
|
98
|
+
ok: true,
|
|
99
|
+
payload: { removed }
|
|
100
|
+
});
|
|
101
|
+
} catch (error) {
|
|
102
|
+
if (error instanceof Error && error.message.startsWith("TARGET_RESOURCE_BUSY")) return c.json({
|
|
103
|
+
ok: false,
|
|
104
|
+
error: { code: "TARGET_RESOURCE_BUSY" }
|
|
105
|
+
}, 409);
|
|
106
|
+
return c.json({
|
|
107
|
+
ok: false,
|
|
108
|
+
error: {
|
|
109
|
+
code: "BAD_REQUEST",
|
|
110
|
+
message: "Invalid conversation identity"
|
|
111
|
+
}
|
|
112
|
+
}, 400);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { registerDeviceTargetRoutes };
|
|
@@ -25,10 +25,11 @@ function registerEndpointCompatibilityRoutes(authenticated) {
|
|
|
25
25
|
phoneMediaProtocolVersion: 1,
|
|
26
26
|
deviceStateToolsV1: true,
|
|
27
27
|
hardwareBridgeV1: true,
|
|
28
|
+
deviceProvidersV1: true,
|
|
28
29
|
deviceLocationTasksV1: true,
|
|
29
30
|
mobilePersonalToolsV1: true,
|
|
30
31
|
...principal.kind === "device" ? { deviceId: principal.deviceId } : {},
|
|
31
|
-
endpointProtocolVersion:
|
|
32
|
+
endpointProtocolVersion: 3,
|
|
32
33
|
computerControl: COMPUTER_DESCRIPTOR,
|
|
33
34
|
computerFrameUploadMaxBytes: COMPUTER_FRAME_MAX_BYTES
|
|
34
35
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
3
|
import { getDevice, listDevices, revokeDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
4
|
-
import { endpointPrincipalRegistrationSchema,
|
|
4
|
+
import { endpointPrincipalRegistrationSchema, init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
5
5
|
import { createEndpointPrincipal, getEndpointPrincipal, listEndpointPrincipals, revokeEndpointPrincipal } from "../../../storage/sqlite/endpoint-principal-repository.js";
|
|
6
6
|
import { listEndpointToolInvocationAuditPage } from "../../../storage/sqlite/endpoint-tool-invocation-repository.js";
|
|
7
7
|
import "../../../storage/sqlite/index.js";
|
|
@@ -137,7 +137,7 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
137
137
|
if (gatewayPrincipal.kind === "device") {
|
|
138
138
|
const device = gatewayPrincipal.deviceId ? getDevice(gatewayPrincipal.deviceId) : void 0;
|
|
139
139
|
const ownsPrincipal = parsed.data.principalId === gatewayPrincipal.deviceId;
|
|
140
|
-
const compatibleKind = device?.platform === "chrome" ? parsed.data.kind === "browser" && parsed.data.platform === "chrome" : device?.platform === "desktop" ? parsed.data.kind === "desktop" && parsed.data.platform === "desktop" && (device.scopes.includes("desktop.observe.state") || device.scopes.includes("desktop.observe.screen") || device.scopes.includes("desktop.execute") && getDesktopExecutionGrant(device.id)?.active) && parsed.data.publicKey === desktopDeviceEndpointKey(device) : parsed.data.kind === "mobile";
|
|
140
|
+
const compatibleKind = device?.platform === "bridge" ? parsed.data.kind === "bridge" && parsed.data.publicKey === desktopDeviceEndpointKey(device) : device?.platform === "chrome" ? parsed.data.kind === "browser" && parsed.data.platform === "chrome" : device?.platform === "desktop" ? parsed.data.kind === "desktop" && parsed.data.platform === "desktop" && (device.scopes.includes("desktop.observe.state") || device.scopes.includes("desktop.observe.screen") || device.scopes.includes("desktop.execute") && getDesktopExecutionGrant(device.id)?.active) && parsed.data.publicKey === desktopDeviceEndpointKey(device) : parsed.data.kind === "mobile";
|
|
141
141
|
if (!ownsPrincipal || !compatibleKind) return c.json({
|
|
142
142
|
ok: false,
|
|
143
143
|
error: {
|
|
@@ -232,82 +232,6 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
232
232
|
})
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
|
-
authenticated.get("/api/endpoint-tools/bindings/:conversationId", (c) => {
|
|
236
|
-
try {
|
|
237
|
-
const binding = deps.service.endpointTools.bindings.get(c.req.param("conversationId"));
|
|
238
|
-
return binding ? c.json({
|
|
239
|
-
ok: true,
|
|
240
|
-
payload: binding
|
|
241
|
-
}) : c.json({
|
|
242
|
-
ok: false,
|
|
243
|
-
error: {
|
|
244
|
-
code: "NOT_FOUND",
|
|
245
|
-
message: "Endpoint binding not found"
|
|
246
|
-
}
|
|
247
|
-
}, 404);
|
|
248
|
-
} catch {
|
|
249
|
-
return c.json({
|
|
250
|
-
ok: false,
|
|
251
|
-
error: {
|
|
252
|
-
code: "BAD_REQUEST",
|
|
253
|
-
message: "Invalid session key"
|
|
254
|
-
}
|
|
255
|
-
}, 400);
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
authenticated.put("/api/endpoint-tools/bindings/:conversationId", async (c) => {
|
|
259
|
-
const parsed = endpointSessionBindingRequestSchema.safeParse(await c.req.json().catch(() => null));
|
|
260
|
-
if (!parsed.success) return c.json({
|
|
261
|
-
ok: false,
|
|
262
|
-
error: {
|
|
263
|
-
code: "BAD_REQUEST",
|
|
264
|
-
message: "Invalid endpoint binding"
|
|
265
|
-
}
|
|
266
|
-
}, 400);
|
|
267
|
-
const gatewayPrincipal = getGatewayPrincipal(c);
|
|
268
|
-
const endpoint = deps.service.endpointTools.registry.get(parsed.data.endpointId);
|
|
269
|
-
if (gatewayPrincipal.kind === "device" && (!endpoint || !gatewayPrincipal.deviceId || endpoint.principalId !== gatewayPrincipal.deviceId)) return c.json({
|
|
270
|
-
ok: false,
|
|
271
|
-
error: {
|
|
272
|
-
code: "FORBIDDEN",
|
|
273
|
-
message: "Endpoint does not belong to this device"
|
|
274
|
-
}
|
|
275
|
-
}, 403);
|
|
276
|
-
try {
|
|
277
|
-
const binding = deps.service.endpointTools.bindings.bind(c.req.param("conversationId"), parsed.data.endpointId);
|
|
278
|
-
return c.json({
|
|
279
|
-
ok: true,
|
|
280
|
-
payload: binding
|
|
281
|
-
});
|
|
282
|
-
} catch (error) {
|
|
283
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
284
|
-
const status = message === "Endpoint is offline" ? 409 : 400;
|
|
285
|
-
return c.json({
|
|
286
|
-
ok: false,
|
|
287
|
-
error: {
|
|
288
|
-
code: "BINDING_FAILED",
|
|
289
|
-
message
|
|
290
|
-
}
|
|
291
|
-
}, status);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
authenticated.delete("/api/endpoint-tools/bindings/:conversationId", (c) => {
|
|
295
|
-
try {
|
|
296
|
-
const removed = deps.service.endpointTools.bindings.unbind(c.req.param("conversationId"));
|
|
297
|
-
return c.json({
|
|
298
|
-
ok: true,
|
|
299
|
-
payload: { removed }
|
|
300
|
-
});
|
|
301
|
-
} catch {
|
|
302
|
-
return c.json({
|
|
303
|
-
ok: false,
|
|
304
|
-
error: {
|
|
305
|
-
code: "BAD_REQUEST",
|
|
306
|
-
message: "Invalid session key"
|
|
307
|
-
}
|
|
308
|
-
}, 400);
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
235
|
authenticated.post("/api/endpoint-tools/invocations/:invocationId/files", async (c) => {
|
|
312
236
|
const invocationId = c.req.param("invocationId");
|
|
313
237
|
const endpointId = c.req.header("x-endpoint-id") ?? "";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
1
2
|
import { ImportError } from "../../../imports/types.js";
|
|
2
3
|
import { isImportSource } from "../../../imports/sources.js";
|
|
3
4
|
import { ImportSelectionRepository } from "../../../storage/sqlite/import-selection-repository.js";
|
|
4
5
|
import { getLiveInventory, previewInventoryItem, publicInventory, scanProduct } from "../../../imports/inventory.js";
|
|
5
6
|
import { importSelection, listImportSources } from "../../../imports/productImport.js";
|
|
6
7
|
import { createRuntimeImportService } from "../../../imports/runtime.js";
|
|
7
|
-
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/gateway/hono/routes/imports.ts
|
|
10
10
|
const selectionSchema = z.object({
|
|
@@ -3,14 +3,6 @@ function startsWithAny(path, prefixes) {
|
|
|
3
3
|
return prefixes.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
4
4
|
}
|
|
5
5
|
const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
6
|
-
{
|
|
7
|
-
id: "desktop-chat",
|
|
8
|
-
match: (path) => path === "/api/desktop-chat/bootstrap",
|
|
9
|
-
load: async () => {
|
|
10
|
-
const { registerDesktopChatRoutes } = await import("./desktop-chat.js");
|
|
11
|
-
return { register: registerDesktopChatRoutes };
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
6
|
{
|
|
15
7
|
id: "location-sharing",
|
|
16
8
|
match: (path) => /^\/api\/user-context\/environment\/location-shares(?:\/[^/]+(?:\/samples)?)?$/.test(path),
|
|
@@ -112,6 +104,30 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
112
104
|
return { register: registerDeviceSettingsRoutes };
|
|
113
105
|
}
|
|
114
106
|
},
|
|
107
|
+
{
|
|
108
|
+
id: "device-hosts",
|
|
109
|
+
match: (path) => path === "/api/endpoint-tools/hosts/enrollment",
|
|
110
|
+
load: async () => {
|
|
111
|
+
const { registerDeviceHostRoutes } = await import("./device-hosts.js");
|
|
112
|
+
return { register: registerDeviceHostRoutes };
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "device-targets",
|
|
117
|
+
match: (path) => /^\/api\/endpoint-tools\/targets\/[^/]+$/.test(path),
|
|
118
|
+
load: async () => {
|
|
119
|
+
const { registerDeviceTargetRoutes } = await import("./device-targets.js");
|
|
120
|
+
return { register: registerDeviceTargetRoutes };
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "device-providers",
|
|
125
|
+
match: (path) => /^\/api\/endpoint-tools\/(?:providers(?:\/admission)?|(?:provider-operations|interactions)\/[^/]+|(?:artifact-transfers|delegations)(?:\/[^/]+)?|invocations\/[^/]+\/artifact)$/.test(path),
|
|
126
|
+
load: async () => {
|
|
127
|
+
const { registerDeviceProviderRoutes } = await import("./device-providers.js");
|
|
128
|
+
return { register: registerDeviceProviderRoutes };
|
|
129
|
+
}
|
|
130
|
+
},
|
|
115
131
|
{
|
|
116
132
|
id: "endpoint-compatibility",
|
|
117
133
|
match: (path) => path === "/api/endpoint-tools/compatibility",
|
|
@@ -5,9 +5,9 @@ import "../../../capabilities/runtime/dispatcher.js";
|
|
|
5
5
|
import { parseLocalAppFixGuidanceInput } from "../../../local-apps/fix-guidance.js";
|
|
6
6
|
import { readLocalAppAcceptanceConfig } from "../../../local-apps/acceptance.js";
|
|
7
7
|
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
8
|
-
import { LOCAL_APP_RUNTIME_BRIDGE_HASH, injectLocalAppRuntimeBridge } from "../../../local-apps/preview-runtime-bridge.js";
|
|
9
8
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
10
9
|
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
10
|
+
import { LOCAL_APP_RUNTIME_BRIDGE_HASH, injectLocalAppRuntimeBridge } from "../../../local-apps/preview-runtime-bridge.js";
|
|
11
11
|
import { relative, resolve } from "node:path";
|
|
12
12
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ import { getPersonalRequest, init_request_repository, listPersonalRequests } fro
|
|
|
3
3
|
import { getPersonalAgent } from "../../../personal-agent/repository.js";
|
|
4
4
|
import { TaskOriginRepository } from "../../../tasks/task-origin-repository.js";
|
|
5
5
|
import { cancelPersonalRequest, personalRequestSnapshot, publishPersonalRequest } from "../../../personal-agent/request-service.js";
|
|
6
|
+
import { writeAgentAvatarFromBase64 } from "../../agents-admin.js";
|
|
7
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
8
|
import { PersonalOnboardingDraftSchema, PersonalOnboardingStepSchema, finishPersonalWelcome, getPersonalOnboarding, savePersonalOnboarding } from "../../../personal-agent/onboarding.js";
|
|
7
9
|
import { PersonalAppearanceSchema, createOrResumePersonalAgent, ensurePersonalConversationVisibility, listPersonalModels, patchPersonalProfile, refreshPersonalDelegationGuidance } from "../../../personal-agent/service.js";
|
|
8
10
|
import { markPersonalRead, personalUnreadSnapshot } from "../../../personal-agent/unread.js";
|
|
9
|
-
import { writeAgentAvatarFromBase64 } from "../../agents-admin.js";
|
|
10
|
-
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
11
11
|
import { registerProactivityRoutes } from "../../../personal-agent/proactivity/routes.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/gateway/hono/routes/personal-agent.ts
|
|
@@ -6,6 +6,7 @@ import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packa
|
|
|
6
6
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
7
7
|
import { SessionInputControlConflict, init_session_input_control_repository } from "../../../storage/sqlite/session-input-control-repository.js";
|
|
8
8
|
import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
9
|
+
import { recordDeviceExecutionActor } from "../../../endpoint-tools/execution-actor.js";
|
|
9
10
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
10
11
|
import { parseSlashCommand } from "../../../chat-commands/command-parse.js";
|
|
11
12
|
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
@@ -129,6 +130,7 @@ async function handleSessionCommand(c, deps, materialize = false) {
|
|
|
129
130
|
if (command.input.appContext) contexts.push(await deps.service.prepareSessionAppContext(command.input.appContext, principal, id.data, command.clientMessageId));
|
|
130
131
|
return contexts;
|
|
131
132
|
});
|
|
133
|
+
if ("input" in command) recordDeviceExecutionActor(id.data, command.clientMessageId, principal);
|
|
132
134
|
deps.service.emit("session.input-state", payload.inputState);
|
|
133
135
|
if ("kind" in command && command.kind === "start") deps.service.emit("session.updated", { key: id.data });
|
|
134
136
|
if (payload.receipt.lifecycle === "preparing") deps.service.sessionPreparations.wake(id.data);
|
|
@@ -6,6 +6,7 @@ import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packa
|
|
|
6
6
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
7
7
|
import { SessionInputControlConflict, init_session_input_control_repository } from "../../../storage/sqlite/session-input-control-repository.js";
|
|
8
8
|
import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
9
|
+
import { recordDeviceExecutionActor } from "../../../endpoint-tools/execution-actor.js";
|
|
9
10
|
import { init_types, parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
10
11
|
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
11
12
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
@@ -225,6 +226,7 @@ async function submitSessionInput(c, deps, conversationId, options) {
|
|
|
225
226
|
}
|
|
226
227
|
}, forbidden ? 403 : invalid ? 400 : 409);
|
|
227
228
|
}
|
|
229
|
+
recordDeviceExecutionActor(conversationId, typeof body.clientMessageId === "string" ? body.clientMessageId : "", getGatewayPrincipal(c));
|
|
228
230
|
const result = await deps.service.submitSessionInput({
|
|
229
231
|
expectedTranscriptId: body.expectedTranscriptId,
|
|
230
232
|
conversationId,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../../package-version.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
3
|
import "../../../config/index.js";
|
|
4
|
-
import { normalizeUpdateChannel } from "../../../infra/update-channels.js";
|
|
5
4
|
import { acquireUpdateLock } from "../../../infra/update-lock.js";
|
|
6
|
-
import {
|
|
5
|
+
import { normalizeUpdateChannel } from "../../../infra/update-channels.js";
|
|
7
6
|
import { getUpdateAvailable, runGatewayUpdateCheck } from "../../../infra/update-startup.js";
|
|
8
7
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
8
|
+
import { formatUpdateApiResult, runGatewayUpdateWithPostSteps } from "../../../infra/update-runner.js";
|
|
9
9
|
import { streamSSE } from "hono/streaming";
|
|
10
10
|
//#region src/gateway/hono/routes/update.ts
|
|
11
11
|
init_package_version();
|